From b46e808808834e0ea490f1c1e889aeaba0c484e6 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 12:31:57 +0100
Subject: [PATCH 1/9] Update Go SDK to version 9.0.0
---
README.md | 1120 ++---
api/openapi.yaml | 2769 ++++++-----
api_integration.go | 57 +-
api_management.go | 463 +-
configuration.go | 2 +-
docs/Achievement.md | 104 +
docs/ActivateUserRequest.md | 26 -
docs/AdditionalCampaignProperties.md | 2 +-
docs/AnalyticsProduct.md | 117 +
docs/AnalyticsProductSku.md | 91 +
docs/ApplicationCampaignStats.md | 26 +
docs/ApplicationCifExpression.md | 8 +-
docs/ApplicationCustomer.md | 8 +-
docs/ApplicationSession.md | 2 +-
docs/AudienceCustomer.md | 2 +-
docs/BaseLoyaltyProgram.md | 26 +
docs/Binding.md | 10 +-
docs/BulkOperationOnCampaigns.md | 26 +
docs/Campaign.md | 28 +-
docs/CampaignTemplate.md | 26 +
...mpaignTemplateCouponReservationSettings.md | 65 +
docs/CampaignVersions.md | 26 +
docs/CouponDeletionFilters.md | 2 +-
docs/CreateAchievement.md | 104 +
docs/CustomerProfile.md | 2 +-
docs/CustomerProfileAudienceRequestItem.md | 2 +-
docs/CustomerSessionV2.md | 36 +-
docs/DeleteUserRequest.md | 26 -
docs/Event.md | 10 +-
docs/GenerateCampaignDescription.md | 26 +-
docs/GenerateCampaignTags.md | 26 +-
docs/GenerateItemFilterDescription.md | 10 +-
docs/GenerateLoyaltyCard.md | 26 +
docs/GenerateRuleTitleRule.md | 20 +-
docs/InlineResponse20020.md | 10 +-
docs/InlineResponse20021.md | 38 +-
docs/InlineResponse20022.md | 50 +-
docs/InlineResponse20023.md | 10 +-
docs/InlineResponse20024.md | 28 +-
docs/InlineResponse20025.md | 10 +-
docs/InlineResponse20026.md | 12 +-
docs/InlineResponse20027.md | 12 +-
docs/InlineResponse20028.md | 36 +-
docs/InlineResponse20029.md | 38 +-
docs/InlineResponse20030.md | 36 +-
docs/InlineResponse20031.md | 10 +-
docs/InlineResponse20032.md | 36 +-
docs/InlineResponse20033.md | 38 +-
docs/InlineResponse20034.md | 38 +-
docs/InlineResponse20035.md | 38 +-
docs/InlineResponse20036.md | 10 +-
docs/InlineResponse20037.md | 10 +-
docs/InlineResponse20038.md | 10 +-
docs/InlineResponse20039.md | 10 +-
docs/InlineResponse20040.md | 10 +-
docs/InlineResponse20041.md | 38 +-
docs/InlineResponse20042.md | 38 +-
docs/InlineResponse20043.md | 10 +-
docs/InlineResponse20044.md | 38 +-
docs/InlineResponse20045.md | 36 +-
docs/InlineResponse20046.md | 12 +-
docs/InlineResponse20047.md | 65 -
docs/IntegrationApi.md | 585 +--
docs/IntegrationCustomerSessionResponse.md | 2 +-
docs/LedgerInfo.md | 4 +-
docs/ListCampaignStoreBudgets.md | 117 +
docs/ListCampaignStoreBudgetsStore.md | 91 +
docs/LoyaltyCard.md | 52 +
docs/LoyaltyCardBatch.md | 26 +
docs/LoyaltyProgram.md | 28 +-
docs/LoyaltyProgramBalance.md | 4 +-
docs/LoyaltyProgramEntity.md | 52 +
docs/LoyaltyTier.md | 56 +-
docs/ManagementApi.md | 3601 ++++++--------
docs/MessageLogEntry.md | 106 +-
docs/NewApplicationCifExpression.md | 10 +-
docs/NewCampaignStoreBudget.md | 91 +
docs/NewCampaignStoreBudgetStoreLimit.md | 65 +
docs/NewCampaignTemplate.md | 26 +
docs/NewCustomerSessionV2.md | 6 +-
docs/NewLoyaltyProgram.md | 26 +
docs/NewLoyaltyTier.md | 4 +-
docs/NewTemplateDef.md | 10 +-
docs/NewWebhook.md | 2 +-
docs/Product.md | 2 +-
docs/ProductSearchMatch.md | 91 +
docs/ProductSkuUnitAnalytics.md | 117 +
docs/ProductUnitAnalytics.md | 143 +
docs/Rule.md | 20 +-
docs/ScimNewUser.md | 2 +-
docs/ScimServiceProviderConfigResponse.md | 26 +
docs/ScimServiceProviderConfigResponseSort.md | 39 +
docs/ScimUser.md | 2 +-
docs/Store.md | 2 +-
docs/StrikethroughDebugResponse.md | 65 +
docs/SummaryCampaignStoreBudget.md | 91 +
docs/TemplateArgDef.md | 26 +
docs/TemplateDef.md | 10 +-
docs/UpdateAchievement.md | 104 +
docs/UpdateCampaignTemplate.md | 26 +
docs/UpdateCustomEffect.md | 208 -
docs/UpdateLoyaltyProgram.md | 26 +
docs/UpdateLoyaltyProgramTier.md | 91 +
docs/ValueMap.md | 117 +
docs/Webhook.md | 2 +-
docs/WebhookLogEntry.md | 2 +-
docs/WebhookWithOutgoingIntegrationDetails.md | 2 +-
go.mod | 4 +-
go.sum | 18 +-
model_account.go | 2 +-
model_account_additional_cost.go | 2 +-
model_achievement.go | 142 +-
model_activate_user_request.go | 19 +-
model_additional_campaign_properties.go | 2 +-
model_analytics_product.go | 128 +
model_analytics_product_sku.go | 94 +
model_application.go | 2 +-
model_application_api_key.go | 2 +-
model_application_campaign_stats.go | 17 +
model_application_cif.go | 2 +-
model_application_cif_expression.go | 20 +-
model_application_customer.go | 10 +-
model_application_event.go | 2 +-
model_application_referee.go | 2 +-
model_application_session.go | 4 +-
model_async_coupon_deletion_job_response.go | 2 +-
model_attribute.go | 2 +-
model_audience.go | 2 +-
model_audience_customer.go | 4 +-
model_base_loyalty_program.go | 35 +
model_base_notification.go | 2 +-
model_base_notification_webhook.go | 2 +-
model_binding.go | 8 +-
model_bulk_operation_on_campaigns.go | 36 +
model_campaign.go | 39 +-
model_campaign_analytics.go | 2 +-
model_campaign_collection.go | 2 +-
model_campaign_collection_without_payload.go | 2 +-
model_campaign_evaluation_group.go | 2 +-
model_campaign_group.go | 2 +-
model_campaign_set.go | 2 +-
model_campaign_store_budget.go | 2 +-
model_campaign_template.go | 42 +-
...gn_template_coupon_reservation_settings.go | 112 +
model_campaign_versions.go | 35 +
model_catalog.go | 2 +-
model_catalog_item.go | 2 +-
model_change.go | 2 +-
model_collection.go | 2 +-
model_collection_item.go | 2 +-
model_collection_without_payload.go | 2 +-
model_coupon.go | 2 +-
model_coupon_creation_job.go | 2 +-
model_coupon_deletion_job.go | 2 +-
model_create_achievement.go | 141 +
model_custom_effect.go | 2 +-
model_customer_profile.go | 4 +-
..._customer_profile_audience_request_item.go | 2 +-
...customer_profile_integration_request_v2.go | 2 +-
model_customer_session.go | 2 +-
model_customer_session_v2.go | 47 +-
model_deactivate_user_request.go | 2 +-
model_delete_user_request.go | 19 +-
model_effect.go | 2 +-
model_environment.go | 2 +-
model_event.go | 10 +-
model_event_type.go | 2 +-
model_event_v2.go | 2 +-
model_export.go | 2 +-
model_features_feed.go | 2 +-
model_generate_campaign_description.go | 16 +-
model_generate_campaign_tags.go | 16 +-
model_generate_loyalty_card.go | 35 +
model_generate_rule_title_rule.go | 36 +-
model_giveaway.go | 2 +-
model_import.go | 2 +-
model_inline_response_200_20.go | 10 +-
model_inline_response_200_21.go | 72 +-
model_inline_response_200_22.go | 66 +-
model_inline_response_200_23.go | 12 +-
model_inline_response_200_24.go | 66 +-
model_inline_response_200_25.go | 10 +-
model_inline_response_200_26.go | 38 +-
model_inline_response_200_27.go | 38 +-
model_inline_response_200_28.go | 24 +-
model_inline_response_200_29.go | 72 +-
model_inline_response_200_30.go | 44 +-
model_inline_response_200_31.go | 10 +-
model_inline_response_200_32.go | 44 +-
model_inline_response_200_33.go | 72 +-
model_inline_response_200_34.go | 72 +-
model_inline_response_200_35.go | 72 +-
model_inline_response_200_36.go | 10 +-
model_inline_response_200_37.go | 10 +-
model_inline_response_200_38.go | 10 +-
model_inline_response_200_39.go | 10 +-
model_inline_response_200_40.go | 10 +-
model_inline_response_200_41.go | 72 +-
model_inline_response_200_42.go | 72 +-
model_inline_response_200_43.go | 8 +-
model_inline_response_200_44.go | 72 +-
model_inline_response_200_45.go | 44 +-
model_inline_response_200_46.go | 38 +-
model_integration_coupon.go | 2 +-
...l_integration_customer_session_response.go | 3 +-
model_integration_event.go | 2 +-
model_integration_event_v2_request.go | 2 +-
model_inventory_coupon.go | 2 +-
model_inventory_referral.go | 2 +-
model_item_attribute.go | 2 +-
model_ledger_entry.go | 2 +-
model_ledger_info.go | 6 +-
model_library_attribute.go | 2 +-
model_limit_counter.go | 2 +-
model_list_campaign_store_budgets.go | 124 +
model_list_campaign_store_budgets_store.go | 90 +
model_login_params.go | 2 +-
model_loyalty_balance_with_tier.go | 2 +-
model_loyalty_card.go | 72 +-
model_loyalty_card_balances.go | 2 +-
model_loyalty_card_batch.go | 38 +-
model_loyalty_program.go | 39 +-
model_loyalty_program_balance.go | 4 +-
model_loyalty_program_entity.go | 70 +
model_loyalty_tier.go | 76 +-
model_management_key.go | 2 +-
model_message_log_entry.go | 158 +-
model_multiple_audiences_item.go | 2 +-
...stomer_profile_integration_request_item.go | 2 +-
model_new_account_sign_up.go | 2 +-
model_new_additional_cost.go | 2 +-
model_new_application_api_key.go | 2 +-
model_new_application_cif_expression.go | 20 +-
model_new_attribute.go | 2 +-
model_new_audience.go | 2 +-
model_new_base_notification.go | 2 +-
model_new_campaign.go | 2 +-
model_new_campaign_collection.go | 2 +-
model_new_campaign_set.go | 2 +-
model_new_campaign_store_budget.go | 109 +
...l_new_campaign_store_budget_store_limit.go | 46 +-
model_new_campaign_template.go | 40 +-
model_new_catalog.go | 2 +-
model_new_collection.go | 2 +-
model_new_coupon_creation_job.go | 2 +-
model_new_coupons.go | 2 +-
model_new_coupons_for_multiple_recipients.go | 2 +-
model_new_custom_effect.go | 2 +-
model_new_customer_session.go | 2 +-
model_new_customer_session_v2.go | 6 +-
model_new_event.go | 2 +-
model_new_event_type.go | 2 +-
model_new_loyalty_program.go | 37 +-
model_new_loyalty_tier.go | 4 +-
model_new_management_key.go | 2 +-
model_new_multiple_audiences_item.go | 2 +-
model_new_referral.go | 2 +-
model_new_referrals_for_multiple_advocates.go | 2 +-
model_new_role.go | 2 +-
model_new_role_v2.go | 2 +-
model_new_saml_connection.go | 2 +-
model_new_store.go | 2 +-
model_new_template_def.go | 8 +-
model_new_user.go | 2 +-
model_new_webhook.go | 4 +-
...ion_template_with_configuration_details.go | 2 +-
model_picklist.go | 2 +-
model_product.go | 2 +-
model_product_search_match.go | 111 +
model_product_sku_unit_analytics.go | 110 +
model_product_unit_analytics.go | 127 +
model_referral.go | 2 +-
model_return.go | 2 +-
model_revision.go | 2 +-
model_revision_version.go | 2 +-
model_role.go | 2 +-
model_role_assign.go | 2 +-
model_role_v2.go | 2 +-
model_rule.go | 16 +-
model_ruleset.go | 2 +-
model_saml_connection.go | 2 +-
model_scim_new_user.go | 30 +-
...l_scim_service_provider_config_response.go | 36 +-
...m_service_provider_config_response_sort.go | 77 +
model_scim_user.go | 30 +-
model_store.go | 4 +-
model_strikethrough_debug_response.go | 112 +
model_summary_campaign_store_budget.go | 108 +
model_talang_attribute.go | 2 +-
model_template_arg_def.go | 37 +-
model_template_def.go | 10 +-
model_template_limit_config.go | 2 +-
model_update_achievement.go | 141 +
model_update_campaign_evaluation_group.go | 2 +-
model_update_campaign_group.go | 2 +-
model_update_campaign_template.go | 40 +-
model_update_coupon.go | 2 +-
model_update_coupon_batch.go | 2 +-
model_update_custom_effect.go | 192 +-
model_update_loyalty_program.go | 37 +-
model_update_loyalty_program_tier.go | 129 +
model_update_picklist.go | 2 +-
model_user.go | 2 +-
model_value_map.go | 145 +
model_webhook.go | 4 +-
model_webhook_log_entry.go | 2 +-
...bhook_with_outgoing_integration_details.go | 4 +-
vendor/github.com/golang/protobuf/AUTHORS | 3 +
.../github.com/golang/protobuf/CONTRIBUTORS | 3 +
vendor/github.com/golang/protobuf/LICENSE | 28 +
.../github.com/golang/protobuf/proto/clone.go | 253 +
.../golang/protobuf/proto/decode.go | 428 ++
.../golang/protobuf/proto/discard.go | 350 ++
.../golang/protobuf/proto/encode.go | 203 +
.../github.com/golang/protobuf/proto/equal.go | 300 ++
.../golang/protobuf/proto/extensions.go | 543 ++
.../github.com/golang/protobuf/proto/lib.go | 979 ++++
.../golang/protobuf/proto/message_set.go | 314 ++
.../golang/protobuf/proto/pointer_reflect.go | 357 ++
.../golang/protobuf/proto/pointer_unsafe.go | 308 ++
.../golang/protobuf/proto/properties.go | 544 ++
.../golang/protobuf/proto/table_marshal.go | 2767 +++++++++++
.../golang/protobuf/proto/table_merge.go | 654 +++
.../golang/protobuf/proto/table_unmarshal.go | 2051 ++++++++
.../github.com/golang/protobuf/proto/text.go | 843 ++++
.../golang/protobuf/proto/text_parser.go | 880 ++++
vendor/golang.org/x/net/AUTHORS | 3 +
vendor/golang.org/x/net/CONTRIBUTORS | 3 +
vendor/golang.org/x/net/LICENSE | 27 +
vendor/golang.org/x/net/PATENTS | 22 +
vendor/golang.org/x/net/context/context.go | 56 +
.../x/net/context/ctxhttp/ctxhttp.go | 71 +
vendor/golang.org/x/net/context/go17.go | 72 +
vendor/golang.org/x/net/context/go19.go | 20 +
vendor/golang.org/x/net/context/pre_go17.go | 300 ++
vendor/golang.org/x/net/context/pre_go19.go | 109 +
vendor/golang.org/x/oauth2/AUTHORS | 3 +
vendor/golang.org/x/oauth2/CONTRIBUTORS | 3 +
vendor/golang.org/x/oauth2/LICENSE | 4 +-
vendor/golang.org/x/oauth2/README.md | 29 +-
vendor/golang.org/x/oauth2/deviceauth.go | 198 -
vendor/golang.org/x/oauth2/go.mod | 8 +-
vendor/golang.org/x/oauth2/go.sum | 16 +-
.../x/oauth2/internal/client_appengine.go | 13 +
vendor/golang.org/x/oauth2/internal/oauth2.go | 2 +-
vendor/golang.org/x/oauth2/internal/token.go | 134 +-
.../golang.org/x/oauth2/internal/transport.go | 5 +
vendor/golang.org/x/oauth2/oauth2.go | 64 +-
vendor/golang.org/x/oauth2/pkce.go | 68 -
vendor/golang.org/x/oauth2/token.go | 42 +-
vendor/golang.org/x/oauth2/transport.go | 79 +-
vendor/google.golang.org/appengine/LICENSE | 202 +
.../appengine/internal/api.go | 671 +++
.../appengine/internal/api_classic.go | 169 +
.../appengine/internal/api_common.go | 123 +
.../appengine/internal/app_id.go | 28 +
.../appengine/internal/base/api_base.pb.go | 308 ++
.../appengine/internal/base/api_base.proto | 33 +
.../internal/datastore/datastore_v3.pb.go | 4367 +++++++++++++++++
.../internal/datastore/datastore_v3.proto | 551 +++
.../appengine/internal/identity.go | 55 +
.../appengine/internal/identity_classic.go | 61 +
.../appengine/internal/identity_flex.go | 11 +
.../appengine/internal/identity_vm.go | 134 +
.../appengine/internal/internal.go | 110 +
.../appengine/internal/log/log_service.pb.go | 1313 +++++
.../appengine/internal/log/log_service.proto | 150 +
.../appengine/internal/main.go | 16 +
.../appengine/internal/main_common.go | 7 +
.../appengine/internal/main_vm.go | 69 +
.../appengine/internal/metadata.go | 60 +
.../appengine/internal/net.go | 56 +
.../appengine/internal/regen.sh | 40 +
.../internal/remote_api/remote_api.pb.go | 361 ++
.../internal/remote_api/remote_api.proto | 44 +
.../appengine/internal/transaction.go | 115 +
.../internal/urlfetch/urlfetch_service.pb.go | 527 ++
.../internal/urlfetch/urlfetch_service.proto | 64 +
.../appengine/urlfetch/urlfetch.go | 210 +
vendor/modules.txt | 15 +-
380 files changed, 33056 insertions(+), 7005 deletions(-)
create mode 100644 docs/AnalyticsProduct.md
create mode 100644 docs/AnalyticsProductSku.md
create mode 100644 docs/CampaignTemplateCouponReservationSettings.md
delete mode 100644 docs/InlineResponse20047.md
create mode 100644 docs/ListCampaignStoreBudgets.md
create mode 100644 docs/ListCampaignStoreBudgetsStore.md
create mode 100644 docs/NewCampaignStoreBudget.md
create mode 100644 docs/NewCampaignStoreBudgetStoreLimit.md
create mode 100644 docs/ProductSearchMatch.md
create mode 100644 docs/ProductSkuUnitAnalytics.md
create mode 100644 docs/ProductUnitAnalytics.md
create mode 100644 docs/ScimServiceProviderConfigResponseSort.md
create mode 100644 docs/StrikethroughDebugResponse.md
create mode 100644 docs/SummaryCampaignStoreBudget.md
create mode 100644 docs/UpdateLoyaltyProgramTier.md
create mode 100644 docs/ValueMap.md
create mode 100644 model_analytics_product.go
create mode 100644 model_analytics_product_sku.go
create mode 100644 model_campaign_template_coupon_reservation_settings.go
create mode 100644 model_list_campaign_store_budgets.go
create mode 100644 model_list_campaign_store_budgets_store.go
create mode 100644 model_new_campaign_store_budget.go
rename model_inline_response_200_47.go => model_new_campaign_store_budget_store_limit.go (52%)
create mode 100644 model_product_search_match.go
create mode 100644 model_product_sku_unit_analytics.go
create mode 100644 model_product_unit_analytics.go
create mode 100644 model_scim_service_provider_config_response_sort.go
create mode 100644 model_strikethrough_debug_response.go
create mode 100644 model_summary_campaign_store_budget.go
create mode 100644 model_update_loyalty_program_tier.go
create mode 100644 model_value_map.go
create mode 100644 vendor/github.com/golang/protobuf/AUTHORS
create mode 100644 vendor/github.com/golang/protobuf/CONTRIBUTORS
create mode 100644 vendor/github.com/golang/protobuf/LICENSE
create mode 100644 vendor/github.com/golang/protobuf/proto/clone.go
create mode 100644 vendor/github.com/golang/protobuf/proto/decode.go
create mode 100644 vendor/github.com/golang/protobuf/proto/discard.go
create mode 100644 vendor/github.com/golang/protobuf/proto/encode.go
create mode 100644 vendor/github.com/golang/protobuf/proto/equal.go
create mode 100644 vendor/github.com/golang/protobuf/proto/extensions.go
create mode 100644 vendor/github.com/golang/protobuf/proto/lib.go
create mode 100644 vendor/github.com/golang/protobuf/proto/message_set.go
create mode 100644 vendor/github.com/golang/protobuf/proto/pointer_reflect.go
create mode 100644 vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
create mode 100644 vendor/github.com/golang/protobuf/proto/properties.go
create mode 100644 vendor/github.com/golang/protobuf/proto/table_marshal.go
create mode 100644 vendor/github.com/golang/protobuf/proto/table_merge.go
create mode 100644 vendor/github.com/golang/protobuf/proto/table_unmarshal.go
create mode 100644 vendor/github.com/golang/protobuf/proto/text.go
create mode 100644 vendor/github.com/golang/protobuf/proto/text_parser.go
create mode 100644 vendor/golang.org/x/net/AUTHORS
create mode 100644 vendor/golang.org/x/net/CONTRIBUTORS
create mode 100644 vendor/golang.org/x/net/LICENSE
create mode 100644 vendor/golang.org/x/net/PATENTS
create mode 100644 vendor/golang.org/x/net/context/context.go
create mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
create mode 100644 vendor/golang.org/x/net/context/go17.go
create mode 100644 vendor/golang.org/x/net/context/go19.go
create mode 100644 vendor/golang.org/x/net/context/pre_go17.go
create mode 100644 vendor/golang.org/x/net/context/pre_go19.go
create mode 100644 vendor/golang.org/x/oauth2/AUTHORS
create mode 100644 vendor/golang.org/x/oauth2/CONTRIBUTORS
delete mode 100644 vendor/golang.org/x/oauth2/deviceauth.go
create mode 100644 vendor/golang.org/x/oauth2/internal/client_appengine.go
delete mode 100644 vendor/golang.org/x/oauth2/pkce.go
create mode 100644 vendor/google.golang.org/appengine/LICENSE
create mode 100644 vendor/google.golang.org/appengine/internal/api.go
create mode 100644 vendor/google.golang.org/appengine/internal/api_classic.go
create mode 100644 vendor/google.golang.org/appengine/internal/api_common.go
create mode 100644 vendor/google.golang.org/appengine/internal/app_id.go
create mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.pb.go
create mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.proto
create mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
create mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
create mode 100644 vendor/google.golang.org/appengine/internal/identity.go
create mode 100644 vendor/google.golang.org/appengine/internal/identity_classic.go
create mode 100644 vendor/google.golang.org/appengine/internal/identity_flex.go
create mode 100644 vendor/google.golang.org/appengine/internal/identity_vm.go
create mode 100644 vendor/google.golang.org/appengine/internal/internal.go
create mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.pb.go
create mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.proto
create mode 100644 vendor/google.golang.org/appengine/internal/main.go
create mode 100644 vendor/google.golang.org/appengine/internal/main_common.go
create mode 100644 vendor/google.golang.org/appengine/internal/main_vm.go
create mode 100644 vendor/google.golang.org/appengine/internal/metadata.go
create mode 100644 vendor/google.golang.org/appengine/internal/net.go
create mode 100644 vendor/google.golang.org/appengine/internal/regen.sh
create mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
create mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
create mode 100644 vendor/google.golang.org/appengine/internal/transaction.go
create mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
create mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
create mode 100644 vendor/google.golang.org/appengine/urlfetch/urlfetch.go
diff --git a/README.md b/README.md
index 181385ca..c9d6759b 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,7 @@
-# Go API client for talon
+# Talon.One Go SDK
-Use the Talon.One API to integrate with your application and to
-manage applications and campaigns:
+This SDK supports all of the operations of Talon.One's Integration API and Management API.
-- Use the operations in the [Integration API section](#integration-api)
-are used to integrate with our platform
-- Use the operation in the [Management API section](#management-api) to
-manage applications and campaigns.
## Determining the base URL of the endpoints
@@ -15,14 +10,6 @@ For example, if you access the Campaign Manager at `https://yourbaseurl.talon.on
the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint
is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
-
-## Overview
-This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
-
-- API version:
-- Package version: 8.0.0
-- Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen
-
## Installation
Install the following dependencies:
@@ -36,57 +23,16 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
```golang
-import sw "./talon"
+import "./talon"
```
-## Configuration of Server URL
-
-Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
-
-### Select Server Configuration
-
-For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
-
-```golang
-ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
-```
-
-### Templated Server URL
-
-Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
-
-```golang
-ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
- "basePath": "v2",
-})
-```
-
-Note, enum values are always validated and all unused variables are silently ignored.
-
-### URLs Configuration per Operation
-
-Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
-An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
-Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
-
-```
-ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
- "{classname}Service.{nickname}": 2,
-})
-ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
- "{classname}Service.{nickname}": {
- "port": "8443",
- },
-})
-```
-
-## Getting Started
+## Getting started
### Integration API
-**Note:** The Integration API's V1 `Update customer session` and `Update customer profile` endpoints are now deprecated. Use their V2 instead. See [Migrating to V2](https://docs.talon.one/docs/dev/tutorials/migrating-to-v2) for more information.
+The following code shows an example of using the Integration API:
-```go
+```golang
package main
import (
@@ -213,6 +159,8 @@ func decodeHelper(propsMap map[string]interface{}, v interface{}) error {
### Management API
+The following code shows an example of using the Management API:
+
```golang
package main
@@ -261,9 +209,9 @@ func main() {
}
```
-## Documentation for API Endpoints
+## Documentation for API endpoints
-All URIs are relative to *https://yourbaseurl.talon.one*
+All URLs are relative to `https://yourbaseurl.talon.one`.
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
@@ -278,7 +226,7 @@ Class | Method | HTTP request | Description
*IntegrationApi* | [**GenerateLoyaltyCard**](docs/IntegrationApi.md#generateloyaltycard) | **Post** /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card
*IntegrationApi* | [**GetCustomerInventory**](docs/IntegrationApi.md#getcustomerinventory) | **Get** /v1/customer_profiles/{integrationId}/inventory | List customer data
*IntegrationApi* | [**GetCustomerSession**](docs/IntegrationApi.md#getcustomersession) | **Get** /v2/customer_sessions/{customerSessionId} | Get customer session
-*IntegrationApi* | [**GetLoyaltyBalances**](docs/IntegrationApi.md#getloyaltybalances) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points
+*IntegrationApi* | [**GetLoyaltyBalances**](docs/IntegrationApi.md#getloyaltybalances) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty balances
*IntegrationApi* | [**GetLoyaltyCardBalances**](docs/IntegrationApi.md#getloyaltycardbalances) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances | Get card's point balances
*IntegrationApi* | [**GetLoyaltyCardPoints**](docs/IntegrationApi.md#getloyaltycardpoints) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/points | List card's unused loyalty points
*IntegrationApi* | [**GetLoyaltyCardTransactions**](docs/IntegrationApi.md#getloyaltycardtransactions) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions | List card's transactions
@@ -355,7 +303,6 @@ Class | Method | HTTP request | Description
*ManagementApi* | [**GetAchievement**](docs/ManagementApi.md#getachievement) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Get achievement
*ManagementApi* | [**GetAdditionalCost**](docs/ManagementApi.md#getadditionalcost) | **Get** /v1/additional_costs/{additionalCostId} | Get additional cost
*ManagementApi* | [**GetAdditionalCosts**](docs/ManagementApi.md#getadditionalcosts) | **Get** /v1/additional_costs | List additional costs
-*ManagementApi* | [**GetAllAccessLogs**](docs/ManagementApi.md#getallaccesslogs) | **Get** /v1/access_logs | List access logs
*ManagementApi* | [**GetApplication**](docs/ManagementApi.md#getapplication) | **Get** /v1/applications/{applicationId} | Get Application
*ManagementApi* | [**GetApplicationApiHealth**](docs/ManagementApi.md#getapplicationapihealth) | **Get** /v1/applications/{applicationId}/health_report | Get Application health
*ManagementApi* | [**GetApplicationCustomer**](docs/ManagementApi.md#getapplicationcustomer) | **Get** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer
@@ -463,520 +410,530 @@ Class | Method | HTTP request | Description
*ManagementApi* | [**UpdateStore**](docs/ManagementApi.md#updatestore) | **Put** /v1/applications/{applicationId}/stores/{storeId} | Update store
*ManagementApi* | [**UpdateUser**](docs/ManagementApi.md#updateuser) | **Put** /v1/users/{userId} | Update user
-
-## Documentation For Models
-
- - [AcceptCouponEffectProps](docs/AcceptCouponEffectProps.md)
- - [AcceptReferralEffectProps](docs/AcceptReferralEffectProps.md)
- - [AccessLogEntry](docs/AccessLogEntry.md)
- - [Account](docs/Account.md)
- - [AccountAdditionalCost](docs/AccountAdditionalCost.md)
- - [AccountAnalytics](docs/AccountAnalytics.md)
- - [AccountDashboardStatistic](docs/AccountDashboardStatistic.md)
- - [AccountDashboardStatisticCampaigns](docs/AccountDashboardStatisticCampaigns.md)
- - [AccountDashboardStatisticDiscount](docs/AccountDashboardStatisticDiscount.md)
- - [AccountDashboardStatisticLoyaltyPoints](docs/AccountDashboardStatisticLoyaltyPoints.md)
- - [AccountDashboardStatisticReferrals](docs/AccountDashboardStatisticReferrals.md)
- - [AccountDashboardStatisticRevenue](docs/AccountDashboardStatisticRevenue.md)
- - [AccountEntity](docs/AccountEntity.md)
- - [AccountLimits](docs/AccountLimits.md)
- - [Achievement](docs/Achievement.md)
- - [AchievementAdditionalProperties](docs/AchievementAdditionalProperties.md)
- - [AchievementProgress](docs/AchievementProgress.md)
- - [ActivateUserRequest](docs/ActivateUserRequest.md)
- - [AddFreeItemEffectProps](docs/AddFreeItemEffectProps.md)
- - [AddItemCatalogAction](docs/AddItemCatalogAction.md)
- - [AddLoyaltyPoints](docs/AddLoyaltyPoints.md)
- - [AddLoyaltyPointsEffectProps](docs/AddLoyaltyPointsEffectProps.md)
- - [AddToAudienceEffectProps](docs/AddToAudienceEffectProps.md)
- - [AddedDeductedPointsNotificationPolicy](docs/AddedDeductedPointsNotificationPolicy.md)
- - [AdditionalCampaignProperties](docs/AdditionalCampaignProperties.md)
- - [AdditionalCost](docs/AdditionalCost.md)
- - [AnalyticsDataPoint](docs/AnalyticsDataPoint.md)
- - [AnalyticsDataPointWithTrend](docs/AnalyticsDataPointWithTrend.md)
- - [AnalyticsDataPointWithTrendAndInfluencedRate](docs/AnalyticsDataPointWithTrendAndInfluencedRate.md)
- - [AnalyticsDataPointWithTrendAndUplift](docs/AnalyticsDataPointWithTrendAndUplift.md)
- - [ApiError](docs/ApiError.md)
- - [Application](docs/Application.md)
- - [ApplicationAnalyticsDataPoint](docs/ApplicationAnalyticsDataPoint.md)
- - [ApplicationApiHealth](docs/ApplicationApiHealth.md)
- - [ApplicationApiKey](docs/ApplicationApiKey.md)
- - [ApplicationCampaignAnalytics](docs/ApplicationCampaignAnalytics.md)
- - [ApplicationCampaignStats](docs/ApplicationCampaignStats.md)
- - [ApplicationCif](docs/ApplicationCif.md)
- - [ApplicationCifExpression](docs/ApplicationCifExpression.md)
- - [ApplicationCustomer](docs/ApplicationCustomer.md)
- - [ApplicationCustomerEntity](docs/ApplicationCustomerEntity.md)
- - [ApplicationEntity](docs/ApplicationEntity.md)
- - [ApplicationEvent](docs/ApplicationEvent.md)
- - [ApplicationNotification](docs/ApplicationNotification.md)
- - [ApplicationReferee](docs/ApplicationReferee.md)
- - [ApplicationSession](docs/ApplicationSession.md)
- - [ApplicationSessionEntity](docs/ApplicationSessionEntity.md)
- - [ApplicationStoreEntity](docs/ApplicationStoreEntity.md)
- - [AsyncCouponCreationResponse](docs/AsyncCouponCreationResponse.md)
- - [AsyncCouponDeletionJobResponse](docs/AsyncCouponDeletionJobResponse.md)
- - [Attribute](docs/Attribute.md)
- - [AttributesMandatory](docs/AttributesMandatory.md)
- - [AttributesSettings](docs/AttributesSettings.md)
- - [Audience](docs/Audience.md)
- - [AudienceAnalytics](docs/AudienceAnalytics.md)
- - [AudienceCustomer](docs/AudienceCustomer.md)
- - [AudienceIntegrationId](docs/AudienceIntegrationId.md)
- - [AudienceMembership](docs/AudienceMembership.md)
- - [AwardGiveawayEffectProps](docs/AwardGiveawayEffectProps.md)
- - [BaseCampaign](docs/BaseCampaign.md)
- - [BaseLoyaltyProgram](docs/BaseLoyaltyProgram.md)
- - [BaseNotification](docs/BaseNotification.md)
- - [BaseNotificationEntity](docs/BaseNotificationEntity.md)
- - [BaseNotificationWebhook](docs/BaseNotificationWebhook.md)
- - [BaseNotifications](docs/BaseNotifications.md)
- - [BaseSamlConnection](docs/BaseSamlConnection.md)
- - [Binding](docs/Binding.md)
- - [BulkApplicationNotification](docs/BulkApplicationNotification.md)
- - [BulkCampaignNotification](docs/BulkCampaignNotification.md)
- - [BulkOperationOnCampaigns](docs/BulkOperationOnCampaigns.md)
- - [Campaign](docs/Campaign.md)
- - [CampaignActivationRequest](docs/CampaignActivationRequest.md)
- - [CampaignAnalytics](docs/CampaignAnalytics.md)
- - [CampaignBudget](docs/CampaignBudget.md)
- - [CampaignCollection](docs/CampaignCollection.md)
- - [CampaignCollectionEditedNotification](docs/CampaignCollectionEditedNotification.md)
- - [CampaignCollectionWithoutPayload](docs/CampaignCollectionWithoutPayload.md)
- - [CampaignCopy](docs/CampaignCopy.md)
- - [CampaignCreatedNotification](docs/CampaignCreatedNotification.md)
- - [CampaignDeletedNotification](docs/CampaignDeletedNotification.md)
- - [CampaignEditedNotification](docs/CampaignEditedNotification.md)
- - [CampaignEntity](docs/CampaignEntity.md)
- - [CampaignEvaluationGroup](docs/CampaignEvaluationGroup.md)
- - [CampaignEvaluationPosition](docs/CampaignEvaluationPosition.md)
- - [CampaignEvaluationTreeChangedNotification](docs/CampaignEvaluationTreeChangedNotification.md)
- - [CampaignGroup](docs/CampaignGroup.md)
- - [CampaignGroupEntity](docs/CampaignGroupEntity.md)
- - [CampaignNotification](docs/CampaignNotification.md)
- - [CampaignNotificationPolicy](docs/CampaignNotificationPolicy.md)
- - [CampaignRulesetChangedNotification](docs/CampaignRulesetChangedNotification.md)
- - [CampaignSearch](docs/CampaignSearch.md)
- - [CampaignSet](docs/CampaignSet.md)
- - [CampaignSetBranchNode](docs/CampaignSetBranchNode.md)
- - [CampaignSetLeafNode](docs/CampaignSetLeafNode.md)
- - [CampaignSetNode](docs/CampaignSetNode.md)
- - [CampaignStateChangedNotification](docs/CampaignStateChangedNotification.md)
- - [CampaignStoreBudget](docs/CampaignStoreBudget.md)
- - [CampaignTemplate](docs/CampaignTemplate.md)
- - [CampaignTemplateCollection](docs/CampaignTemplateCollection.md)
- - [CampaignTemplateParams](docs/CampaignTemplateParams.md)
- - [CampaignVersions](docs/CampaignVersions.md)
- - [CardAddedDeductedPointsNotificationPolicy](docs/CardAddedDeductedPointsNotificationPolicy.md)
- - [CardExpiringPointsNotificationPolicy](docs/CardExpiringPointsNotificationPolicy.md)
- - [CardExpiringPointsNotificationTrigger](docs/CardExpiringPointsNotificationTrigger.md)
- - [CardLedgerPointsEntryIntegrationApi](docs/CardLedgerPointsEntryIntegrationApi.md)
- - [CardLedgerTransactionLogEntry](docs/CardLedgerTransactionLogEntry.md)
- - [CardLedgerTransactionLogEntryIntegrationApi](docs/CardLedgerTransactionLogEntryIntegrationApi.md)
- - [CartItem](docs/CartItem.md)
- - [Catalog](docs/Catalog.md)
- - [CatalogAction](docs/CatalogAction.md)
- - [CatalogActionFilter](docs/CatalogActionFilter.md)
- - [CatalogItem](docs/CatalogItem.md)
- - [CatalogSyncRequest](docs/CatalogSyncRequest.md)
- - [CatalogsStrikethroughNotificationPolicy](docs/CatalogsStrikethroughNotificationPolicy.md)
- - [Change](docs/Change.md)
- - [ChangeLoyaltyTierLevelEffectProps](docs/ChangeLoyaltyTierLevelEffectProps.md)
- - [ChangeProfilePassword](docs/ChangeProfilePassword.md)
- - [CodeGeneratorSettings](docs/CodeGeneratorSettings.md)
- - [Collection](docs/Collection.md)
- - [CollectionItem](docs/CollectionItem.md)
- - [CollectionWithoutPayload](docs/CollectionWithoutPayload.md)
- - [Coupon](docs/Coupon.md)
- - [CouponConstraints](docs/CouponConstraints.md)
- - [CouponCreatedEffectProps](docs/CouponCreatedEffectProps.md)
- - [CouponCreationJob](docs/CouponCreationJob.md)
- - [CouponDeletionFilters](docs/CouponDeletionFilters.md)
- - [CouponDeletionJob](docs/CouponDeletionJob.md)
- - [CouponLimitConfigs](docs/CouponLimitConfigs.md)
- - [CouponRejectionReason](docs/CouponRejectionReason.md)
- - [CouponReservations](docs/CouponReservations.md)
- - [CouponSearch](docs/CouponSearch.md)
- - [CouponValue](docs/CouponValue.md)
- - [CouponsNotificationPolicy](docs/CouponsNotificationPolicy.md)
- - [CreateAchievement](docs/CreateAchievement.md)
- - [CreateApplicationApiKey](docs/CreateApplicationApiKey.md)
- - [CreateManagementKey](docs/CreateManagementKey.md)
- - [CreateTemplateCampaign](docs/CreateTemplateCampaign.md)
- - [CreateTemplateCampaignResponse](docs/CreateTemplateCampaignResponse.md)
- - [CustomEffect](docs/CustomEffect.md)
- - [CustomEffectProps](docs/CustomEffectProps.md)
- - [CustomerActivityReport](docs/CustomerActivityReport.md)
- - [CustomerAnalytics](docs/CustomerAnalytics.md)
- - [CustomerInventory](docs/CustomerInventory.md)
- - [CustomerProfile](docs/CustomerProfile.md)
- - [CustomerProfileAudienceRequest](docs/CustomerProfileAudienceRequest.md)
- - [CustomerProfileAudienceRequestItem](docs/CustomerProfileAudienceRequestItem.md)
- - [CustomerProfileIntegrationRequestV2](docs/CustomerProfileIntegrationRequestV2.md)
- - [CustomerProfileIntegrationResponseV2](docs/CustomerProfileIntegrationResponseV2.md)
- - [CustomerProfileSearchQuery](docs/CustomerProfileSearchQuery.md)
- - [CustomerProfileUpdateV2Response](docs/CustomerProfileUpdateV2Response.md)
- - [CustomerSession](docs/CustomerSession.md)
- - [CustomerSessionV2](docs/CustomerSessionV2.md)
- - [DeactivateUserRequest](docs/DeactivateUserRequest.md)
- - [DeductLoyaltyPoints](docs/DeductLoyaltyPoints.md)
- - [DeductLoyaltyPointsEffectProps](docs/DeductLoyaltyPointsEffectProps.md)
- - [DeleteUserRequest](docs/DeleteUserRequest.md)
- - [Effect](docs/Effect.md)
- - [EffectEntity](docs/EffectEntity.md)
- - [EmailEntity](docs/EmailEntity.md)
- - [Endpoint](docs/Endpoint.md)
- - [Entity](docs/Entity.md)
- - [EntityWithTalangVisibleId](docs/EntityWithTalangVisibleId.md)
- - [Environment](docs/Environment.md)
- - [ErrorEffectProps](docs/ErrorEffectProps.md)
- - [ErrorResponse](docs/ErrorResponse.md)
- - [ErrorResponseWithStatus](docs/ErrorResponseWithStatus.md)
- - [ErrorSource](docs/ErrorSource.md)
- - [EvaluableCampaignIds](docs/EvaluableCampaignIds.md)
- - [Event](docs/Event.md)
- - [EventType](docs/EventType.md)
- - [EventV2](docs/EventV2.md)
- - [ExpiringCouponsNotificationPolicy](docs/ExpiringCouponsNotificationPolicy.md)
- - [ExpiringCouponsNotificationTrigger](docs/ExpiringCouponsNotificationTrigger.md)
- - [ExpiringPointsNotificationPolicy](docs/ExpiringPointsNotificationPolicy.md)
- - [ExpiringPointsNotificationTrigger](docs/ExpiringPointsNotificationTrigger.md)
- - [Export](docs/Export.md)
- - [FeatureFlag](docs/FeatureFlag.md)
- - [FeaturesFeed](docs/FeaturesFeed.md)
- - [FuncArgDef](docs/FuncArgDef.md)
- - [FunctionDef](docs/FunctionDef.md)
- - [GenerateCampaignDescription](docs/GenerateCampaignDescription.md)
- - [GenerateCampaignTags](docs/GenerateCampaignTags.md)
- - [GenerateItemFilterDescription](docs/GenerateItemFilterDescription.md)
- - [GenerateLoyaltyCard](docs/GenerateLoyaltyCard.md)
- - [GenerateRuleTitle](docs/GenerateRuleTitle.md)
- - [GenerateRuleTitleRule](docs/GenerateRuleTitleRule.md)
- - [GetIntegrationCouponRequest](docs/GetIntegrationCouponRequest.md)
- - [Giveaway](docs/Giveaway.md)
- - [GiveawaysPool](docs/GiveawaysPool.md)
- - [IdentifiableEntity](docs/IdentifiableEntity.md)
- - [Import](docs/Import.md)
- - [ImportEntity](docs/ImportEntity.md)
- - [IncreaseAchievementProgressEffectProps](docs/IncreaseAchievementProgressEffectProps.md)
- - [InlineResponse200](docs/InlineResponse200.md)
- - [InlineResponse2001](docs/InlineResponse2001.md)
- - [InlineResponse20010](docs/InlineResponse20010.md)
- - [InlineResponse20011](docs/InlineResponse20011.md)
- - [InlineResponse20012](docs/InlineResponse20012.md)
- - [InlineResponse20013](docs/InlineResponse20013.md)
- - [InlineResponse20014](docs/InlineResponse20014.md)
- - [InlineResponse20015](docs/InlineResponse20015.md)
- - [InlineResponse20016](docs/InlineResponse20016.md)
- - [InlineResponse20017](docs/InlineResponse20017.md)
- - [InlineResponse20018](docs/InlineResponse20018.md)
- - [InlineResponse20019](docs/InlineResponse20019.md)
- - [InlineResponse2002](docs/InlineResponse2002.md)
- - [InlineResponse20020](docs/InlineResponse20020.md)
- - [InlineResponse20021](docs/InlineResponse20021.md)
- - [InlineResponse20022](docs/InlineResponse20022.md)
- - [InlineResponse20023](docs/InlineResponse20023.md)
- - [InlineResponse20024](docs/InlineResponse20024.md)
- - [InlineResponse20025](docs/InlineResponse20025.md)
- - [InlineResponse20026](docs/InlineResponse20026.md)
- - [InlineResponse20027](docs/InlineResponse20027.md)
- - [InlineResponse20028](docs/InlineResponse20028.md)
- - [InlineResponse20029](docs/InlineResponse20029.md)
- - [InlineResponse2003](docs/InlineResponse2003.md)
- - [InlineResponse20030](docs/InlineResponse20030.md)
- - [InlineResponse20031](docs/InlineResponse20031.md)
- - [InlineResponse20032](docs/InlineResponse20032.md)
- - [InlineResponse20033](docs/InlineResponse20033.md)
- - [InlineResponse20034](docs/InlineResponse20034.md)
- - [InlineResponse20035](docs/InlineResponse20035.md)
- - [InlineResponse20036](docs/InlineResponse20036.md)
- - [InlineResponse20037](docs/InlineResponse20037.md)
- - [InlineResponse20038](docs/InlineResponse20038.md)
- - [InlineResponse20039](docs/InlineResponse20039.md)
- - [InlineResponse2004](docs/InlineResponse2004.md)
- - [InlineResponse20040](docs/InlineResponse20040.md)
- - [InlineResponse20041](docs/InlineResponse20041.md)
- - [InlineResponse20042](docs/InlineResponse20042.md)
- - [InlineResponse20043](docs/InlineResponse20043.md)
- - [InlineResponse20044](docs/InlineResponse20044.md)
- - [InlineResponse20045](docs/InlineResponse20045.md)
- - [InlineResponse20046](docs/InlineResponse20046.md)
- - [InlineResponse20047](docs/InlineResponse20047.md)
- - [InlineResponse2005](docs/InlineResponse2005.md)
- - [InlineResponse2006](docs/InlineResponse2006.md)
- - [InlineResponse2007](docs/InlineResponse2007.md)
- - [InlineResponse2008](docs/InlineResponse2008.md)
- - [InlineResponse2009](docs/InlineResponse2009.md)
- - [InlineResponse201](docs/InlineResponse201.md)
- - [IntegrationCoupon](docs/IntegrationCoupon.md)
- - [IntegrationCustomerSessionResponse](docs/IntegrationCustomerSessionResponse.md)
- - [IntegrationEntity](docs/IntegrationEntity.md)
- - [IntegrationEvent](docs/IntegrationEvent.md)
- - [IntegrationEventV2Request](docs/IntegrationEventV2Request.md)
- - [IntegrationProfileEntity](docs/IntegrationProfileEntity.md)
- - [IntegrationRequest](docs/IntegrationRequest.md)
- - [IntegrationState](docs/IntegrationState.md)
- - [IntegrationStateV2](docs/IntegrationStateV2.md)
- - [IntegrationStoreEntity](docs/IntegrationStoreEntity.md)
- - [InventoryCoupon](docs/InventoryCoupon.md)
- - [InventoryReferral](docs/InventoryReferral.md)
- - [ItemAttribute](docs/ItemAttribute.md)
- - [LedgerEntry](docs/LedgerEntry.md)
- - [LedgerInfo](docs/LedgerInfo.md)
- - [LedgerPointsEntryIntegrationApi](docs/LedgerPointsEntryIntegrationApi.md)
- - [LedgerTransactionLogEntryIntegrationApi](docs/LedgerTransactionLogEntryIntegrationApi.md)
- - [LibraryAttribute](docs/LibraryAttribute.md)
- - [LimitConfig](docs/LimitConfig.md)
- - [LimitCounter](docs/LimitCounter.md)
- - [LoginParams](docs/LoginParams.md)
- - [Loyalty](docs/Loyalty.md)
- - [LoyaltyBalance](docs/LoyaltyBalance.md)
- - [LoyaltyBalanceWithTier](docs/LoyaltyBalanceWithTier.md)
- - [LoyaltyBalances](docs/LoyaltyBalances.md)
- - [LoyaltyBalancesWithTiers](docs/LoyaltyBalancesWithTiers.md)
- - [LoyaltyCard](docs/LoyaltyCard.md)
- - [LoyaltyCardBalances](docs/LoyaltyCardBalances.md)
- - [LoyaltyCardBatch](docs/LoyaltyCardBatch.md)
- - [LoyaltyCardBatchResponse](docs/LoyaltyCardBatchResponse.md)
- - [LoyaltyCardProfileRegistration](docs/LoyaltyCardProfileRegistration.md)
- - [LoyaltyCardRegistration](docs/LoyaltyCardRegistration.md)
- - [LoyaltyDashboardData](docs/LoyaltyDashboardData.md)
- - [LoyaltyDashboardPointsBreakdown](docs/LoyaltyDashboardPointsBreakdown.md)
- - [LoyaltyLedger](docs/LoyaltyLedger.md)
- - [LoyaltyLedgerEntry](docs/LoyaltyLedgerEntry.md)
- - [LoyaltyLedgerTransactions](docs/LoyaltyLedgerTransactions.md)
- - [LoyaltyMembership](docs/LoyaltyMembership.md)
- - [LoyaltyProgram](docs/LoyaltyProgram.md)
- - [LoyaltyProgramBalance](docs/LoyaltyProgramBalance.md)
- - [LoyaltyProgramEntity](docs/LoyaltyProgramEntity.md)
- - [LoyaltyProgramLedgers](docs/LoyaltyProgramLedgers.md)
- - [LoyaltyProgramTransaction](docs/LoyaltyProgramTransaction.md)
- - [LoyaltySubLedger](docs/LoyaltySubLedger.md)
- - [LoyaltyTier](docs/LoyaltyTier.md)
- - [ManagementKey](docs/ManagementKey.md)
- - [ManagerConfig](docs/ManagerConfig.md)
- - [MessageLogEntries](docs/MessageLogEntries.md)
- - [MessageLogEntry](docs/MessageLogEntry.md)
- - [MessageLogRequest](docs/MessageLogRequest.md)
- - [MessageLogResponse](docs/MessageLogResponse.md)
- - [Meta](docs/Meta.md)
- - [MultiApplicationEntity](docs/MultiApplicationEntity.md)
- - [MultipleAttribute](docs/MultipleAttribute.md)
- - [MultipleAudiences](docs/MultipleAudiences.md)
- - [MultipleAudiencesItem](docs/MultipleAudiencesItem.md)
- - [MultipleCustomerProfileIntegrationRequest](docs/MultipleCustomerProfileIntegrationRequest.md)
- - [MultipleCustomerProfileIntegrationRequestItem](docs/MultipleCustomerProfileIntegrationRequestItem.md)
- - [MultipleCustomerProfileIntegrationResponseV2](docs/MultipleCustomerProfileIntegrationResponseV2.md)
- - [MultipleNewAttribute](docs/MultipleNewAttribute.md)
- - [MultipleNewAudiences](docs/MultipleNewAudiences.md)
- - [MutableEntity](docs/MutableEntity.md)
- - [NewAccount](docs/NewAccount.md)
- - [NewAccountSignUp](docs/NewAccountSignUp.md)
- - [NewAdditionalCost](docs/NewAdditionalCost.md)
- - [NewAppWideCouponDeletionJob](docs/NewAppWideCouponDeletionJob.md)
- - [NewApplication](docs/NewApplication.md)
- - [NewApplicationApiKey](docs/NewApplicationApiKey.md)
- - [NewApplicationCif](docs/NewApplicationCif.md)
- - [NewApplicationCifExpression](docs/NewApplicationCifExpression.md)
- - [NewAttribute](docs/NewAttribute.md)
- - [NewAudience](docs/NewAudience.md)
- - [NewBaseNotification](docs/NewBaseNotification.md)
- - [NewCampaign](docs/NewCampaign.md)
- - [NewCampaignCollection](docs/NewCampaignCollection.md)
- - [NewCampaignEvaluationGroup](docs/NewCampaignEvaluationGroup.md)
- - [NewCampaignGroup](docs/NewCampaignGroup.md)
- - [NewCampaignSet](docs/NewCampaignSet.md)
- - [NewCampaignTemplate](docs/NewCampaignTemplate.md)
- - [NewCatalog](docs/NewCatalog.md)
- - [NewCollection](docs/NewCollection.md)
- - [NewCouponCreationJob](docs/NewCouponCreationJob.md)
- - [NewCouponDeletionJob](docs/NewCouponDeletionJob.md)
- - [NewCoupons](docs/NewCoupons.md)
- - [NewCouponsForMultipleRecipients](docs/NewCouponsForMultipleRecipients.md)
- - [NewCustomEffect](docs/NewCustomEffect.md)
- - [NewCustomerProfile](docs/NewCustomerProfile.md)
- - [NewCustomerSession](docs/NewCustomerSession.md)
- - [NewCustomerSessionV2](docs/NewCustomerSessionV2.md)
- - [NewEvent](docs/NewEvent.md)
- - [NewEventType](docs/NewEventType.md)
- - [NewExternalInvitation](docs/NewExternalInvitation.md)
- - [NewGiveawaysPool](docs/NewGiveawaysPool.md)
- - [NewInternalAudience](docs/NewInternalAudience.md)
- - [NewInvitation](docs/NewInvitation.md)
- - [NewInviteEmail](docs/NewInviteEmail.md)
- - [NewLoyaltyProgram](docs/NewLoyaltyProgram.md)
- - [NewLoyaltyTier](docs/NewLoyaltyTier.md)
- - [NewManagementKey](docs/NewManagementKey.md)
- - [NewMultipleAudiencesItem](docs/NewMultipleAudiencesItem.md)
- - [NewNotificationTest](docs/NewNotificationTest.md)
- - [NewNotificationWebhook](docs/NewNotificationWebhook.md)
- - [NewOutgoingIntegrationWebhook](docs/NewOutgoingIntegrationWebhook.md)
- - [NewPassword](docs/NewPassword.md)
- - [NewPasswordEmail](docs/NewPasswordEmail.md)
- - [NewPicklist](docs/NewPicklist.md)
- - [NewReferral](docs/NewReferral.md)
- - [NewReferralsForMultipleAdvocates](docs/NewReferralsForMultipleAdvocates.md)
- - [NewReturn](docs/NewReturn.md)
- - [NewRevisionVersion](docs/NewRevisionVersion.md)
- - [NewRole](docs/NewRole.md)
- - [NewRoleV2](docs/NewRoleV2.md)
- - [NewRuleset](docs/NewRuleset.md)
- - [NewSamlConnection](docs/NewSamlConnection.md)
- - [NewStore](docs/NewStore.md)
- - [NewTemplateDef](docs/NewTemplateDef.md)
- - [NewUser](docs/NewUser.md)
- - [NewWebhook](docs/NewWebhook.md)
- - [Notification](docs/Notification.md)
- - [NotificationActivation](docs/NotificationActivation.md)
- - [NotificationListItem](docs/NotificationListItem.md)
- - [NotificationTest](docs/NotificationTest.md)
- - [OktaEvent](docs/OktaEvent.md)
- - [OktaEventPayload](docs/OktaEventPayload.md)
- - [OktaEventPayloadData](docs/OktaEventPayloadData.md)
- - [OktaEventTarget](docs/OktaEventTarget.md)
- - [OneTimeCode](docs/OneTimeCode.md)
- - [OutgoingIntegrationBrazePolicy](docs/OutgoingIntegrationBrazePolicy.md)
- - [OutgoingIntegrationCleverTapPolicy](docs/OutgoingIntegrationCleverTapPolicy.md)
- - [OutgoingIntegrationConfiguration](docs/OutgoingIntegrationConfiguration.md)
- - [OutgoingIntegrationIterablePolicy](docs/OutgoingIntegrationIterablePolicy.md)
- - [OutgoingIntegrationMoEngagePolicy](docs/OutgoingIntegrationMoEngagePolicy.md)
- - [OutgoingIntegrationTemplate](docs/OutgoingIntegrationTemplate.md)
- - [OutgoingIntegrationTemplateWithConfigurationDetails](docs/OutgoingIntegrationTemplateWithConfigurationDetails.md)
- - [OutgoingIntegrationTemplates](docs/OutgoingIntegrationTemplates.md)
- - [OutgoingIntegrationType](docs/OutgoingIntegrationType.md)
- - [OutgoingIntegrationTypes](docs/OutgoingIntegrationTypes.md)
- - [PatchItemCatalogAction](docs/PatchItemCatalogAction.md)
- - [PatchManyItemsCatalogAction](docs/PatchManyItemsCatalogAction.md)
- - [PendingPointsNotificationPolicy](docs/PendingPointsNotificationPolicy.md)
- - [Picklist](docs/Picklist.md)
- - [Product](docs/Product.md)
- - [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md)
- - [ProjectedTier](docs/ProjectedTier.md)
- - [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md)
- - [Referral](docs/Referral.md)
- - [ReferralConstraints](docs/ReferralConstraints.md)
- - [ReferralCreatedEffectProps](docs/ReferralCreatedEffectProps.md)
- - [ReferralRejectionReason](docs/ReferralRejectionReason.md)
- - [RejectCouponEffectProps](docs/RejectCouponEffectProps.md)
- - [RejectReferralEffectProps](docs/RejectReferralEffectProps.md)
- - [RemoveFromAudienceEffectProps](docs/RemoveFromAudienceEffectProps.md)
- - [RemoveItemCatalogAction](docs/RemoveItemCatalogAction.md)
- - [RemoveManyItemsCatalogAction](docs/RemoveManyItemsCatalogAction.md)
- - [ReopenSessionResponse](docs/ReopenSessionResponse.md)
- - [ReserveCouponEffectProps](docs/ReserveCouponEffectProps.md)
- - [Return](docs/Return.md)
- - [ReturnIntegrationRequest](docs/ReturnIntegrationRequest.md)
- - [ReturnedCartItem](docs/ReturnedCartItem.md)
- - [Revision](docs/Revision.md)
- - [RevisionActivation](docs/RevisionActivation.md)
- - [RevisionVersion](docs/RevisionVersion.md)
- - [Role](docs/Role.md)
- - [RoleAssign](docs/RoleAssign.md)
- - [RoleMembership](docs/RoleMembership.md)
- - [RoleV2](docs/RoleV2.md)
- - [RoleV2ApplicationDetails](docs/RoleV2ApplicationDetails.md)
- - [RoleV2Base](docs/RoleV2Base.md)
- - [RoleV2PermissionSet](docs/RoleV2PermissionSet.md)
- - [RoleV2Permissions](docs/RoleV2Permissions.md)
- - [RoleV2RolesGroup](docs/RoleV2RolesGroup.md)
- - [RollbackAddedLoyaltyPointsEffectProps](docs/RollbackAddedLoyaltyPointsEffectProps.md)
- - [RollbackCouponEffectProps](docs/RollbackCouponEffectProps.md)
- - [RollbackDeductedLoyaltyPointsEffectProps](docs/RollbackDeductedLoyaltyPointsEffectProps.md)
- - [RollbackDiscountEffectProps](docs/RollbackDiscountEffectProps.md)
- - [RollbackIncreasedAchievementProgressEffectProps](docs/RollbackIncreasedAchievementProgressEffectProps.md)
- - [RollbackReferralEffectProps](docs/RollbackReferralEffectProps.md)
- - [Rule](docs/Rule.md)
- - [RuleFailureReason](docs/RuleFailureReason.md)
- - [Ruleset](docs/Ruleset.md)
- - [SamlConnection](docs/SamlConnection.md)
- - [SamlConnectionInternal](docs/SamlConnectionInternal.md)
- - [SamlConnectionMetadata](docs/SamlConnectionMetadata.md)
- - [SamlLoginEndpoint](docs/SamlLoginEndpoint.md)
- - [ScimBaseUser](docs/ScimBaseUser.md)
- - [ScimBaseUserName](docs/ScimBaseUserName.md)
- - [ScimNewUser](docs/ScimNewUser.md)
- - [ScimPatchOperation](docs/ScimPatchOperation.md)
- - [ScimPatchRequest](docs/ScimPatchRequest.md)
- - [ScimResource](docs/ScimResource.md)
- - [ScimResourceTypesListResponse](docs/ScimResourceTypesListResponse.md)
- - [ScimSchemaResource](docs/ScimSchemaResource.md)
- - [ScimSchemasListResponse](docs/ScimSchemasListResponse.md)
- - [ScimServiceProviderConfigResponse](docs/ScimServiceProviderConfigResponse.md)
- - [ScimServiceProviderConfigResponseBulk](docs/ScimServiceProviderConfigResponseBulk.md)
- - [ScimServiceProviderConfigResponseChangePassword](docs/ScimServiceProviderConfigResponseChangePassword.md)
- - [ScimServiceProviderConfigResponseFilter](docs/ScimServiceProviderConfigResponseFilter.md)
- - [ScimServiceProviderConfigResponsePatch](docs/ScimServiceProviderConfigResponsePatch.md)
- - [ScimUser](docs/ScimUser.md)
- - [ScimUsersListResponse](docs/ScimUsersListResponse.md)
- - [Session](docs/Session.md)
- - [SetDiscountEffectProps](docs/SetDiscountEffectProps.md)
- - [SetDiscountPerAdditionalCostEffectProps](docs/SetDiscountPerAdditionalCostEffectProps.md)
- - [SetDiscountPerAdditionalCostPerItemEffectProps](docs/SetDiscountPerAdditionalCostPerItemEffectProps.md)
- - [SetDiscountPerItemEffectProps](docs/SetDiscountPerItemEffectProps.md)
- - [ShowBundleMetadataEffectProps](docs/ShowBundleMetadataEffectProps.md)
- - [ShowNotificationEffectProps](docs/ShowNotificationEffectProps.md)
- - [SlotDef](docs/SlotDef.md)
- - [SsoConfig](docs/SsoConfig.md)
- - [Store](docs/Store.md)
- - [StrikethroughChangedItem](docs/StrikethroughChangedItem.md)
- - [StrikethroughCustomEffectPerItemProps](docs/StrikethroughCustomEffectPerItemProps.md)
- - [StrikethroughEffect](docs/StrikethroughEffect.md)
- - [StrikethroughLabelingNotification](docs/StrikethroughLabelingNotification.md)
- - [StrikethroughSetDiscountPerItemEffectProps](docs/StrikethroughSetDiscountPerItemEffectProps.md)
- - [StrikethroughTrigger](docs/StrikethroughTrigger.md)
- - [TalangAttribute](docs/TalangAttribute.md)
- - [TalangAttributeVisibility](docs/TalangAttributeVisibility.md)
- - [TemplateArgDef](docs/TemplateArgDef.md)
- - [TemplateDef](docs/TemplateDef.md)
- - [TemplateLimitConfig](docs/TemplateLimitConfig.md)
- - [Tier](docs/Tier.md)
- - [TierDowngradeNotificationPolicy](docs/TierDowngradeNotificationPolicy.md)
- - [TierUpgradeNotificationPolicy](docs/TierUpgradeNotificationPolicy.md)
- - [TierWillDowngradeNotificationPolicy](docs/TierWillDowngradeNotificationPolicy.md)
- - [TierWillDowngradeNotificationTrigger](docs/TierWillDowngradeNotificationTrigger.md)
- - [TimePoint](docs/TimePoint.md)
- - [TrackEventV2Response](docs/TrackEventV2Response.md)
- - [TransferLoyaltyCard](docs/TransferLoyaltyCard.md)
- - [TriggerWebhookEffectProps](docs/TriggerWebhookEffectProps.md)
- - [TwoFaConfig](docs/TwoFaConfig.md)
- - [UpdateAccount](docs/UpdateAccount.md)
- - [UpdateAchievement](docs/UpdateAchievement.md)
- - [UpdateApplication](docs/UpdateApplication.md)
- - [UpdateApplicationApiKey](docs/UpdateApplicationApiKey.md)
- - [UpdateApplicationCif](docs/UpdateApplicationCif.md)
- - [UpdateAttributeEffectProps](docs/UpdateAttributeEffectProps.md)
- - [UpdateAudience](docs/UpdateAudience.md)
- - [UpdateCampaign](docs/UpdateCampaign.md)
- - [UpdateCampaignCollection](docs/UpdateCampaignCollection.md)
- - [UpdateCampaignEvaluationGroup](docs/UpdateCampaignEvaluationGroup.md)
- - [UpdateCampaignGroup](docs/UpdateCampaignGroup.md)
- - [UpdateCampaignTemplate](docs/UpdateCampaignTemplate.md)
- - [UpdateCatalog](docs/UpdateCatalog.md)
- - [UpdateCollection](docs/UpdateCollection.md)
- - [UpdateCoupon](docs/UpdateCoupon.md)
- - [UpdateCouponBatch](docs/UpdateCouponBatch.md)
- - [UpdateCustomEffect](docs/UpdateCustomEffect.md)
- - [UpdateLoyaltyCard](docs/UpdateLoyaltyCard.md)
- - [UpdateLoyaltyProgram](docs/UpdateLoyaltyProgram.md)
- - [UpdatePicklist](docs/UpdatePicklist.md)
- - [UpdateReferral](docs/UpdateReferral.md)
- - [UpdateReferralBatch](docs/UpdateReferralBatch.md)
- - [UpdateRole](docs/UpdateRole.md)
- - [UpdateRoleV2](docs/UpdateRoleV2.md)
- - [UpdateStore](docs/UpdateStore.md)
- - [UpdateUser](docs/UpdateUser.md)
- - [User](docs/User.md)
- - [UserEntity](docs/UserEntity.md)
- - [Webhook](docs/Webhook.md)
- - [WebhookActivationLogEntry](docs/WebhookActivationLogEntry.md)
- - [WebhookLogEntry](docs/WebhookLogEntry.md)
- - [WebhookWithOutgoingIntegrationDetails](docs/WebhookWithOutgoingIntegrationDetails.md)
- - [WillAwardGiveawayEffectProps](docs/WillAwardGiveawayEffectProps.md)
-
-
-## Documentation For Authorization
-
-
+## Documentation for models
+
+- [AcceptCouponEffectProps](docs/AcceptCouponEffectProps.md)
+- [AcceptReferralEffectProps](docs/AcceptReferralEffectProps.md)
+- [AccessLogEntry](docs/AccessLogEntry.md)
+- [Account](docs/Account.md)
+- [AccountAdditionalCost](docs/AccountAdditionalCost.md)
+- [AccountAnalytics](docs/AccountAnalytics.md)
+- [AccountDashboardStatistic](docs/AccountDashboardStatistic.md)
+- [AccountDashboardStatisticCampaigns](docs/AccountDashboardStatisticCampaigns.md)
+- [AccountDashboardStatisticDiscount](docs/AccountDashboardStatisticDiscount.md)
+- [AccountDashboardStatisticLoyaltyPoints](docs/AccountDashboardStatisticLoyaltyPoints.md)
+- [AccountDashboardStatisticReferrals](docs/AccountDashboardStatisticReferrals.md)
+- [AccountDashboardStatisticRevenue](docs/AccountDashboardStatisticRevenue.md)
+- [AccountEntity](docs/AccountEntity.md)
+- [AccountLimits](docs/AccountLimits.md)
+- [Achievement](docs/Achievement.md)
+- [AchievementAdditionalProperties](docs/AchievementAdditionalProperties.md)
+- [AchievementProgress](docs/AchievementProgress.md)
+- [ActivateUserRequest](docs/ActivateUserRequest.md)
+- [AddFreeItemEffectProps](docs/AddFreeItemEffectProps.md)
+- [AddItemCatalogAction](docs/AddItemCatalogAction.md)
+- [AddLoyaltyPoints](docs/AddLoyaltyPoints.md)
+- [AddLoyaltyPointsEffectProps](docs/AddLoyaltyPointsEffectProps.md)
+- [AddToAudienceEffectProps](docs/AddToAudienceEffectProps.md)
+- [AddedDeductedPointsNotificationPolicy](docs/AddedDeductedPointsNotificationPolicy.md)
+- [AdditionalCampaignProperties](docs/AdditionalCampaignProperties.md)
+- [AdditionalCost](docs/AdditionalCost.md)
+- [AnalyticsDataPoint](docs/AnalyticsDataPoint.md)
+- [AnalyticsDataPointWithTrend](docs/AnalyticsDataPointWithTrend.md)
+- [AnalyticsDataPointWithTrendAndInfluencedRate](docs/AnalyticsDataPointWithTrendAndInfluencedRate.md)
+- [AnalyticsDataPointWithTrendAndUplift](docs/AnalyticsDataPointWithTrendAndUplift.md)
+- [AnalyticsProduct](docs/AnalyticsProduct.md)
+- [AnalyticsProductSku](docs/AnalyticsProductSku.md)
+- [ApiError](docs/ApiError.md)
+- [Application](docs/Application.md)
+- [ApplicationAnalyticsDataPoint](docs/ApplicationAnalyticsDataPoint.md)
+- [ApplicationApiHealth](docs/ApplicationApiHealth.md)
+- [ApplicationApiKey](docs/ApplicationApiKey.md)
+- [ApplicationCampaignAnalytics](docs/ApplicationCampaignAnalytics.md)
+- [ApplicationCampaignStats](docs/ApplicationCampaignStats.md)
+- [ApplicationCif](docs/ApplicationCif.md)
+- [ApplicationCifExpression](docs/ApplicationCifExpression.md)
+- [ApplicationCustomer](docs/ApplicationCustomer.md)
+- [ApplicationCustomerEntity](docs/ApplicationCustomerEntity.md)
+- [ApplicationEntity](docs/ApplicationEntity.md)
+- [ApplicationEvent](docs/ApplicationEvent.md)
+- [ApplicationNotification](docs/ApplicationNotification.md)
+- [ApplicationReferee](docs/ApplicationReferee.md)
+- [ApplicationSession](docs/ApplicationSession.md)
+- [ApplicationSessionEntity](docs/ApplicationSessionEntity.md)
+- [ApplicationStoreEntity](docs/ApplicationStoreEntity.md)
+- [AsyncCouponCreationResponse](docs/AsyncCouponCreationResponse.md)
+- [AsyncCouponDeletionJobResponse](docs/AsyncCouponDeletionJobResponse.md)
+- [Attribute](docs/Attribute.md)
+- [AttributesMandatory](docs/AttributesMandatory.md)
+- [AttributesSettings](docs/AttributesSettings.md)
+- [Audience](docs/Audience.md)
+- [AudienceAnalytics](docs/AudienceAnalytics.md)
+- [AudienceCustomer](docs/AudienceCustomer.md)
+- [AudienceIntegrationId](docs/AudienceIntegrationId.md)
+- [AudienceMembership](docs/AudienceMembership.md)
+- [AwardGiveawayEffectProps](docs/AwardGiveawayEffectProps.md)
+- [BaseCampaign](docs/BaseCampaign.md)
+- [BaseLoyaltyProgram](docs/BaseLoyaltyProgram.md)
+- [BaseNotification](docs/BaseNotification.md)
+- [BaseNotificationEntity](docs/BaseNotificationEntity.md)
+- [BaseNotificationWebhook](docs/BaseNotificationWebhook.md)
+- [BaseNotifications](docs/BaseNotifications.md)
+- [BaseSamlConnection](docs/BaseSamlConnection.md)
+- [Binding](docs/Binding.md)
+- [BulkApplicationNotification](docs/BulkApplicationNotification.md)
+- [BulkCampaignNotification](docs/BulkCampaignNotification.md)
+- [BulkOperationOnCampaigns](docs/BulkOperationOnCampaigns.md)
+- [Campaign](docs/Campaign.md)
+- [CampaignActivationRequest](docs/CampaignActivationRequest.md)
+- [CampaignAnalytics](docs/CampaignAnalytics.md)
+- [CampaignBudget](docs/CampaignBudget.md)
+- [CampaignCollection](docs/CampaignCollection.md)
+- [CampaignCollectionEditedNotification](docs/CampaignCollectionEditedNotification.md)
+- [CampaignCollectionWithoutPayload](docs/CampaignCollectionWithoutPayload.md)
+- [CampaignCopy](docs/CampaignCopy.md)
+- [CampaignCreatedNotification](docs/CampaignCreatedNotification.md)
+- [CampaignDeletedNotification](docs/CampaignDeletedNotification.md)
+- [CampaignEditedNotification](docs/CampaignEditedNotification.md)
+- [CampaignEntity](docs/CampaignEntity.md)
+- [CampaignEvaluationGroup](docs/CampaignEvaluationGroup.md)
+- [CampaignEvaluationPosition](docs/CampaignEvaluationPosition.md)
+- [CampaignEvaluationTreeChangedNotification](docs/CampaignEvaluationTreeChangedNotification.md)
+- [CampaignGroup](docs/CampaignGroup.md)
+- [CampaignGroupEntity](docs/CampaignGroupEntity.md)
+- [CampaignNotification](docs/CampaignNotification.md)
+- [CampaignNotificationPolicy](docs/CampaignNotificationPolicy.md)
+- [CampaignRulesetChangedNotification](docs/CampaignRulesetChangedNotification.md)
+- [CampaignSearch](docs/CampaignSearch.md)
+- [CampaignSet](docs/CampaignSet.md)
+- [CampaignSetBranchNode](docs/CampaignSetBranchNode.md)
+- [CampaignSetLeafNode](docs/CampaignSetLeafNode.md)
+- [CampaignSetNode](docs/CampaignSetNode.md)
+- [CampaignStateChangedNotification](docs/CampaignStateChangedNotification.md)
+- [CampaignStoreBudget](docs/CampaignStoreBudget.md)
+- [CampaignTemplate](docs/CampaignTemplate.md)
+- [CampaignTemplateCollection](docs/CampaignTemplateCollection.md)
+- [CampaignTemplateCouponReservationSettings](docs/CampaignTemplateCouponReservationSettings.md)
+- [CampaignTemplateParams](docs/CampaignTemplateParams.md)
+- [CampaignVersions](docs/CampaignVersions.md)
+- [CardAddedDeductedPointsNotificationPolicy](docs/CardAddedDeductedPointsNotificationPolicy.md)
+- [CardExpiringPointsNotificationPolicy](docs/CardExpiringPointsNotificationPolicy.md)
+- [CardExpiringPointsNotificationTrigger](docs/CardExpiringPointsNotificationTrigger.md)
+- [CardLedgerPointsEntryIntegrationApi](docs/CardLedgerPointsEntryIntegrationApi.md)
+- [CardLedgerTransactionLogEntry](docs/CardLedgerTransactionLogEntry.md)
+- [CardLedgerTransactionLogEntryIntegrationApi](docs/CardLedgerTransactionLogEntryIntegrationApi.md)
+- [CartItem](docs/CartItem.md)
+- [Catalog](docs/Catalog.md)
+- [CatalogAction](docs/CatalogAction.md)
+- [CatalogActionFilter](docs/CatalogActionFilter.md)
+- [CatalogItem](docs/CatalogItem.md)
+- [CatalogSyncRequest](docs/CatalogSyncRequest.md)
+- [CatalogsStrikethroughNotificationPolicy](docs/CatalogsStrikethroughNotificationPolicy.md)
+- [Change](docs/Change.md)
+- [ChangeLoyaltyTierLevelEffectProps](docs/ChangeLoyaltyTierLevelEffectProps.md)
+- [ChangeProfilePassword](docs/ChangeProfilePassword.md)
+- [CodeGeneratorSettings](docs/CodeGeneratorSettings.md)
+- [Collection](docs/Collection.md)
+- [CollectionItem](docs/CollectionItem.md)
+- [CollectionWithoutPayload](docs/CollectionWithoutPayload.md)
+- [Coupon](docs/Coupon.md)
+- [CouponConstraints](docs/CouponConstraints.md)
+- [CouponCreatedEffectProps](docs/CouponCreatedEffectProps.md)
+- [CouponCreationJob](docs/CouponCreationJob.md)
+- [CouponDeletionFilters](docs/CouponDeletionFilters.md)
+- [CouponDeletionJob](docs/CouponDeletionJob.md)
+- [CouponLimitConfigs](docs/CouponLimitConfigs.md)
+- [CouponRejectionReason](docs/CouponRejectionReason.md)
+- [CouponReservations](docs/CouponReservations.md)
+- [CouponSearch](docs/CouponSearch.md)
+- [CouponValue](docs/CouponValue.md)
+- [CouponsNotificationPolicy](docs/CouponsNotificationPolicy.md)
+- [CreateAchievement](docs/CreateAchievement.md)
+- [CreateApplicationApiKey](docs/CreateApplicationApiKey.md)
+- [CreateManagementKey](docs/CreateManagementKey.md)
+- [CreateTemplateCampaign](docs/CreateTemplateCampaign.md)
+- [CreateTemplateCampaignResponse](docs/CreateTemplateCampaignResponse.md)
+- [CustomEffect](docs/CustomEffect.md)
+- [CustomEffectProps](docs/CustomEffectProps.md)
+- [CustomerActivityReport](docs/CustomerActivityReport.md)
+- [CustomerAnalytics](docs/CustomerAnalytics.md)
+- [CustomerInventory](docs/CustomerInventory.md)
+- [CustomerProfile](docs/CustomerProfile.md)
+- [CustomerProfileAudienceRequest](docs/CustomerProfileAudienceRequest.md)
+- [CustomerProfileAudienceRequestItem](docs/CustomerProfileAudienceRequestItem.md)
+- [CustomerProfileIntegrationRequestV2](docs/CustomerProfileIntegrationRequestV2.md)
+- [CustomerProfileIntegrationResponseV2](docs/CustomerProfileIntegrationResponseV2.md)
+- [CustomerProfileSearchQuery](docs/CustomerProfileSearchQuery.md)
+- [CustomerProfileUpdateV2Response](docs/CustomerProfileUpdateV2Response.md)
+- [CustomerSession](docs/CustomerSession.md)
+- [CustomerSessionV2](docs/CustomerSessionV2.md)
+- [DeactivateUserRequest](docs/DeactivateUserRequest.md)
+- [DeductLoyaltyPoints](docs/DeductLoyaltyPoints.md)
+- [DeductLoyaltyPointsEffectProps](docs/DeductLoyaltyPointsEffectProps.md)
+- [DeleteUserRequest](docs/DeleteUserRequest.md)
+- [Effect](docs/Effect.md)
+- [EffectEntity](docs/EffectEntity.md)
+- [EmailEntity](docs/EmailEntity.md)
+- [Endpoint](docs/Endpoint.md)
+- [Entity](docs/Entity.md)
+- [EntityWithTalangVisibleId](docs/EntityWithTalangVisibleId.md)
+- [Environment](docs/Environment.md)
+- [ErrorEffectProps](docs/ErrorEffectProps.md)
+- [ErrorResponse](docs/ErrorResponse.md)
+- [ErrorResponseWithStatus](docs/ErrorResponseWithStatus.md)
+- [ErrorSource](docs/ErrorSource.md)
+- [EvaluableCampaignIds](docs/EvaluableCampaignIds.md)
+- [Event](docs/Event.md)
+- [EventType](docs/EventType.md)
+- [EventV2](docs/EventV2.md)
+- [ExpiringCouponsNotificationPolicy](docs/ExpiringCouponsNotificationPolicy.md)
+- [ExpiringCouponsNotificationTrigger](docs/ExpiringCouponsNotificationTrigger.md)
+- [ExpiringPointsNotificationPolicy](docs/ExpiringPointsNotificationPolicy.md)
+- [ExpiringPointsNotificationTrigger](docs/ExpiringPointsNotificationTrigger.md)
+- [Export](docs/Export.md)
+- [FeatureFlag](docs/FeatureFlag.md)
+- [FeaturesFeed](docs/FeaturesFeed.md)
+- [FuncArgDef](docs/FuncArgDef.md)
+- [FunctionDef](docs/FunctionDef.md)
+- [GenerateCampaignDescription](docs/GenerateCampaignDescription.md)
+- [GenerateCampaignTags](docs/GenerateCampaignTags.md)
+- [GenerateItemFilterDescription](docs/GenerateItemFilterDescription.md)
+- [GenerateLoyaltyCard](docs/GenerateLoyaltyCard.md)
+- [GenerateRuleTitle](docs/GenerateRuleTitle.md)
+- [GenerateRuleTitleRule](docs/GenerateRuleTitleRule.md)
+- [GetIntegrationCouponRequest](docs/GetIntegrationCouponRequest.md)
+- [Giveaway](docs/Giveaway.md)
+- [GiveawaysPool](docs/GiveawaysPool.md)
+- [IdentifiableEntity](docs/IdentifiableEntity.md)
+- [Import](docs/Import.md)
+- [ImportEntity](docs/ImportEntity.md)
+- [IncreaseAchievementProgressEffectProps](docs/IncreaseAchievementProgressEffectProps.md)
+- [InlineResponse200](docs/InlineResponse200.md)
+- [InlineResponse2001](docs/InlineResponse2001.md)
+- [InlineResponse20010](docs/InlineResponse20010.md)
+- [InlineResponse20011](docs/InlineResponse20011.md)
+- [InlineResponse20012](docs/InlineResponse20012.md)
+- [InlineResponse20013](docs/InlineResponse20013.md)
+- [InlineResponse20014](docs/InlineResponse20014.md)
+- [InlineResponse20015](docs/InlineResponse20015.md)
+- [InlineResponse20016](docs/InlineResponse20016.md)
+- [InlineResponse20017](docs/InlineResponse20017.md)
+- [InlineResponse20018](docs/InlineResponse20018.md)
+- [InlineResponse20019](docs/InlineResponse20019.md)
+- [InlineResponse2002](docs/InlineResponse2002.md)
+- [InlineResponse20020](docs/InlineResponse20020.md)
+- [InlineResponse20021](docs/InlineResponse20021.md)
+- [InlineResponse20022](docs/InlineResponse20022.md)
+- [InlineResponse20023](docs/InlineResponse20023.md)
+- [InlineResponse20024](docs/InlineResponse20024.md)
+- [InlineResponse20025](docs/InlineResponse20025.md)
+- [InlineResponse20026](docs/InlineResponse20026.md)
+- [InlineResponse20027](docs/InlineResponse20027.md)
+- [InlineResponse20028](docs/InlineResponse20028.md)
+- [InlineResponse20029](docs/InlineResponse20029.md)
+- [InlineResponse2003](docs/InlineResponse2003.md)
+- [InlineResponse20030](docs/InlineResponse20030.md)
+- [InlineResponse20031](docs/InlineResponse20031.md)
+- [InlineResponse20032](docs/InlineResponse20032.md)
+- [InlineResponse20033](docs/InlineResponse20033.md)
+- [InlineResponse20034](docs/InlineResponse20034.md)
+- [InlineResponse20035](docs/InlineResponse20035.md)
+- [InlineResponse20036](docs/InlineResponse20036.md)
+- [InlineResponse20037](docs/InlineResponse20037.md)
+- [InlineResponse20038](docs/InlineResponse20038.md)
+- [InlineResponse20039](docs/InlineResponse20039.md)
+- [InlineResponse2004](docs/InlineResponse2004.md)
+- [InlineResponse20040](docs/InlineResponse20040.md)
+- [InlineResponse20041](docs/InlineResponse20041.md)
+- [InlineResponse20042](docs/InlineResponse20042.md)
+- [InlineResponse20043](docs/InlineResponse20043.md)
+- [InlineResponse20044](docs/InlineResponse20044.md)
+- [InlineResponse20045](docs/InlineResponse20045.md)
+- [InlineResponse20046](docs/InlineResponse20046.md)
+- [InlineResponse2005](docs/InlineResponse2005.md)
+- [InlineResponse2006](docs/InlineResponse2006.md)
+- [InlineResponse2007](docs/InlineResponse2007.md)
+- [InlineResponse2008](docs/InlineResponse2008.md)
+- [InlineResponse2009](docs/InlineResponse2009.md)
+- [InlineResponse201](docs/InlineResponse201.md)
+- [IntegrationCoupon](docs/IntegrationCoupon.md)
+- [IntegrationCustomerSessionResponse](docs/IntegrationCustomerSessionResponse.md)
+- [IntegrationEntity](docs/IntegrationEntity.md)
+- [IntegrationEvent](docs/IntegrationEvent.md)
+- [IntegrationEventV2Request](docs/IntegrationEventV2Request.md)
+- [IntegrationProfileEntity](docs/IntegrationProfileEntity.md)
+- [IntegrationRequest](docs/IntegrationRequest.md)
+- [IntegrationState](docs/IntegrationState.md)
+- [IntegrationStateV2](docs/IntegrationStateV2.md)
+- [IntegrationStoreEntity](docs/IntegrationStoreEntity.md)
+- [InventoryCoupon](docs/InventoryCoupon.md)
+- [InventoryReferral](docs/InventoryReferral.md)
+- [ItemAttribute](docs/ItemAttribute.md)
+- [LedgerEntry](docs/LedgerEntry.md)
+- [LedgerInfo](docs/LedgerInfo.md)
+- [LedgerPointsEntryIntegrationApi](docs/LedgerPointsEntryIntegrationApi.md)
+- [LedgerTransactionLogEntryIntegrationApi](docs/LedgerTransactionLogEntryIntegrationApi.md)
+- [LibraryAttribute](docs/LibraryAttribute.md)
+- [LimitConfig](docs/LimitConfig.md)
+- [LimitCounter](docs/LimitCounter.md)
+- [ListCampaignStoreBudgets](docs/ListCampaignStoreBudgets.md)
+- [ListCampaignStoreBudgetsStore](docs/ListCampaignStoreBudgetsStore.md)
+- [LoginParams](docs/LoginParams.md)
+- [Loyalty](docs/Loyalty.md)
+- [LoyaltyBalance](docs/LoyaltyBalance.md)
+- [LoyaltyBalanceWithTier](docs/LoyaltyBalanceWithTier.md)
+- [LoyaltyBalances](docs/LoyaltyBalances.md)
+- [LoyaltyBalancesWithTiers](docs/LoyaltyBalancesWithTiers.md)
+- [LoyaltyCard](docs/LoyaltyCard.md)
+- [LoyaltyCardBalances](docs/LoyaltyCardBalances.md)
+- [LoyaltyCardBatch](docs/LoyaltyCardBatch.md)
+- [LoyaltyCardBatchResponse](docs/LoyaltyCardBatchResponse.md)
+- [LoyaltyCardProfileRegistration](docs/LoyaltyCardProfileRegistration.md)
+- [LoyaltyCardRegistration](docs/LoyaltyCardRegistration.md)
+- [LoyaltyDashboardData](docs/LoyaltyDashboardData.md)
+- [LoyaltyDashboardPointsBreakdown](docs/LoyaltyDashboardPointsBreakdown.md)
+- [LoyaltyLedger](docs/LoyaltyLedger.md)
+- [LoyaltyLedgerEntry](docs/LoyaltyLedgerEntry.md)
+- [LoyaltyLedgerTransactions](docs/LoyaltyLedgerTransactions.md)
+- [LoyaltyMembership](docs/LoyaltyMembership.md)
+- [LoyaltyProgram](docs/LoyaltyProgram.md)
+- [LoyaltyProgramBalance](docs/LoyaltyProgramBalance.md)
+- [LoyaltyProgramEntity](docs/LoyaltyProgramEntity.md)
+- [LoyaltyProgramLedgers](docs/LoyaltyProgramLedgers.md)
+- [LoyaltyProgramTransaction](docs/LoyaltyProgramTransaction.md)
+- [LoyaltySubLedger](docs/LoyaltySubLedger.md)
+- [LoyaltyTier](docs/LoyaltyTier.md)
+- [ManagementKey](docs/ManagementKey.md)
+- [ManagerConfig](docs/ManagerConfig.md)
+- [MessageLogEntries](docs/MessageLogEntries.md)
+- [MessageLogEntry](docs/MessageLogEntry.md)
+- [MessageLogRequest](docs/MessageLogRequest.md)
+- [MessageLogResponse](docs/MessageLogResponse.md)
+- [Meta](docs/Meta.md)
+- [MultiApplicationEntity](docs/MultiApplicationEntity.md)
+- [MultipleAttribute](docs/MultipleAttribute.md)
+- [MultipleAudiences](docs/MultipleAudiences.md)
+- [MultipleAudiencesItem](docs/MultipleAudiencesItem.md)
+- [MultipleCustomerProfileIntegrationRequest](docs/MultipleCustomerProfileIntegrationRequest.md)
+- [MultipleCustomerProfileIntegrationRequestItem](docs/MultipleCustomerProfileIntegrationRequestItem.md)
+- [MultipleCustomerProfileIntegrationResponseV2](docs/MultipleCustomerProfileIntegrationResponseV2.md)
+- [MultipleNewAttribute](docs/MultipleNewAttribute.md)
+- [MultipleNewAudiences](docs/MultipleNewAudiences.md)
+- [MutableEntity](docs/MutableEntity.md)
+- [NewAccount](docs/NewAccount.md)
+- [NewAccountSignUp](docs/NewAccountSignUp.md)
+- [NewAdditionalCost](docs/NewAdditionalCost.md)
+- [NewAppWideCouponDeletionJob](docs/NewAppWideCouponDeletionJob.md)
+- [NewApplication](docs/NewApplication.md)
+- [NewApplicationApiKey](docs/NewApplicationApiKey.md)
+- [NewApplicationCif](docs/NewApplicationCif.md)
+- [NewApplicationCifExpression](docs/NewApplicationCifExpression.md)
+- [NewAttribute](docs/NewAttribute.md)
+- [NewAudience](docs/NewAudience.md)
+- [NewBaseNotification](docs/NewBaseNotification.md)
+- [NewCampaign](docs/NewCampaign.md)
+- [NewCampaignCollection](docs/NewCampaignCollection.md)
+- [NewCampaignEvaluationGroup](docs/NewCampaignEvaluationGroup.md)
+- [NewCampaignGroup](docs/NewCampaignGroup.md)
+- [NewCampaignSet](docs/NewCampaignSet.md)
+- [NewCampaignStoreBudget](docs/NewCampaignStoreBudget.md)
+- [NewCampaignStoreBudgetStoreLimit](docs/NewCampaignStoreBudgetStoreLimit.md)
+- [NewCampaignTemplate](docs/NewCampaignTemplate.md)
+- [NewCatalog](docs/NewCatalog.md)
+- [NewCollection](docs/NewCollection.md)
+- [NewCouponCreationJob](docs/NewCouponCreationJob.md)
+- [NewCouponDeletionJob](docs/NewCouponDeletionJob.md)
+- [NewCoupons](docs/NewCoupons.md)
+- [NewCouponsForMultipleRecipients](docs/NewCouponsForMultipleRecipients.md)
+- [NewCustomEffect](docs/NewCustomEffect.md)
+- [NewCustomerProfile](docs/NewCustomerProfile.md)
+- [NewCustomerSession](docs/NewCustomerSession.md)
+- [NewCustomerSessionV2](docs/NewCustomerSessionV2.md)
+- [NewEvent](docs/NewEvent.md)
+- [NewEventType](docs/NewEventType.md)
+- [NewExternalInvitation](docs/NewExternalInvitation.md)
+- [NewGiveawaysPool](docs/NewGiveawaysPool.md)
+- [NewInternalAudience](docs/NewInternalAudience.md)
+- [NewInvitation](docs/NewInvitation.md)
+- [NewInviteEmail](docs/NewInviteEmail.md)
+- [NewLoyaltyProgram](docs/NewLoyaltyProgram.md)
+- [NewLoyaltyTier](docs/NewLoyaltyTier.md)
+- [NewManagementKey](docs/NewManagementKey.md)
+- [NewMultipleAudiencesItem](docs/NewMultipleAudiencesItem.md)
+- [NewNotificationTest](docs/NewNotificationTest.md)
+- [NewNotificationWebhook](docs/NewNotificationWebhook.md)
+- [NewOutgoingIntegrationWebhook](docs/NewOutgoingIntegrationWebhook.md)
+- [NewPassword](docs/NewPassword.md)
+- [NewPasswordEmail](docs/NewPasswordEmail.md)
+- [NewPicklist](docs/NewPicklist.md)
+- [NewReferral](docs/NewReferral.md)
+- [NewReferralsForMultipleAdvocates](docs/NewReferralsForMultipleAdvocates.md)
+- [NewReturn](docs/NewReturn.md)
+- [NewRevisionVersion](docs/NewRevisionVersion.md)
+- [NewRole](docs/NewRole.md)
+- [NewRoleV2](docs/NewRoleV2.md)
+- [NewRuleset](docs/NewRuleset.md)
+- [NewSamlConnection](docs/NewSamlConnection.md)
+- [NewStore](docs/NewStore.md)
+- [NewTemplateDef](docs/NewTemplateDef.md)
+- [NewUser](docs/NewUser.md)
+- [NewWebhook](docs/NewWebhook.md)
+- [Notification](docs/Notification.md)
+- [NotificationActivation](docs/NotificationActivation.md)
+- [NotificationListItem](docs/NotificationListItem.md)
+- [NotificationTest](docs/NotificationTest.md)
+- [OktaEvent](docs/OktaEvent.md)
+- [OktaEventPayload](docs/OktaEventPayload.md)
+- [OktaEventPayloadData](docs/OktaEventPayloadData.md)
+- [OktaEventTarget](docs/OktaEventTarget.md)
+- [OneTimeCode](docs/OneTimeCode.md)
+- [OutgoingIntegrationBrazePolicy](docs/OutgoingIntegrationBrazePolicy.md)
+- [OutgoingIntegrationCleverTapPolicy](docs/OutgoingIntegrationCleverTapPolicy.md)
+- [OutgoingIntegrationConfiguration](docs/OutgoingIntegrationConfiguration.md)
+- [OutgoingIntegrationIterablePolicy](docs/OutgoingIntegrationIterablePolicy.md)
+- [OutgoingIntegrationMoEngagePolicy](docs/OutgoingIntegrationMoEngagePolicy.md)
+- [OutgoingIntegrationTemplate](docs/OutgoingIntegrationTemplate.md)
+- [OutgoingIntegrationTemplateWithConfigurationDetails](docs/OutgoingIntegrationTemplateWithConfigurationDetails.md)
+- [OutgoingIntegrationTemplates](docs/OutgoingIntegrationTemplates.md)
+- [OutgoingIntegrationType](docs/OutgoingIntegrationType.md)
+- [OutgoingIntegrationTypes](docs/OutgoingIntegrationTypes.md)
+- [PatchItemCatalogAction](docs/PatchItemCatalogAction.md)
+- [PatchManyItemsCatalogAction](docs/PatchManyItemsCatalogAction.md)
+- [PendingPointsNotificationPolicy](docs/PendingPointsNotificationPolicy.md)
+- [Picklist](docs/Picklist.md)
+- [Product](docs/Product.md)
+- [ProductSearchMatch](docs/ProductSearchMatch.md)
+- [ProductSkuUnitAnalytics](docs/ProductSkuUnitAnalytics.md)
+- [ProductUnitAnalytics](docs/ProductUnitAnalytics.md)
+- [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md)
+- [ProjectedTier](docs/ProjectedTier.md)
+- [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md)
+- [Referral](docs/Referral.md)
+- [ReferralConstraints](docs/ReferralConstraints.md)
+- [ReferralCreatedEffectProps](docs/ReferralCreatedEffectProps.md)
+- [ReferralRejectionReason](docs/ReferralRejectionReason.md)
+- [RejectCouponEffectProps](docs/RejectCouponEffectProps.md)
+- [RejectReferralEffectProps](docs/RejectReferralEffectProps.md)
+- [RemoveFromAudienceEffectProps](docs/RemoveFromAudienceEffectProps.md)
+- [RemoveItemCatalogAction](docs/RemoveItemCatalogAction.md)
+- [RemoveManyItemsCatalogAction](docs/RemoveManyItemsCatalogAction.md)
+- [ReopenSessionResponse](docs/ReopenSessionResponse.md)
+- [ReserveCouponEffectProps](docs/ReserveCouponEffectProps.md)
+- [Return](docs/Return.md)
+- [ReturnIntegrationRequest](docs/ReturnIntegrationRequest.md)
+- [ReturnedCartItem](docs/ReturnedCartItem.md)
+- [Revision](docs/Revision.md)
+- [RevisionActivation](docs/RevisionActivation.md)
+- [RevisionVersion](docs/RevisionVersion.md)
+- [Role](docs/Role.md)
+- [RoleAssign](docs/RoleAssign.md)
+- [RoleMembership](docs/RoleMembership.md)
+- [RoleV2](docs/RoleV2.md)
+- [RoleV2ApplicationDetails](docs/RoleV2ApplicationDetails.md)
+- [RoleV2Base](docs/RoleV2Base.md)
+- [RoleV2PermissionSet](docs/RoleV2PermissionSet.md)
+- [RoleV2Permissions](docs/RoleV2Permissions.md)
+- [RoleV2RolesGroup](docs/RoleV2RolesGroup.md)
+- [RollbackAddedLoyaltyPointsEffectProps](docs/RollbackAddedLoyaltyPointsEffectProps.md)
+- [RollbackCouponEffectProps](docs/RollbackCouponEffectProps.md)
+- [RollbackDeductedLoyaltyPointsEffectProps](docs/RollbackDeductedLoyaltyPointsEffectProps.md)
+- [RollbackDiscountEffectProps](docs/RollbackDiscountEffectProps.md)
+- [RollbackIncreasedAchievementProgressEffectProps](docs/RollbackIncreasedAchievementProgressEffectProps.md)
+- [RollbackReferralEffectProps](docs/RollbackReferralEffectProps.md)
+- [Rule](docs/Rule.md)
+- [RuleFailureReason](docs/RuleFailureReason.md)
+- [Ruleset](docs/Ruleset.md)
+- [SamlConnection](docs/SamlConnection.md)
+- [SamlConnectionInternal](docs/SamlConnectionInternal.md)
+- [SamlConnectionMetadata](docs/SamlConnectionMetadata.md)
+- [SamlLoginEndpoint](docs/SamlLoginEndpoint.md)
+- [ScimBaseUser](docs/ScimBaseUser.md)
+- [ScimBaseUserName](docs/ScimBaseUserName.md)
+- [ScimNewUser](docs/ScimNewUser.md)
+- [ScimPatchOperation](docs/ScimPatchOperation.md)
+- [ScimPatchRequest](docs/ScimPatchRequest.md)
+- [ScimResource](docs/ScimResource.md)
+- [ScimResourceTypesListResponse](docs/ScimResourceTypesListResponse.md)
+- [ScimSchemaResource](docs/ScimSchemaResource.md)
+- [ScimSchemasListResponse](docs/ScimSchemasListResponse.md)
+- [ScimServiceProviderConfigResponse](docs/ScimServiceProviderConfigResponse.md)
+- [ScimServiceProviderConfigResponseBulk](docs/ScimServiceProviderConfigResponseBulk.md)
+- [ScimServiceProviderConfigResponseChangePassword](docs/ScimServiceProviderConfigResponseChangePassword.md)
+- [ScimServiceProviderConfigResponseFilter](docs/ScimServiceProviderConfigResponseFilter.md)
+- [ScimServiceProviderConfigResponsePatch](docs/ScimServiceProviderConfigResponsePatch.md)
+- [ScimServiceProviderConfigResponseSort](docs/ScimServiceProviderConfigResponseSort.md)
+- [ScimUser](docs/ScimUser.md)
+- [ScimUsersListResponse](docs/ScimUsersListResponse.md)
+- [Session](docs/Session.md)
+- [SetDiscountEffectProps](docs/SetDiscountEffectProps.md)
+- [SetDiscountPerAdditionalCostEffectProps](docs/SetDiscountPerAdditionalCostEffectProps.md)
+- [SetDiscountPerAdditionalCostPerItemEffectProps](docs/SetDiscountPerAdditionalCostPerItemEffectProps.md)
+- [SetDiscountPerItemEffectProps](docs/SetDiscountPerItemEffectProps.md)
+- [ShowBundleMetadataEffectProps](docs/ShowBundleMetadataEffectProps.md)
+- [ShowNotificationEffectProps](docs/ShowNotificationEffectProps.md)
+- [SlotDef](docs/SlotDef.md)
+- [SsoConfig](docs/SsoConfig.md)
+- [Store](docs/Store.md)
+- [StrikethroughChangedItem](docs/StrikethroughChangedItem.md)
+- [StrikethroughCustomEffectPerItemProps](docs/StrikethroughCustomEffectPerItemProps.md)
+- [StrikethroughDebugResponse](docs/StrikethroughDebugResponse.md)
+- [StrikethroughEffect](docs/StrikethroughEffect.md)
+- [StrikethroughLabelingNotification](docs/StrikethroughLabelingNotification.md)
+- [StrikethroughSetDiscountPerItemEffectProps](docs/StrikethroughSetDiscountPerItemEffectProps.md)
+- [StrikethroughTrigger](docs/StrikethroughTrigger.md)
+- [SummaryCampaignStoreBudget](docs/SummaryCampaignStoreBudget.md)
+- [TalangAttribute](docs/TalangAttribute.md)
+- [TalangAttributeVisibility](docs/TalangAttributeVisibility.md)
+- [TemplateArgDef](docs/TemplateArgDef.md)
+- [TemplateDef](docs/TemplateDef.md)
+- [TemplateLimitConfig](docs/TemplateLimitConfig.md)
+- [Tier](docs/Tier.md)
+- [TierDowngradeNotificationPolicy](docs/TierDowngradeNotificationPolicy.md)
+- [TierUpgradeNotificationPolicy](docs/TierUpgradeNotificationPolicy.md)
+- [TierWillDowngradeNotificationPolicy](docs/TierWillDowngradeNotificationPolicy.md)
+- [TierWillDowngradeNotificationTrigger](docs/TierWillDowngradeNotificationTrigger.md)
+- [TimePoint](docs/TimePoint.md)
+- [TrackEventV2Response](docs/TrackEventV2Response.md)
+- [TransferLoyaltyCard](docs/TransferLoyaltyCard.md)
+- [TriggerWebhookEffectProps](docs/TriggerWebhookEffectProps.md)
+- [TwoFaConfig](docs/TwoFaConfig.md)
+- [UpdateAccount](docs/UpdateAccount.md)
+- [UpdateAchievement](docs/UpdateAchievement.md)
+- [UpdateApplication](docs/UpdateApplication.md)
+- [UpdateApplicationApiKey](docs/UpdateApplicationApiKey.md)
+- [UpdateApplicationCif](docs/UpdateApplicationCif.md)
+- [UpdateAttributeEffectProps](docs/UpdateAttributeEffectProps.md)
+- [UpdateAudience](docs/UpdateAudience.md)
+- [UpdateCampaign](docs/UpdateCampaign.md)
+- [UpdateCampaignCollection](docs/UpdateCampaignCollection.md)
+- [UpdateCampaignEvaluationGroup](docs/UpdateCampaignEvaluationGroup.md)
+- [UpdateCampaignGroup](docs/UpdateCampaignGroup.md)
+- [UpdateCampaignTemplate](docs/UpdateCampaignTemplate.md)
+- [UpdateCatalog](docs/UpdateCatalog.md)
+- [UpdateCollection](docs/UpdateCollection.md)
+- [UpdateCoupon](docs/UpdateCoupon.md)
+- [UpdateCouponBatch](docs/UpdateCouponBatch.md)
+- [UpdateCustomEffect](docs/UpdateCustomEffect.md)
+- [UpdateLoyaltyCard](docs/UpdateLoyaltyCard.md)
+- [UpdateLoyaltyProgram](docs/UpdateLoyaltyProgram.md)
+- [UpdateLoyaltyProgramTier](docs/UpdateLoyaltyProgramTier.md)
+- [UpdatePicklist](docs/UpdatePicklist.md)
+- [UpdateReferral](docs/UpdateReferral.md)
+- [UpdateReferralBatch](docs/UpdateReferralBatch.md)
+- [UpdateRole](docs/UpdateRole.md)
+- [UpdateRoleV2](docs/UpdateRoleV2.md)
+- [UpdateStore](docs/UpdateStore.md)
+- [UpdateUser](docs/UpdateUser.md)
+- [User](docs/User.md)
+- [UserEntity](docs/UserEntity.md)
+- [ValueMap](docs/ValueMap.md)
+- [Webhook](docs/Webhook.md)
+- [WebhookActivationLogEntry](docs/WebhookActivationLogEntry.md)
+- [WebhookLogEntry](docs/WebhookLogEntry.md)
+- [WebhookWithOutgoingIntegrationDetails](docs/WebhookWithOutgoingIntegrationDetails.md)
+- [WillAwardGiveawayEffectProps](docs/WillAwardGiveawayEffectProps.md)
+
+## Authorization
### api_key_v1
@@ -986,7 +943,6 @@ Class | Method | HTTP request | Description
Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request.
-
### management_key
- **Type**: API key
@@ -995,7 +951,6 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i
Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request.
-
### manager_auth
- **Type**: API key
@@ -1004,8 +959,7 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i
Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request.
-
-## Documentation for Utility Methods
+## Utility methods
Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
@@ -1020,5 +974,3 @@ Each of these functions takes a value of the given basic type and returns a poin
* `PtrFloat64`
* `PtrString`
* `PtrTime`
-
-## Author
diff --git a/api/openapi.yaml b/api/openapi.yaml
index edca4d57..76c6ecdb 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -23,15 +23,6 @@ security:
- manager_auth: []
- management_key: []
tags:
-- description: |
- Endpoints used for communication between Talon.One and the AI assistant.
- name: AI assistant
-- description: |
- Represents the API used to send [Integration API](https://docs.talon.one/docs/dev/integration-api/overview) requests to a given Application.
- name: API keys
-- description: |
- Operations regarding account statistics.
- name: Account statistics
- description: |
Operations for updating account information such as billing email addresses, inviting users, etc.
name: Accounts and users
@@ -95,20 +86,12 @@ tags:
See the [docs](https://docs.talon.one/docs/product/campaigns/managing-collections).
name: Collections
-- description: |
- Represents a configuration for the Campaign Manager.
- name: Config
- description: |
Coupons are unique codes belonging to a particular campaign. They don't define any behavior on their own.
Instead the campaign ruleset can include rules that validate coupons and carry out particular effects.
See the [docs](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
name: Coupons
-- description: |
- Represents the custom effects that users can create.
-
- See the [docs](https://docs.talon.one/docs/product/account/dev-tools/managing-custom-effects).
- name: Custom effects
- description: |
Represents the data of a customer, including sessions and events used for reporting and debugging in the Campaign Manager.
name: Customer data
@@ -123,9 +106,6 @@ tags:
Sessions are a key concept of Talon.One. We strongly recommend you read the [documentation about customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
name: Customer sessions
-- description: |
- Represents internal database-related operations.
- name: Database
- description: |
Represents a single occurrence of a specific customer action, for example, updating the cart or signing up for a newsletter.
@@ -133,20 +113,11 @@ tags:
- **Built-in events:** They are triggered by various endpoints, such as the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. [Learn more](https://docs.talon.one/docs/dev/concepts/entities/events).
- **Custom events:** They are triggered by the [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint.
name: Events
-- description: |
- How we enable features in accounts.
- name: Feature flags
- description: |
Represents a program that rewards customers with giveaways, such as free gift cards.
See the [docs](https://docs.talon.one/docs/product/giveaways/overview).
name: Giveaways
-- description: |
- Represents internal notification operations. Not to be confused with the [notifications relying on webhooks](#tag/Notifications).
- name: Internal notifications
-- description: Represents endpoints used internally by other endpoints. Do not use
- them.
- name: Internal routing
- description: |
Operations to query the Talon.One logs. They contain all incoming and outgoing requests.
name: Logs
@@ -163,23 +134,9 @@ tags:
[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) allow your customers to collect and spend loyalty points within a card-based loyalty program.
name: Loyalty cards
-- description: |
- Represents a key to access specified endpoints of the Management API programmatically.
- name: Management keys
- description: |
Represents the notifications that customers can create about various events. See [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications).
name: Notifications
-- description: |
- Represents various Integration API endpoints used internally for authentication. Do not use them.
- name: Other
-- description: |
- Represents the outgoing integrations that we currently support.
-
- An outgoing integration may be, for example, a customer data platform or customer engagement platform.
- name: Outgoing integrations
-- description: |
- Represents the picklist that users can create for a custom effect.
- name: Picklists
- description: |
A referral is a code shared between a customer and a prospect.
@@ -195,27 +152,13 @@ tags:
See the [docs](https://docs.talon.one/docs/product/account/account-settings/managing-roles).
name: Roles
-- description: |
- Represents the endpoints related to the SAML configuration used for single sign-on (SSO).
- name: SAML
- description: |
Represents a session used for authentication purposes.
Create one with the [Create session](#operation/createSession) endpoint.
name: Sessions
-- description: |
- Represents [single sign-on](https://docs.talon.one/docs/product/account/account-settings/setting-up-sso) (SSO) configuration-related endpoints.
-
- Single sign-on is a way to allow users to access many service providers using a single username and password by relying on a single identity provider.
- name: Single sign-on
- description: |
Represents physical or digital stores, branches, and franchises.
name: Stores
-- description: |
- Talang template operations.
- name: Talang templates
-- description: |
- Represents [two-factor authentication](https://docs.talon.one/docs/product/account/account-settings/setting-up-2fa) (2FA) that requires users of an organization to enter a one-time security code sent to their email address when signing in to their Talon.One account.
- name: Two-factor authentication
- description: |
A way to send information from Talon.One to the URI of your choice.
@@ -1167,7 +1110,12 @@ paths:
description: |
Delete all attributes on the customer profile and on entities that reference this customer profile.
- **Important:** To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
+ **Important:**
+ - Customer data is deleted from all Applications in the [environment](https://docs.talon.one/docs/product/applications/overview#application-environments)
+ that the API key belongs to. For example, if you use this endpoint with an API key that belongs to a sandbox Application,
+ customer data will be deleted from all sandbox Applications. This is because customer data is shared
+ between Applications from the same environment.
+ - To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
operationId: deleteCustomerData
parameters:
- description: |
@@ -1252,15 +1200,22 @@ paths:
description: |
Create a coupon reservation for the specified customer profiles on the specified coupon.
You can also create a reservation via the Campaign Manager using the
- [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code).
+ [Create coupon code reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code) effect.
+
+ **Note:**
- If the **Reservation mandatory** option was selected when creating the specified coupon,
the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it.
- Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it.
+ Otherwise, the endpoint creates a **soft** reservation, meaning the coupon is associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it.
This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store.
- - If the **Coupon visibility** option was selected when creating the specified coupon,
+
+ - If the **Coupon visibility** option was selected when creating the specified coupon,
the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint.
+ - This endpoint overrides the coupon reservation limit set when [the coupon is created](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons).
+ To ensure that coupons cannot be reserved after the reservation limit is reached, use the [Create coupon code reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code) effect in the Rule Builder
+ and the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.
+
To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
operationId: createCouponReservation
parameters:
@@ -1460,7 +1415,7 @@ paths:
format: date-time
type: string
- description: Filter results by one or more subledger IDs. Must be exact match.
- explode: false
+ explode: true
in: query
name: subledgerId
schema:
@@ -1502,7 +1457,7 @@ paths:
get:
description: |
Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program.
- You can filter balances by date and subledger ID.
+ You can filter balances by date and subledger ID, and include tier-related information in the response.
**Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID.
@@ -1561,7 +1516,7 @@ paths:
- description: |
Indicates whether the customer's projected tier information is included in the response.
- When set to `true`, the response includes information about the customer’s active points and the name of the projected tier.
+ When set to `true`, the response includes information about the customer's active points and the name of the projected tier.
**Note** We recommend filtering by `subledgerId` for better performance.
in: query
@@ -1596,7 +1551,7 @@ paths:
description: Not found
security:
- api_key_v1: []
- summary: Get customer's loyalty points
+ summary: Get customer's loyalty balances
tags:
- integration
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions:
@@ -1624,7 +1579,7 @@ paths:
maxLength: 108
type: string
- description: Filter results by one or more subledger IDs. Must be exact match.
- explode: false
+ explode: true
in: query
name: subledgerId
schema:
@@ -1868,7 +1823,7 @@ paths:
- expired
type: string
- description: Filter results by one or more subledger IDs. Must be exact match.
- explode: false
+ explode: true
in: query
name: subledgerId
schema:
@@ -2121,6 +2076,7 @@ paths:
- scheduled
- running
- expired
+ - staged
type: string
- description: Filter results performing case-insensitive matching against the
name of the campaign.
@@ -2156,7 +2112,7 @@ paths:
name: campaignGroupId
schema:
type: integer
- - description: The ID of the Campaign Template this Campaign was created from.
+ - description: The ID of the campaign template this campaign was created from.
in: query
name: templateId
schema:
@@ -2237,7 +2193,10 @@ paths:
tags:
- management
put:
- description: Update the given campaign.
+ description: |
+ Update the given campaign.
+
+ **Important:** You cannot use this endpoint to update campaigns if [campaign staging and revisions](https://docs.talon.one/docs/product/applications/managing-general-settings#campaign-staging-and-revisions) is enabled for your Application.
operationId: updateCampaign
parameters:
- description: The ID of the Application. It is displayed in your Talon.One
@@ -2547,6 +2506,7 @@ paths:
- scheduled
- running
- expired
+ - staged
type: string
requestBody:
content:
@@ -2763,7 +2723,7 @@ paths:
schema:
type: integer
- description: |
- Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field.
+ Filter results by match with a profile ID specified in the coupon's `RecipientIntegrationId` field.
in: query
name: recipientIntegrationId
schema:
@@ -2834,8 +2794,8 @@ paths:
x-codegen-request-body-name: body
put:
description: |
- Update all coupons, or a specific batch of coupons in the given campaign.
- You can find the `batchId` in the **Coupons** view of your Application
+ Update all coupons or a specific batch of coupons in the given campaign.
+ You can find the `batchId` on the **Coupons** page of your campaign
in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount).
@@ -2843,7 +2803,8 @@ paths:
- Only send sequential requests to this endpoint.
- - Requests to this endpoint timeout after 30 minutes. If you hit a timeout, reach out to our support team.
+ - Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team.
+ - With this
PUT
endpoint, if you do not explicitly set a value for the startDate
and expiryDate
properties in your request, it is automatically set to null
.
@@ -3109,8 +3070,8 @@ paths:
name: referralId
schema:
type: integer
- - description: Filter results by match with a profile id specified in the coupon's
- RecipientIntegrationId field
+ - description: Filter results by match with a profile ID specified in the coupon's
+ RecipientIntegrationId field.
in: query
name: recipientIntegrationId
schema:
@@ -3121,7 +3082,7 @@ paths:
schema:
type: string
- description: Filter results to an exact case-insensitive matching against
- the coupon code
+ the coupon code.
in: query
name: exactMatch
schema:
@@ -3217,7 +3178,7 @@ paths:
Important
-
With this PUT
endpoint alone, if you do not explicitly set a value for the startDate
, expiryDate
, and recipientIntegrationId
properties in your request, it is automatically set to null
.
+
With this PUT
endpoint, if you do not explicitly set a value for the startDate
, expiryDate
, and recipientIntegrationId
properties in your request, it is automatically set to null
.
operationId: updateCoupon
@@ -3358,14 +3319,14 @@ paths:
name: referralId
schema:
type: integer
- - description: Filter results by match with a profile id specified in the coupon's
- RecipientIntegrationId field
+ - description: Filter results by match with a profile ID specified in the coupon's
+ RecipientIntegrationId field.
in: query
name: recipientIntegrationId
schema:
type: string
- description: Filter results to an exact case-insensitive matching against
- the coupon code
+ the coupon code.
in: query
name: exactMatch
schema:
@@ -3483,8 +3444,8 @@ paths:
name: referralId
schema:
type: integer
- - description: Filter results by match with a profile id specified in the coupon's
- RecipientIntegrationId field
+ - description: Filter results by match with a profile ID specified in the coupon's
+ RecipientIntegrationId field.
in: query
name: recipientIntegrationId
schema:
@@ -3495,7 +3456,7 @@ paths:
schema:
type: string
- description: Filter results to an exact case-insensitive matching against
- the coupon code
+ the coupon code.
in: query
name: exactMatch
schema:
@@ -3519,6 +3480,7 @@ paths:
- scheduled
- running
- expired
+ - staged
type: string
requestBody:
content:
@@ -3695,8 +3657,8 @@ paths:
- "true"
- "false"
type: string
- - description: Filter results by match with a profile id specified in the referral's
- AdvocateProfileIntegrationId field
+ - description: Filter results by match with a profile ID specified in the referral's
+ AdvocateProfileIntegrationId field.
in: query
name: advocate
schema:
@@ -3920,6 +3882,9 @@ paths:
The CSV file contains the following columns:
- `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported.
+
+ **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application
+ until a session or profile update is received for that profile.
- `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported.
- `amount`: The amount of points to award to the customer profile.
- `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date.
@@ -4280,10 +4245,6 @@ paths:
"200":
content:
application/csv:
- example: |
- customerprofileid,customersessionid,rulesetid,rulename,programid,type,name,subledgerid,startdate,expirydate,id,created,amount,archived,campaignid
- 8NHOS78H,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,subtraction,10% of current total,,immediate,unlimited,60803,2022-11-29 16:16:10,100.00,false,5
- EB780RDN,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,addition,Reimbursed loyalty points,,immediate,unlimited,60804,2022-11-29 16:16:23,100.00,false,5
schema:
format: csv
type: string
@@ -4339,10 +4300,6 @@ paths:
"200":
content:
application/csv:
- example: |
- programid,subledgerid,customerprofileid,tiername,startdate,expirydate
- 1,SUB1,Dinesh,Golden,2023-08-02T15:04:05Z07:00,2024-08-02T15:04:05Z07:00
- 1,SUB2,Gilfoyle,Silver,2023-03-21T03:45:12Z05:00,2026-03-21T03:45:12Z05:00
schema:
format: csv
type: string
@@ -4419,10 +4376,6 @@ paths:
"200":
content:
application/csv:
- example: |
- loyaltyProgramID,loyaltySubledger,profileIntegrationID,currentBalance,pendingBalance,expiredBalance,spentBalance,currentTier
- 40,,8786NTHSAO8,10.00,0.00,0.00,0.00,First
- 40,,2735HATHOH8,20.00,0.00,0.00,0.00,First
schema:
format: csv
type: string
@@ -4607,7 +4560,7 @@ paths:
- `identifier` (required): The alphanumeric identifier of the loyalty card.
- `state` (required): The state of the loyalty card. It can be `active` or `inactive`.
- - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card.
+ - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;).
**Note:** We recommend limiting your file size to 500MB.
@@ -4757,9 +4710,6 @@ paths:
"200":
content:
application/csv:
- example: |
- loyaltyProgramID,loyaltySubledger,cardIdentifier,cardState,currentBalance,pendingBalance,expiredBalance,spentBalance
- 40,,111,active,10,0,0,0,5
schema:
format: csv
type: string
@@ -4936,13 +4886,18 @@ paths:
name: batchId
schema:
type: string
+ - description: Determines the format of dates in the export document.
+ in: query
+ name: dateFormat
+ schema:
+ enum:
+ - excel
+ - ISO8601
+ type: string
responses:
"200":
content:
application/csv:
- example: |
- identifier,created,status,userpercardlimit,customerprofileids,blockreason,generated,batchid
- CARD-1234,2020-06-10T09:05:27.993483Z,active,3,['profile1'],card limit reached,false,gwedcbfp
schema:
format: csv
type: string
@@ -5558,9 +5513,6 @@ paths:
"200":
content:
application/csv:
- example: |
- id,poolid,code,startdate,enddate,attributes,used,importid,created,profileintegrationid,profileid
- 1,7,af18bc3839799451fb6d6b6467cf4c25e,2023-04-11T12:47:47Z,2024-04-11T12:47:47Z,"{""attribute"": ""value""}",true,2,2023-04-11T12:47:47Z,R195412,35
schema:
format: csv
type: string
@@ -6282,11 +6234,6 @@ paths:
"200":
content:
application/csv:
- example: |
- item
- SKU1
- SKU2
- SKU3
schema:
format: csv
type: string
@@ -6339,11 +6286,6 @@ paths:
"200":
content:
application/csv:
- example: |
- item
- SKU1
- SKU2
- SKU3
schema:
format: csv
type: string
@@ -6369,7 +6311,7 @@ paths:
Display the health of the Application and show the last time the Application
was used.
- You can also display this information from the **Settings** of an Application, in the **Developer Settings** menu.
+ You can also find this information in the Campaign Manager. In your Application, click **Settings** > **Integration API Keys**.
See the [docs](https://docs.talon.one/docs/dev/tutorials/monitoring-integration-status).
operationId: getApplicationApiHealth
parameters:
@@ -6485,92 +6427,6 @@ paths:
summary: Get access logs for Application
tags:
- management
- /v1/access_logs:
- get:
- description: |
- Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs.
- operationId: getAllAccessLogs
- parameters:
- - description: |
- Only return results from after this timestamp.
-
- **Note:**
- - This must be an RFC3339 timestamp string.
- - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
- in: query
- name: rangeStart
- schema:
- format: date-time
- type: string
- - description: |
- Only return results from before this timestamp.
-
- **Note:**
- - This must be an RFC3339 timestamp string.
- - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
- in: query
- name: rangeEnd
- schema:
- format: date-time
- type: string
- - description: Only return results where the request path matches the given
- regular expression.
- in: query
- name: path
- schema:
- type: string
- - description: Only return results where the request method matches the given
- regular expression.
- in: query
- name: method
- schema:
- enum:
- - get
- - put
- - post
- - delete
- - patch
- type: string
- - description: Filter results by HTTP status codes.
- in: query
- name: status
- schema:
- enum:
- - success
- - error
- type: string
- - description: The number of items in the response.
- in: query
- name: pageSize
- schema:
- default: 1000
- maximum: 1000
- minimum: 1
- type: integer
- - description: The number of items to skip when paging through large result
- sets.
- in: query
- name: skip
- schema:
- type: integer
- - description: |
- The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
-
- **Note:** This parameter works only with numeric fields.
- in: query
- name: sort
- schema:
- type: string
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/inline_response_200_20'
- description: OK
- summary: List access logs
- tags:
- - management
/v1/applications/{applicationId}/campaigns/{campaignId}/analytics:
get:
description: Retrieve statistical data about the performance of the given campaign.
@@ -6630,7 +6486,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_21'
+ $ref: '#/components/schemas/inline_response_200_20'
description: OK
summary: Get analytics of campaigns
tags:
@@ -6681,7 +6537,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_22'
+ $ref: '#/components/schemas/inline_response_200_21'
description: OK
summary: List application's customers
tags:
@@ -6736,7 +6592,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_23'
+ $ref: '#/components/schemas/inline_response_200_22'
description: OK
summary: List application customers matching the given attributes
tags:
@@ -6764,7 +6620,7 @@ paths:
name: skip
schema:
type: integer
- - description: Indicates whether you are pointing to a sandbox or Live customer.
+ - description: Indicates whether you are pointing to a sandbox or live customer.
in: query
name: sandbox
schema:
@@ -6782,7 +6638,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_24'
+ $ref: '#/components/schemas/inline_response_200_23'
description: OK
summary: List customer profiles matching the given attributes
tags:
@@ -6841,7 +6697,7 @@ paths:
name: skip
schema:
type: integer
- - description: Indicates whether you are pointing to a sandbox or Live customer.
+ - description: Indicates whether you are pointing to a sandbox or live customer.
in: query
name: sandbox
schema:
@@ -6852,7 +6708,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_25'
+ $ref: '#/components/schemas/inline_response_200_24'
description: OK
summary: List customer profiles
tags:
@@ -6948,7 +6804,7 @@ paths:
required: true
schema:
type: integer
- - description: Only return reports matching the customer name
+ - description: Only return reports matching the customer name.
in: query
name: name
schema:
@@ -6959,12 +6815,12 @@ paths:
name: integrationId
schema:
type: string
- - description: Only return reports matching the campaignName
+ - description: Only return reports matching the campaign name.
in: query
name: campaignName
schema:
type: string
- - description: Only return reports matching the current customer referrer name
+ - description: Only return reports matching the current customer referrer name.
in: query
name: advocateName
schema:
@@ -6974,7 +6830,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_26'
+ $ref: '#/components/schemas/inline_response_200_25'
description: OK
summary: Get Activity Reports for Application Customers
tags:
@@ -7167,7 +7023,7 @@ paths:
name: referral
schema:
type: string
- - description: Filter by sessions with this integrationId. Must be exact match.
+ - description: Filter by sessions with this integration ID. Must be exact match.
in: query
name: integrationId
schema:
@@ -7190,7 +7046,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_27'
+ $ref: '#/components/schemas/inline_response_200_26'
description: OK
summary: List Application sessions
tags:
@@ -7329,7 +7185,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_28'
+ $ref: '#/components/schemas/inline_response_200_27'
description: OK
summary: List Applications events
tags:
@@ -7376,7 +7232,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_29'
+ $ref: '#/components/schemas/inline_response_200_28'
description: OK
summary: List Applications event types
tags:
@@ -7423,7 +7279,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_30'
+ $ref: '#/components/schemas/inline_response_200_29'
description: OK
summary: List audiences
tags:
@@ -7454,7 +7310,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_31'
+ $ref: '#/components/schemas/inline_response_200_30'
description: OK
summary: List audience analytics
tags:
@@ -7505,7 +7361,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_32'
+ $ref: '#/components/schemas/inline_response_200_31'
description: OK
"404":
content:
@@ -7601,10 +7457,6 @@ paths:
"200":
content:
application/csv:
- example: |
- profileintegrationid
- URNGV8294NV
- BZGGC2454PA
schema:
format: csv
type: string
@@ -7685,7 +7537,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_33'
+ $ref: '#/components/schemas/inline_response_200_32'
description: OK
summary: List friends referred by customer profile
tags:
@@ -7728,7 +7580,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_34'
+ $ref: '#/components/schemas/inline_response_200_33'
description: OK
summary: List custom attributes
tags:
@@ -7953,7 +7805,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_35'
+ $ref: '#/components/schemas/inline_response_200_34'
description: OK
summary: List items in a catalog
tags:
@@ -8287,7 +8139,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_36'
+ $ref: '#/components/schemas/inline_response_200_35'
description: OK
summary: List additional costs
tags:
@@ -8436,7 +8288,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_37'
+ $ref: '#/components/schemas/inline_response_200_36'
description: OK
summary: List webhooks
tags:
@@ -8497,7 +8349,7 @@ paths:
name: integrationRequestUuid
schema:
type: string
- - description: Filter results by Webhook.
+ - description: Filter results by webhook id.
in: query
name: webhookId
schema:
@@ -8507,7 +8359,7 @@ paths:
name: applicationId
schema:
type: number
- - description: Filter results by campaign.
+ - description: Filter results by campaign ID.
in: query
name: campaignId
schema:
@@ -8531,7 +8383,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_38'
+ $ref: '#/components/schemas/inline_response_200_37'
description: OK
summary: List webhook activation log entries
tags:
@@ -8571,7 +8423,7 @@ paths:
- success
- error
type: string
- - description: Filter results by Webhook.
+ - description: Filter results by webhook id.
in: query
name: webhookId
schema:
@@ -8581,7 +8433,7 @@ paths:
name: applicationId
schema:
type: number
- - description: Filter results by campaign.
+ - description: Filter results by campaign ID.
in: query
name: campaignId
schema:
@@ -8612,7 +8464,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_39'
+ $ref: '#/components/schemas/inline_response_200_38'
description: OK
summary: List webhook log entries
tags:
@@ -8662,7 +8514,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_40'
+ $ref: '#/components/schemas/inline_response_200_39'
description: OK
summary: List event types
tags:
@@ -8756,7 +8608,7 @@ paths:
- `batchid`: The ID of the batch this coupon is part of.
- `campaignid`: The ID of the campaign this coupon is related to.
- `counter`: The number of times this coupon has been redeemed.
- - `created`: The creation date of the coupon code.
+ - `created`: The creation date in RFC3339 of the coupon code.
- `deleted`: Whether the coupon code is deleted.
- `deleted_changelogid`: The ID of the delete event in the logs.
- `discount_counter`: The amount of discount given by this coupon.
@@ -8784,7 +8636,7 @@ paths:
required: true
schema:
type: integer
- - description: Filter results by campaign.
+ - description: Filter results by campaign ID.
in: query
name: campaignId
schema:
@@ -8889,6 +8741,7 @@ paths:
- scheduled
- running
- expired
+ - staged
type: string
- description: Filter results to only return the coupon codes (`value` column)
without the associated coupon data.
@@ -8901,9 +8754,6 @@ paths:
"200":
content:
application/csv:
- example: |
- id,created,campaignid,value,expirydate,startdate,attributes,applicationid,deleted,deleted_changelogid,accountid,referralid,recipientintegrationid,importid,batchid,reservation,limits,limitval,counter,discount_counter,discount_limitval
- 20191301,2022-04-26T11:02:38Z,3882,COUP1,2022-04-27T10:56:47Z,2022-04-26T10:56:47Z,"{""test"": ""premium""}",270,,0,1,,cust123,671,axghjfdy,,"[]",1,0,0,1.5
schema:
format: csv
type: string
@@ -8935,7 +8785,7 @@ paths:
required: true
schema:
type: integer
- - description: Filter results by campaign.
+ - description: Filter results by campaign ID.
in: query
name: campaignId
schema:
@@ -8995,9 +8845,6 @@ paths:
"200":
content:
application/csv:
- example: |
- id,created,campaignid,advocateprofileintegrationid,friendprofileintegrationid,startdate,expirydate,code,importid,attributes,batchid,counter,limitval
- 687,2021-09-10 09:21:06,3882,UGAV4628K,,,,3LFC-4BPC,,"{}",pimcxobg,0,9999
schema:
format: csv
type: string
@@ -9039,7 +8886,7 @@ paths:
required: true
schema:
type: integer
- - description: Filter results by campaign.
+ - description: Filter results by campaign ID.
in: query
name: campaignId
schema:
@@ -9072,10 +8919,6 @@ paths:
"200":
content:
application/csv:
- example: |
- created,name,applicationid,campaignid,rulesetid,ruleindex,sessionintegrationid,profileintegrationid,sessionid,profileid,eventid,event_type,total_revenue,props,couponid,store_id,store_integration_id
- 2021-06-02T21:14:16Z,rejectCoupon,270,0,0,0,newsession1,,9168,0,95797,talon_session_created,265.00,"{""value"": ""XMAS20"", ""rejectionReason"": ""CouponNotFound""}",,115,STORE-001
- 2021-09-01T13:04:04Z,setDiscountPerItem,270,3882,13599,0,test_flattening_2,integid_4,9707,4800,98806,talon_session_updated,405.00,"{""name"": ""10% off per item#1"", ""value"": 11.0, ""position"": 1}",,116,STORE-002
schema:
format: csv
type: string
@@ -9163,9 +9006,6 @@ paths:
"200":
content:
application/csv:
- example: |
- id,firstsession,integrationid,applicationid,profileid,profileintegrationid,created,state,cartitems,discounts,total,attributes,closedat,cancelledat,referral,identifiers,additional_costs,updated,store_integration_id,coupons
- 12328,true,62791173fbf323ee5cfd96f3,270,6111,dxclwds,2022-05-09T13:05:31Z,open,"[{""sku"": ""B00004TKVY"", ""name"": ""Gravel bike - \""Aisle of Man\"""", ""price"": 1800, ""weight"": 6, ""category"": ""gravelbikes"", ""position"": 0, ""quantity"": 1, ""attributes"": {""color"": [""black,white""], ""material"": ""titanium""}, ""returnedQuantity"": 0, ""remainingQuantity"": 1}]","{}",1850.00,"{""ShippingCost"": 50, ""PaymentMethod"": ""creditcard"", ""ShippingMethod"": ""Standard""}",0001-01-01T00:00:00Z,0001-01-01T00:00:00Z,,"null","{""ShippingCost"": {""price"": 50}}",2022-05-09T13:13:28Z,"STORE-001","[""SORRY5QMUJRWA""]"
schema:
format: csv
type: string
@@ -9275,7 +9115,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_41'
+ $ref: '#/components/schemas/inline_response_200_40'
description: OK
summary: List users in account
tags:
@@ -9717,7 +9557,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_42'
+ $ref: '#/components/schemas/inline_response_200_41'
description: OK
summary: Get audit logs for an account
tags:
@@ -9965,7 +9805,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_43'
+ $ref: '#/components/schemas/inline_response_200_42'
description: OK
summary: Get exports
tags:
@@ -9979,7 +9819,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_44'
+ $ref: '#/components/schemas/inline_response_200_43'
description: OK
summary: List roles
tags:
@@ -10083,7 +9923,7 @@ paths:
name: withTotalResultSize
schema:
type: boolean
- - description: Filter results by campaign.
+ - description: Filter results by campaign ID.
in: query
name: campaignId
schema:
@@ -10108,7 +9948,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_45'
+ $ref: '#/components/schemas/inline_response_200_44'
description: OK
summary: List stores
tags:
@@ -10302,11 +10142,6 @@ paths:
"200":
content:
application/csv:
- example: |
- store_integration_id
- STORE-001
- STORE-002
- STORE-003
schema:
format: csv
type: string
@@ -10486,7 +10321,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_46'
+ $ref: '#/components/schemas/inline_response_200_45'
description: OK
summary: List achievements
tags:
@@ -10740,10 +10575,6 @@ paths:
"200":
content:
application/csv:
- example: |
- profileIntegrationID,title,target,progress,status,startDate,endDate,completionDate
- user1231,CoffeeFree10Orders,10.00,5,inprogress,2023-12-10T11:42:25+01:00,2024-01-10T11:42:25+01:00,
- user341,CoffeeFree10Orders,10.00,10,completed,2023-12-10T11:42:25+01:00,2024-01-10T11:42:25+01:00,2023-12-20T10:24:34+01:00
schema:
format: csv
type: string
@@ -10819,7 +10650,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_200_47'
+ $ref: '#/components/schemas/inline_response_200_46'
description: OK
"400":
content:
@@ -10895,6 +10726,7 @@ components:
type: string
modified:
description: The time this entity was last modified.
+ example: 2021-09-25T10:34:12.956203Z
format: date-time
type: string
required:
@@ -11012,6 +10844,16 @@ components:
description: The ID of the loyalty program that owns this entity.
example: 125
type: integer
+ programName:
+ description: The integration name of the loyalty program that owns this
+ entity.
+ example: Loyalty_program
+ type: string
+ programTitle:
+ description: The Campaign Manager-displayed name of the loyalty program
+ that owns this entity.
+ example: Loyalty program
+ type: string
required:
- programID
type: object
@@ -11239,6 +11081,7 @@ components:
example: SUMMER-####-####
maxLength: 100
minLength: 3
+ pattern: ^[A-Za-z0-9_#-]*$
type: string
required:
- couponPattern
@@ -11295,7 +11138,6 @@ components:
- userId
type: object
LoginParams:
- description: ""
example:
password: admin123456
email: john.doe@example.com
@@ -11535,7 +11377,6 @@ components:
- timezone
type: object
Application:
- description: ""
example:
enableFlattenedCartItems: true
created: 2020-06-10T09:05:27.993483Z
@@ -11568,12 +11409,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -11625,10 +11466,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -11649,12 +11491,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -11706,10 +11548,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -11899,7 +11742,6 @@ components:
- name
type: object
CampaignGroup:
- description: ""
example:
accountId: 3886
created: 2020-06-10T09:05:27.993483Z
@@ -11972,7 +11814,6 @@ components:
- name
type: object
UpdateCampaignGroup:
- description: ""
properties:
name:
description: The name of the campaign access group.
@@ -12007,7 +11848,6 @@ components:
- name
type: object
NewCampaign:
- description: ""
properties:
name:
description: A user-facing name for this campaign.
@@ -12135,6 +11975,13 @@ components:
type: object
CampaignVersions:
properties:
+ revisionFrontendState:
+ description: The campaign revision state displayed in the Campaign Manager.
+ enum:
+ - revised
+ - pending
+ example: revised
+ type: string
activeRevisionId:
description: |
ID of the revision that was last activated on this campaign.
@@ -12527,21 +12374,14 @@ components:
- tags
type: object
Campaign:
- description: ""
example:
- callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -12583,22 +12423,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -12606,7 +12432,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -12614,12 +12439,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -12628,10 +12447,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -12674,9 +12523,7 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
properties:
id:
description: Unique ID for this entity.
@@ -12929,13 +12776,14 @@ components:
example: 3
type: integer
frontendState:
- description: A campaign state described exactly as in the Campaign Manager.
+ description: The campaign state displayed in the Campaign Manager.
enum:
- expired
- scheduled
- running
- disabled
- archived
+ - staged
example: running
type: string
storesImported:
@@ -12943,6 +12791,13 @@ components:
file.
example: true
type: boolean
+ revisionFrontendState:
+ description: The campaign revision state displayed in the Campaign Manager.
+ enum:
+ - revised
+ - pending
+ example: revised
+ type: string
activeRevisionId:
description: |
ID of the revision that was last activated on this campaign.
@@ -12991,7 +12846,6 @@ components:
- userId
type: object
Revision:
- description: ""
properties:
id:
description: Unique ID for this entity. Not to be confused with the Integration
@@ -13034,7 +12888,6 @@ components:
type: string
type: object
RevisionVersion:
- description: ""
properties:
id:
description: Unique ID for this entity. Not to be confused with the Integration
@@ -13193,6 +13046,30 @@ components:
type: string
type: array
type: object
+ NewValueMap:
+ type: object
+ ValueMap:
+ properties:
+ id:
+ description: Unique ID for this entity. Not to be confused with the Integration
+ ID, which is set by your integration layer and used in most endpoints.
+ example: 6
+ type: integer
+ created:
+ example: 2021-07-20T22:00:00Z
+ format: date-time
+ type: string
+ createdBy:
+ description: The ID of the user who created the value map.
+ example: 216
+ type: integer
+ campaignId:
+ example: 244
+ type: integer
+ required:
+ - campaignId
+ - id
+ type: object
CampaignBudget:
example:
limit: 1000.0
@@ -13349,13 +13226,14 @@ components:
example: 3
type: integer
frontendState:
- description: A campaign state described exactly as in the Campaign Manager.
+ description: The campaign state displayed in the Campaign Manager.
enum:
- expired
- scheduled
- running
- disabled
- archived
+ - staged
example: running
type: string
storesImported:
@@ -13403,7 +13281,6 @@ components:
- rules
type: object
Ruleset:
- description: ""
example:
rbVersion: v2
created: 2020-06-10T09:05:27.993483Z
@@ -13633,7 +13510,6 @@ components:
description: A Talang expression that will be evaluated and its result attached
to the name of the binding.
items:
- properties: {}
type: object
type: array
valueType:
@@ -13716,7 +13592,6 @@ components:
- and
- - couponValid
items:
- properties: {}
type: object
minItems: 1
type: array
@@ -13745,7 +13620,6 @@ components:
- title
type: object
TemplateLimitConfig:
- description: ""
example:
period: yearly
entities:
@@ -13786,6 +13660,8 @@ components:
- Referral
- Profile
- Identifier
+ - Store
+ - Session
type: string
type: array
required:
@@ -13834,6 +13710,8 @@ components:
- Referral
- Profile
- Identifier
+ - Store
+ - Session
type: string
type: array
required:
@@ -13842,7 +13720,6 @@ components:
- limit
type: object
CampaignSet:
- description: ""
properties:
applicationId:
description: The ID of the application that owns this entity.
@@ -13950,7 +13827,6 @@ components:
- type
type: object
NewCampaignSet:
- description: ""
properties:
applicationId:
description: The ID of the application that owns this entity.
@@ -14013,7 +13889,6 @@ components:
- parentId
type: object
UpdateCampaignEvaluationGroup:
- description: ""
properties:
name:
description: The name of the campaign evaluation group.
@@ -14058,7 +13933,6 @@ components:
- parentId
type: object
CampaignEvaluationGroup:
- description: ""
properties:
applicationId:
description: The ID of the application that owns this entity.
@@ -14173,7 +14047,6 @@ components:
- batchID
type: object
NewReferral:
- description: ""
example:
expiryDate: 2021-11-10T23:00:00Z
friendProfileIntegrationId: BZGGC2454PA
@@ -14240,7 +14113,6 @@ components:
type: integer
type: object
Referral:
- description: ""
example:
code: 27G47Y54VH9L
created: 2020-06-10T09:05:27.993483Z
@@ -14381,7 +14253,6 @@ components:
type: object
type: object
NewReferralsForMultipleAdvocates:
- description: ""
example:
expiryDate: 2021-11-10T23:00:00Z
advocateProfileIntegrationIds:
@@ -14512,7 +14383,6 @@ components:
- usageLimit
type: object
InventoryReferral:
- description: ""
example:
code: 27G47Y54VH9L
created: 2020-06-10T09:05:27.993483Z
@@ -14716,7 +14586,6 @@ components:
- applicationIds
type: object
NewCoupons:
- description: ""
example:
recipientIntegrationId: URNGV8294NV
uniquePrefix: ""
@@ -14851,7 +14720,6 @@ components:
- usageLimit
type: object
NewCouponsForMultipleRecipients:
- description: ""
example:
expiryDate: 2023-08-24T14:15:22Z
couponPattern: SUMMER-#####
@@ -14987,7 +14855,6 @@ components:
- usageLimit
type: object
UpdateCoupon:
- description: ""
example:
expiryDate: 2023-08-24T14:15:22Z
recipientIntegrationId: URNGV8294NV
@@ -15077,7 +14944,6 @@ components:
type: boolean
type: object
UpdateCouponBatch:
- description: ""
example:
expiryDate: 2023-08-24T14:15:22Z
usageLimit: 100
@@ -15134,7 +15000,6 @@ components:
type: string
type: object
Coupon:
- description: ""
example:
recipientIntegrationId: URNGV8294NV
implicitlyReserved: false
@@ -15311,7 +15176,6 @@ components:
- value
type: object
IntegrationCoupon:
- description: ""
example:
recipientIntegrationId: URNGV8294NV
implicitlyReserved: false
@@ -15515,7 +15379,6 @@ components:
- limit
type: object
InventoryCoupon:
- description: ""
example:
recipientIntegrationId: URNGV8294NV
implicitlyReserved: false
@@ -15714,7 +15577,6 @@ components:
- value
type: object
CampaignAnalytics:
- description: ""
example:
date: 2021-10-12T10:12:42Z
couponRolledbackRedemptions: 2
@@ -16066,7 +15928,7 @@ components:
example: 12
type: integer
url:
- description: Target url of request
+ description: The target URL of the request.
example: www.my-company.com/my-endpoint-name
type: string
request:
@@ -16144,6 +16006,14 @@ components:
description: The name of the notification.
example: My campaign notification
type: string
+ webhookId:
+ description: ID of the webhook.
+ example: 101
+ type: integer
+ webhookName:
+ description: The name of the webhook.
+ example: My webhook
+ type: string
request:
$ref: '#/components/schemas/MessageLogRequest'
response:
@@ -16155,12 +16025,17 @@ components:
type: string
entityType:
description: |
- The entity type the notification is related to.
+ The entity type the log is related to.
enum:
- application
- loyalty_program
+ - webhook
example: loyalty_program
type: string
+ url:
+ description: The target URL of the request.
+ example: www.my-company.com/my-endpoint-name
+ type: string
applicationId:
description: Identifier of the Application.
example: 5
@@ -16171,8 +16046,14 @@ components:
example: 2
minimum: 1
type: integer
+ campaignId:
+ description: Identifier of the campaign.
+ example: 2
+ minimum: 1
+ type: integer
required:
- createdAt
+ - entityType
- id
- service
type: object
@@ -16252,14 +16133,13 @@ components:
- webhookId
type: object
User:
- description: ""
example:
created: 2020-06-10T09:05:27.993483Z
roles:
- 71
isAdmin: false
accountId: 3886
- applicationNotificationSubscriptions: '{}'
+ applicationNotificationSubscriptions: {}
inviteToken: Gy9b8w1irmQtEPo5RmbMmSPheL5h4
name: John Doe
modified: 2021-09-12T10:12:42Z
@@ -16272,7 +16152,7 @@ components:
email: john.doe@example.com
policy:
Role: 127
- additionalAttributes: '{}'
+ additionalAttributes: {}
properties:
id:
description: Internal ID of this entity.
@@ -16339,6 +16219,7 @@ components:
type: string
applicationNotificationSubscriptions:
description: Application notifications that the user is subscribed to.
+ example: {}
properties: {}
type: object
lastSignedIn:
@@ -16359,6 +16240,7 @@ components:
additionalAttributes:
description: Additional user attributes, created and used by external identity
providers.
+ example: {}
properties: {}
type: object
required:
@@ -16373,7 +16255,6 @@ components:
- state
type: object
DeactivateUserRequest:
- description: ""
example:
email: john.doe@example.com
properties:
@@ -16386,31 +16267,9 @@ components:
- email
type: object
ActivateUserRequest:
- description: ""
- example:
- email: john.doe@example.com
- properties:
- email:
- description: The email address associated with the user profile.
- example: john.doe@example.com
- format: email
- type: string
- required:
- - email
- type: object
+ $ref: '#/components/schemas/DeactivateUserRequest'
DeleteUserRequest:
- description: ""
- example:
- email: john.doe@example.com
- properties:
- email:
- description: The email address associated with the user profile.
- example: john.doe@example.com
- format: email
- type: string
- required:
- - email
- type: object
+ $ref: '#/components/schemas/DeactivateUserRequest'
OktaEventTarget:
description: Target of the specific Okta event.
properties:
@@ -16507,6 +16366,8 @@ components:
type: string
name:
$ref: '#/components/schemas/ScimBaseUser_name'
+ required:
+ - userName
type: object
ScimUser:
description: Schema definition for users that have been provisioned using the
@@ -16539,6 +16400,7 @@ components:
type: string
required:
- id
+ - userName
type: object
ScimResource:
description: Resource definition for the SCIM provisioning protocol.
@@ -16594,7 +16456,7 @@ components:
Resources:
- active: true
displayName: John Doe
- id: 283
+ id: "283"
meta:
resourceType: User
created: 2024-06-25T17:43:46+02:00
@@ -16652,7 +16514,7 @@ components:
Operations:
- op: replace
path: active
- value: false
+ value: test
- op: add
path: nickName
value: johndoe
@@ -16707,6 +16569,8 @@ components:
supported: true
schemas:
- urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig
+ x-sort:
+ supported: false
properties:
bulk:
$ref: '#/components/schemas/ScimServiceProviderConfigResponse_bulk'
@@ -16726,6 +16590,8 @@ components:
items:
type: string
type: array
+ sort:
+ $ref: '#/components/schemas/ScimServiceProviderConfigResponse_sort'
type: object
ScimSchemasListResponse:
description: List of resource schemas supported by the SCIM provisioning protocol.
@@ -16776,8 +16642,8 @@ components:
description: Parameters for inviting a new user.
example:
roles:
- - 0
- - 0
+ - 13
+ - 13
name: John Doe
isAdmin: false
acl: acl
@@ -16799,6 +16665,7 @@ components:
roles:
description: A list of the IDs of the roles assigned to the user.
items:
+ example: 13
type: integer
type: array
acl:
@@ -16841,7 +16708,6 @@ components:
- email
type: object
Change:
- description: ""
example:
new:
applicationId": 359
@@ -16854,7 +16720,7 @@ components:
- loyalty
id: 6727
created: 2020-06-10T09:05:27.993483Z
- old: '{}'
+ old: {}
id: 6
applicationId: 359
userId: 388
@@ -16884,6 +16750,7 @@ components:
type: string
old:
description: Resource before the change occurred.
+ example: {}
properties: {}
type: object
new:
@@ -17043,7 +16910,7 @@ components:
- points
type: object
LoyaltyProgram:
- description: ""
+ description: A Loyalty Program
example:
cardBased: true
tiers:
@@ -17056,12 +16923,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -17113,10 +16980,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -17128,7 +16996,8 @@ components:
name: my_program
properties:
id:
- description: The ID of loyalty program. Internal ID of this entity.
+ description: The ID of loyalty program.
+ example: 139
type: integer
created:
description: The time this entity was created.
@@ -17252,6 +17121,15 @@ components:
type: string
cardCodeSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ returnPolicy:
+ description: |
+ The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
+ - `only_pending`: Only pending points can be rolled back.
+ - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ enum:
+ - only_pending
+ - within_balance
+ type: string
accountID:
description: The ID of the Talon.One account that owns this program.
example: 1
@@ -17273,12 +17151,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
items:
$ref: '#/components/schemas/LoyaltyTier'
type: array
@@ -17338,8 +17216,13 @@ components:
- timezone
- title
type: object
+ LoyaltyTiers:
+ description: A list of the loyalty program's tiers.
+ items:
+ $ref: '#/components/schemas/LoyaltyTier'
+ type: array
LoyaltyTier:
- description: ""
+ description: A tier in a loyalty program.
properties:
id:
description: Internal ID of this entity.
@@ -17354,15 +17237,23 @@ components:
description: The ID of the loyalty program that owns this entity.
example: 125
type: integer
+ programName:
+ description: The integration name of the loyalty program that owns this
+ entity.
+ example: Loyalty_program
+ type: string
+ programTitle:
+ description: The Campaign Manager-displayed name of the loyalty program
+ that owns this entity.
+ example: Loyalty program
+ type: string
name:
- description: The name of the tier
+ description: The name of the tier.
example: Gold
type: string
minPoints:
- description: The minimum amount of points required to be eligible for the
- tier.
+ description: The minimum amount of points required to enter the tier.
example: 300.0
- exclusiveMaximum: false
maximum: 999999999999.99
minimum: 0
type: number
@@ -17377,14 +17268,12 @@ components:
description: A tier in a loyalty program.
properties:
name:
- description: The name of the tier
+ description: The name of the tier.
example: Gold
type: string
minPoints:
- description: The minimum amount of points required to be eligible for the
- tier.
+ description: The minimum amount of points required to enter the tier.
example: 300.0
- exclusiveMaximum: false
maximum: 999999999999.99
minimum: 0
type: number
@@ -17511,9 +17400,18 @@ components:
type: string
cardCodeSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ returnPolicy:
+ description: |
+ The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
+ - `only_pending`: Only pending points can be rolled back.
+ - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ enum:
+ - only_pending
+ - within_balance
+ type: string
type: object
NewLoyaltyProgram:
- description: ""
+ description: A new loyalty program
properties:
title:
description: The display title for the Loyalty Program.
@@ -17632,6 +17530,15 @@ components:
type: string
cardCodeSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ returnPolicy:
+ description: |
+ The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
+ - `only_pending`: Only pending points can be rolled back.
+ - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ enum:
+ - only_pending
+ - within_balance
+ type: string
name:
description: The internal name for the Loyalty Program. This is an immutable
value.
@@ -17665,7 +17572,7 @@ components:
- title
type: object
UpdateLoyaltyProgram:
- description: ""
+ description: An updated loyalty program.
properties:
title:
description: The display title for the Loyalty Program.
@@ -17784,12 +17691,46 @@ components:
type: string
cardCodeSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ returnPolicy:
+ description: |
+ The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
+ - `only_pending`: Only pending points can be rolled back.
+ - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ enum:
+ - only_pending
+ - within_balance
+ type: string
tiers:
description: The tiers in this loyalty program.
items:
$ref: '#/components/schemas/NewLoyaltyTier'
type: array
type: object
+ UpdateLoyaltyProgramTier:
+ description: Update a tier in a specified loyalty program.
+ properties:
+ id:
+ description: The internal ID of the tier.
+ example: 6
+ type: integer
+ name:
+ description: The name of the tier.
+ example: Gold
+ type: string
+ minPoints:
+ description: The minimum amount of points required to enter the tier.
+ example: 300.0
+ maximum: 999999999999.99
+ minimum: 0
+ type: number
+ required:
+ - id
+ type: object
+ UpdateLoyaltyProgramTiers:
+ description: List of tiers that are updated by the request.
+ items:
+ $ref: '#/components/schemas/UpdateLoyaltyProgramTier'
+ type: array
LoyaltyLedgerTransactions:
description: List of loyalty ledger transactions.
properties:
@@ -17889,7 +17830,7 @@ components:
- type
type: object
LoyaltyCardBalances:
- description: ""
+ description: List of customer profiles linked to the loyalty card.
example:
balance:
activePoints: 286.0
@@ -17977,7 +17918,7 @@ components:
type: number
type: object
LoyaltyBalanceWithTier:
- description: ""
+ description: Point balance of a ledger in the Loyalty Program.
example:
projectedTier:
projectedActivePoints: 198.0
@@ -18235,10 +18176,11 @@ components:
startDate: 2021-07-20T22:00:00Z
subLedgers:
mysubledger:
- activePoints: 286
- pendingPoints: 50
- spentPoints: 150
- expiredPoints: 25
+ total: 0
+ totalActivePoints: 286
+ totalPendingPoints: 50
+ totalSpentPoints: 150
+ totalExpiredPoints: 25
properties:
ledger:
$ref: '#/components/schemas/LoyaltySubLedger'
@@ -18248,10 +18190,11 @@ components:
description: A map containing a list of all loyalty subledger balances.
example:
mysubledger:
- activePoints: 286
- pendingPoints: 50
- spentPoints: 150
- expiredPoints: 25
+ total: 0
+ totalActivePoints: 286
+ totalPendingPoints: 50
+ totalSpentPoints: 150
+ totalExpiredPoints: 25
type: object
required:
- ledger
@@ -18517,6 +18460,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -18562,6 +18507,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -18690,7 +18637,7 @@ components:
- title
type: object
LedgerInfo:
- description: ""
+ description: The balance in a Loyalty Program for some Customer.
example:
pendingBalance: 10.0
currentBalance: 100.0
@@ -18729,17 +18676,18 @@ components:
title: Spent balance
type: number
tentativeCurrentBalance:
- description: Sum of the tentative active points (including additions and
- deductions) inside the currently open session. The `currentBalance` is
- updated to this value when you close the session, and the effects are
- applied.
+ description: |
+ The tentative points balance, reflecting the `currentBalance` and all point additions and deductions within the current open customer session. When the session is closed, the effects are applied and the `currentBalance` is updated to this value.
+
+ **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
example: 100.0
title: Tentative current balance
type: number
tentativePendingBalance:
- description: Sum of pending points (including additions and deductions)
- inside the currently open session. The `pendingBalance` is updated to
- this value when you close the session, and the effects are applied.
+ description: |
+ The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value.
+
+ **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
example: 20.0
title: Tentative pending balance
type: number
@@ -18882,6 +18830,7 @@ components:
customerProfileIds:
- R195412
- G244519
+ cardIdentifier: summer-loyalty-card-0543
properties:
status:
default: active
@@ -18899,9 +18848,15 @@ components:
items:
type: string
type: array
+ cardIdentifier:
+ description: |
+ The alphanumeric identifier of the loyalty card.
+ example: summer-loyalty-card-0543
+ maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
+ type: string
type: object
LoyaltyCard:
- description: ""
example:
ledger:
pendingBalance: 10.0
@@ -18942,6 +18897,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -18962,6 +18919,16 @@ components:
description: The ID of the loyalty program that owns this entity.
example: 125
type: integer
+ programName:
+ description: The integration name of the loyalty program that owns this
+ entity.
+ example: Loyalty_program
+ type: string
+ programTitle:
+ description: The Campaign Manager-displayed name of the loyalty program
+ that owns this entity.
+ example: Loyalty program
+ type: string
status:
description: |
Status of the loyalty card. Can be `active` or `inactive`.
@@ -18977,6 +18944,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
usersPerCardLimit:
description: |
@@ -19007,12 +18975,14 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
newCardIdentifier:
description: |
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
batchId:
description: The ID of the batch in which the loyalty card was created.
@@ -19031,6 +19001,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
CardLedgerTransactionLogEntry:
description: Log entry for a given loyalty card transaction.
@@ -19062,6 +19033,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
applicationId:
description: The ID of the Application that owns this entity.
@@ -19163,6 +19135,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
customerSessionId:
description: ID of the customer session where the transaction occurred.
@@ -19552,6 +19525,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
subledgerId:
description: ID of the subledger.
@@ -19608,6 +19582,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
blockReason:
description: |
@@ -19692,17 +19667,18 @@ components:
title: Spent balance
type: number
tentativeCurrentBalance:
- description: Sum of the tentative active points (including additions and
- deductions) inside the currently open session. The `currentBalance` is
- updated to this value when you close the session, and the effects are
- applied.
+ description: |
+ The tentative points balance, reflecting the `currentBalance` and all point additions and deductions within the current open customer session. When the session is closed, the effects are applied and the `currentBalance` is updated to this value.
+
+ **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
example: 100.0
title: Tentative current balance
type: number
tentativePendingBalance:
- description: Sum of pending points (including additions and deductions)
- inside the currently open session. The `pendingBalance` is updated to
- this value when you close the session, and the effects are applied.
+ description: |
+ The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value.
+
+ **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
example: 20.0
title: Tentative pending balance
type: number
@@ -19763,11 +19739,10 @@ components:
type: array
type: object
CustomerProfile:
- description: ""
example:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -19777,9 +19752,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -19792,8 +19767,8 @@ components:
example: 6
type: integer
created:
- description: The time this entity was created. The time this entity was
- created.
+ description: The time this entity was created.
+ example: 2020-02-07T08:15:22Z
format: date-time
type: string
integrationId:
@@ -20003,7 +19978,7 @@ components:
profile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -20013,9 +19988,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -20063,6 +20038,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -20108,6 +20085,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -20197,8 +20176,46 @@ components:
type: array
type: object
LoyaltyCardBatch:
- description: ""
example:
+ cardCodeSettings:
+ couponPattern: SUMMER-####-####
+ validCharacters:
+ - A
+ - B
+ - C
+ - D
+ - E
+ - F
+ - G
+ - H
+ - I
+ - J
+ - K
+ - L
+ - M
+ - "N"
+ - O
+ - P
+ - Q
+ - R
+ - S
+ - T
+ - U
+ - V
+ - W
+ - X
+ - "Y"
+ - Z
+ - "0"
+ - "1"
+ - "2"
+ - "3"
+ - "4"
+ - "5"
+ - "6"
+ - "7"
+ - "8"
+ - "9"
numberOfCards: 5000
batchId: hwernpjz
status: active
@@ -20222,6 +20239,8 @@ components:
- inactive
example: active
type: string
+ cardCodeSettings:
+ $ref: '#/components/schemas/CodeGeneratorSettings'
required:
- numberOfCards
type: object
@@ -20243,7 +20262,6 @@ components:
- numberOfCardsGenerated
type: object
NewCustomerSession:
- description: ""
properties:
profileId:
description: |
@@ -20325,7 +20343,7 @@ components:
storeIntegrationId: STORE-001
profileId: URNGV8294NV
identifiers:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
evaluableCampaignIds:
- 10
- 12
@@ -20410,7 +20428,7 @@ components:
**Important - for requests only**:
- If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it.
- - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `"couponCodes": null` or omit the parameter entirely.
+ - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, omit the parameter entirely.
example:
- XMAS-20-2021
items:
@@ -20425,7 +20443,7 @@ components:
**Important - for requests only**:
- If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it.
- - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `"referralCode": null` or omit the parameter entirely.
+ - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, omit the parameter entirely.
example: NT2K54D9
maxLength: 100
title: Referral code entered in session
@@ -20491,8 +20509,9 @@ components:
- You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types)
for your campaign.
- Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
+ - We recommend passing an anonymized (hashed) version of the identifier value.
example:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
items:
type: string
maxItems: 5
@@ -20627,10 +20646,10 @@ components:
- totalOrdersNoCoupon
type: object
CustomerSession:
- description: ""
properties:
integrationId:
description: The integration ID set by your integration layer.
+ example: URNGV8294NV
format: string
maxLength: 1000
type: string
@@ -20744,14 +20763,15 @@ components:
- updated
type: object
CustomerSessionV2:
- description: ""
+ description: The representation of the customer session.
example:
couponCodes:
- XMAS-20-2021
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
identifiers:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
integrationId: URNGV8294NV
+ closurePrediction: 0.283
total: 119.99
loyaltyCards:
- loyalty-card-1
@@ -20822,8 +20842,8 @@ components:
example: 6
type: integer
created:
- description: The time this entity was created. The time this entity was
- created.
+ description: The time this entity was created.
+ example: 2020-02-07T08:15:22Z
format: date-time
type: string
integrationId:
@@ -20869,7 +20889,7 @@ components:
**Important - for requests only**:
- If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it.
- - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `"couponCodes": null` or omit the parameter entirely.
+ - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, omit the parameter entirely.
example:
- XMAS-20-2021
items:
@@ -20884,7 +20904,7 @@ components:
**Important - for requests only**:
- If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it.
- - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `"referralCode": null` or omit the parameter entirely.
+ - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, omit the parameter entirely.
example: NT2K54D9
maxLength: 100
title: Referral code entered in session
@@ -20950,8 +20970,9 @@ components:
- You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types)
for your campaign.
- Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
+ - We recommend passing an anonymized (hashed) version of the identifier value.
example:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
items:
type: string
maxItems: 5
@@ -20969,7 +20990,7 @@ components:
type: object
firstSession:
description: Indicates whether this is the first session for the customer's
- profile. Will always be true for anonymous sessions.
+ profile. It's always `true` for anonymous sessions.
example: true
title: First session ever?
type: boolean
@@ -20996,6 +21017,12 @@ components:
format: date-time
title: Last activity on the session
type: string
+ closurePrediction:
+ description: The likelihood of the customer session closing based on predictive
+ modeling, expressed as a decimal between `0` and `1`.
+ example: 0.283
+ title: Session Closure Probability
+ type: number
required:
- additionalCostTotal
- applicationId
@@ -21132,7 +21159,6 @@ components:
- quantity
- sku
type: object
- x-attributable: true
NewApplicationCIF:
properties:
name:
@@ -21188,7 +21214,6 @@ components:
type: string
type: object
ApplicationCIF:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -21264,12 +21289,10 @@ components:
- Category
- Kitchen
items:
- properties: {}
type: object
type: array
type: object
ApplicationCIFExpression:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -21306,7 +21329,6 @@ components:
- Category
- Kitchen
items:
- properties: {}
type: object
type: array
applicationId:
@@ -21328,7 +21350,6 @@ components:
- price
type: object
IntegrationEvent:
- description: ""
properties:
profileId:
description: |
@@ -21362,7 +21383,6 @@ components:
- type
type: object
NewEvent:
- description: ""
properties:
profileId:
description: |
@@ -21402,7 +21422,6 @@ components:
- type
type: object
Event:
- description: ""
example:
effects:
- '{}'
@@ -21545,7 +21564,7 @@ components:
customerProfile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -21555,9 +21574,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -21605,6 +21624,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -21650,6 +21671,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -21854,19 +21877,13 @@ components:
id: 6
startDate: 2020-11-10T23:00:00Z
triggeredCampaigns:
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -21908,22 +21925,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -21931,7 +21934,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -21939,12 +21941,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -21953,10 +21949,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -21999,22 +22025,14 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -22056,22 +22074,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -22079,7 +22083,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -22087,12 +22090,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -22101,10 +22098,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -22147,9 +22174,7 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
coupons:
- recipientIntegrationId: URNGV8294NV
implicitlyReserved: false
@@ -22220,10 +22245,11 @@ components:
customerSession:
couponCodes:
- XMAS-20-2021
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
identifiers:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
integrationId: URNGV8294NV
+ closurePrediction: 0.283
total: 119.99
loyaltyCards:
- loyalty-card-1
@@ -22494,19 +22520,13 @@ components:
ruleName: Give 20% discount
triggeredByCoupon: 4928
triggeredCampaigns:
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -22548,22 +22568,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -22571,7 +22577,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -22579,12 +22584,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -22593,10 +22592,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -22639,22 +22668,14 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -22696,22 +22717,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -22719,7 +22726,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -22727,12 +22733,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -22741,10 +22741,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -22787,13 +22817,11 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
customerProfile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -22803,9 +22831,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -22853,6 +22881,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -22898,6 +22928,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -23201,19 +23233,13 @@ components:
ruleName: Give 20% discount
triggeredByCoupon: 4928
triggeredCampaigns:
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -23255,22 +23281,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -23278,7 +23290,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -23286,12 +23297,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -23300,10 +23305,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -23346,22 +23381,14 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -23403,22 +23430,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -23426,7 +23439,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -23434,12 +23446,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -23448,10 +23454,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -23494,13 +23530,11 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
customerProfile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -23510,9 +23544,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -23560,6 +23594,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -23605,6 +23641,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -23924,7 +23962,7 @@ components:
customerProfile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -23934,9 +23972,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -23981,10 +24019,11 @@ components:
customerSession:
couponCodes:
- XMAS-20-2021
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
identifiers:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
integrationId: URNGV8294NV
+ closurePrediction: 0.283
total: 119.99
loyaltyCards:
- loyalty-card-1
@@ -24053,28 +24092,31 @@ components:
customerSession:
$ref: '#/components/schemas/CustomerSessionV2'
effects:
+ description: |
+ The returned effects.
+
+ **Note:** This endpoint returns only the effects that are valid after any rollback effects and their corresponding non-rollback effects are removed.
items:
$ref: '#/components/schemas/Effect'
type: array
type: object
ApplicationCustomer:
- description: ""
example:
- accountId: 6
+ accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
- integrationId: integrationId
+ integrationId: URNGV8294NV
attributes:
Language: english
ShippingCountry: DE
totalSales: 299.99
lastActivity: 2020-02-08T14:15:20Z
- id: 0
+ id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
advocateIntegrationId: advocateIntegrationId
audienceMemberships:
@@ -24084,16 +24126,17 @@ components:
id: 2
properties:
id:
- description: Internal ID of this entity. Internal ID of this entity.
+ description: Internal ID of this entity.
+ example: 6
type: integer
created:
- description: The time this entity was created. The time this entity was
- created. The time this entity was created. The time this entity was created.
+ description: The time this entity was created.
+ example: 2020-02-07T08:15:22Z
format: date-time
type: string
integrationId:
- description: The integration ID set by your integration layer. The integration
- ID set by your integration layer.
+ description: The integration ID set by your integration layer.
+ example: URNGV8294NV
format: string
maxLength: 1000
type: string
@@ -24105,8 +24148,9 @@ components:
properties: {}
type: object
accountId:
- description: The ID of the Talon.One account that owns this profile. The
- ID of the Talon.One account that owns this profile.
+ description: The ID of the Talon.One account that owns this profile.
+ example: 31
+ title: Profile belongs to Account
type: integer
closedSessions:
description: The total amount of closed sessions by a customer. A closed
@@ -24171,15 +24215,14 @@ components:
- totalSales
type: object
AudienceCustomer:
- description: ""
properties:
id:
description: Internal ID of this entity.
example: 6
type: integer
created:
- description: The time this entity was created. The time this entity was
- created.
+ description: The time this entity was created.
+ example: 2020-02-07T08:15:22Z
format: date-time
type: string
integrationId:
@@ -24278,7 +24321,6 @@ components:
- totalSales
type: object
ApplicationReferee:
- description: ""
example:
friendIntegrationId: friendIntegrationId
code: code
@@ -24321,10 +24363,9 @@ components:
- sessionId
type: object
ApplicationSession:
- description: ""
example:
coupon: BKDB946
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
totalDiscounts: 100.0
integrationId: URNGV8294NV
profileintegrationid: 382370BKDB946
@@ -24387,8 +24428,8 @@ components:
example: 6
type: integer
created:
- description: The time this entity was created. The time this entity was
- created.
+ description: The time this entity was created.
+ example: 2020-02-07T08:15:22Z
format: date-time
type: string
integrationId:
@@ -24482,7 +24523,6 @@ components:
- totalDiscounts
type: object
ApplicationEvent:
- description: ""
example:
effects:
- rulesetId: 73
@@ -24622,7 +24662,7 @@ components:
example:
liveActiveCampaigns: 10
expiredCoupons: 200
- lastUpdatedAt: 2000-01-23T04:56:07.000+00:00
+ lastUpdatedAt: 2022-12-12T12:12:12Z
roles: 10
activeCampaigns: 15
activeCoupons: 650
@@ -24719,6 +24759,7 @@ components:
type: integer
lastUpdatedAt:
description: The point in time when the analytics numbers were updated last.
+ example: 2022-12-12T12:12:12Z
format: date-time
type: string
required:
@@ -24827,7 +24868,6 @@ components:
- companyName
type: object
Account:
- description: ""
example:
applicationCount: 5
planExpires: 2000-01-23T04:56:07.000+00:00
@@ -24929,7 +24969,6 @@ components:
- userCount
type: object
NewAccountSignUp:
- description: ""
properties:
email:
description: The email address associated with the user profile.
@@ -24949,7 +24988,6 @@ components:
- password
type: object
NewUser:
- description: ""
properties:
email:
description: The email address associated with the user profile.
@@ -25084,7 +25122,6 @@ components:
- resetToken
type: object
Environment:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -25216,7 +25253,6 @@ components:
- type
type: object
TemplateArgDef:
- description: ""
properties:
type:
description: The type of value this argument expects.
@@ -25242,6 +25278,9 @@ components:
this argument.
properties: {}
type: object
+ key:
+ description: The identifier for the associated value within the JSON object.
+ type: string
picklistID:
description: ID of the picklist linked to a template.
type: integer
@@ -25316,6 +25355,26 @@ components:
- name
- type
type: object
+ CampaignTemplateCouponReservationSettings:
+ example:
+ reservationLimit: 45
+ isReservationMandatory: false
+ properties:
+ reservationLimit:
+ description: |
+ The number of reservations that can be made with this coupon code.
+ example: 45
+ maximum: 999999
+ minimum: 0
+ type: integer
+ isReservationMandatory:
+ default: false
+ description: An indication of whether the code can be redeemed only if it
+ has been reserved first.
+ example: false
+ title: Is reservation mandatory
+ type: boolean
+ type: object
NewCampaignTemplate:
properties:
name:
@@ -25371,6 +25430,8 @@ components:
type: array
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ couponReservationSettings:
+ $ref: '#/components/schemas/CampaignTemplateCouponReservationSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
@@ -25476,6 +25537,8 @@ components:
type: array
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ couponReservationSettings:
+ $ref: '#/components/schemas/CampaignTemplateCouponReservationSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
@@ -25545,38 +25608,23 @@ components:
- name
type: object
CampaignTemplate:
- description: ""
example:
- activeRulesetId: 5
instructions: Use this template for discount campaigns. Set the campaign properties
according to the campaign goals, and don't forget to set an end date.
- campaignAttributes: '{}'
- applicationsIds:
- - 0
- - 0
- campaignType: advanced
- updatedBy: Jane Doe
campaignCollections:
- name: My collection
description: My collection of SKUs
- name: My collection
description: My collection of SKUs
- created: 2020-06-10T09:05:27.993483Z
defaultCampaignGroupId: 42
description: This is a template for a discount campaign.
- userId: 388
- tags:
- - discount
- accountId: 3886
features:
- coupons
- coupons
- validApplicationIds:
- - 1
- - 2
- - 3
- name: Discount campaign
- referralSettings:
+ couponReservationSettings:
+ reservationLimit: 45
+ isReservationMandatory: false
+ couponSettings:
couponPattern: SUMMER-####-####
validCharacters:
- A
@@ -25615,7 +25663,51 @@ components:
- "7"
- "8"
- "9"
- couponSettings:
+ templateParams:
+ - attributeId: 42
+ name: discount_value
+ description: This is a template parameter of type `number`.
+ type: number
+ - attributeId: 42
+ name: discount_value
+ description: This is a template parameter of type `number`.
+ type: number
+ id: 6
+ couponAttributes: '{}'
+ state: draft
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 5
+ campaignAttributes: '{}'
+ applicationsIds:
+ - 1
+ - 2
+ - 3
+ - 1
+ - 2
+ - 3
+ campaignType: advanced
+ updatedBy: Jane Doe
+ created: 2020-06-10T09:05:27.993483Z
+ userId: 388
+ tags:
+ - discount
+ accountId: 3886
+ validApplicationIds:
+ - 1
+ - 2
+ - 3
+ name: Discount campaign
+ referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
- A
@@ -25654,30 +25746,7 @@ components:
- "7"
- "8"
- "9"
- templateParams:
- - attributeId: 42
- name: discount_value
- description: This is a template parameter of type `number`.
- type: number
- - attributeId: 42
- name: discount_value
- description: This is a template parameter of type `number`.
- type: number
- id: 6
- couponAttributes: '{}'
- state: draft
updated: 2022-08-24T14:15:22Z
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
properties:
id:
description: Internal ID of this entity.
@@ -25759,6 +25828,8 @@ components:
type: array
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
+ couponReservationSettings:
+ $ref: '#/components/schemas/CampaignTemplateCouponReservationSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
@@ -25774,8 +25845,14 @@ components:
applicationsIds:
description: A list of IDs of the Applications that are subscribed to this
campaign template.
+ example:
+ - 1
+ - 2
+ - 3
+ - 1
+ - 2
+ - 3
items:
- description: ""
type: integer
type: array
campaignCollections:
@@ -26127,19 +26204,13 @@ components:
templateId: 3
userId: 388
campaign:
- callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -26181,22 +26252,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -26204,7 +26261,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -26212,12 +26268,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -26226,10 +26276,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -26272,9 +26352,7 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
properties:
campaign:
$ref: '#/components/schemas/Campaign'
@@ -26310,7 +26388,6 @@ components:
description: A Talang expression that contains variable bindings referring
to args.
items:
- properties: {}
type: object
type: array
args:
@@ -26329,7 +26406,6 @@ components:
- title
type: object
TemplateDef:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -26364,7 +26440,6 @@ components:
description: A Talang expression that contains variable bindings referring
to args.
items:
- properties: {}
type: object
type: array
args:
@@ -26393,7 +26468,6 @@ components:
- title
type: object
NewAttribute:
- description: ""
example:
editable: true
subscribedApplicationsIds:
@@ -26543,7 +26617,6 @@ components:
- type
type: object
Attribute:
- description: ""
example:
created: 2020-06-10T09:05:27.993483Z
editable: true
@@ -26716,7 +26789,6 @@ components:
- type
type: object
NewAdditionalCost:
- description: ""
example:
name: shippingFee
subscribedApplicationsIds:
@@ -26770,7 +26842,6 @@ components:
- title
type: object
AccountAdditionalCost:
- description: ""
example:
accountId: 3886
created: 2020-06-10T09:05:27.993483Z
@@ -26843,7 +26914,6 @@ components:
- title
type: object
NewEventType:
- description: ""
properties:
title:
description: The human-friendly name for this event type.
@@ -26866,7 +26936,6 @@ components:
- title
type: object
EventType:
- description: ""
example:
created: 2020-06-10T09:05:27.993483Z
name: surveyCompleted
@@ -26906,13 +26975,13 @@ components:
- title
type: object
NewWebhook:
- description: ""
properties:
applicationIds:
- description: The IDs of the Applications that are related to this entity.
+ description: |
+ The IDs of the Applications in which this webhook is available.
+ An empty array means the webhook is available in `All Applications`.
items:
type: integer
- minItems: 1
type: array
title:
description: Name or title for this webhook.
@@ -26971,7 +27040,6 @@ components:
- verb
type: object
Webhook:
- description: ""
example:
headers:
- '{"Authorization": "Basic bmF2ZWVua3VtYXIU="}'
@@ -27005,12 +27073,11 @@ components:
format: date-time
type: string
applicationIds:
- description: The IDs of the Applications that are related to this entity.
- The IDs of the Applications that are related to this entity.
+ description: |
+ The IDs of the Applications in which this webhook is available.
+ An empty array means the webhook is available in `All Applications`.
items:
- description: ""
type: integer
- minItems: 1
type: array
title:
description: Name or title for this webhook.
@@ -27072,7 +27139,6 @@ components:
- verb
type: object
WebhookWithOutgoingIntegrationDetails:
- description: ""
example:
headers:
- '{"Authorization": "Basic bmF2ZWVua3VtYXIU="}'
@@ -27109,12 +27175,11 @@ components:
format: date-time
type: string
applicationIds:
- description: The IDs of the Applications that are related to this entity.
- The IDs of the Applications that are related to this entity.
+ description: |
+ The IDs of the Applications in which this webhook is available.
+ An empty array means the webhook is available in `All Applications`.
items:
- description: ""
type: integer
- minItems: 1
type: array
title:
description: Name or title for this webhook.
@@ -27220,7 +27285,6 @@ components:
type: string
type: object
NewMultipleAudiencesItem:
- description: ""
properties:
name:
description: The human-friendly display name for this audience.
@@ -27237,7 +27301,6 @@ components:
- name
type: object
MultipleAudiencesItem:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -27294,7 +27357,6 @@ components:
- name
type: object
NewAudience:
- description: ""
example:
lastUpdate: 2022-04-26T11:02:38Z
name: Travel audience
@@ -27360,7 +27422,6 @@ components:
- name
type: object
Audience:
- description: ""
example:
accountId: 3886
created: 2020-06-10T09:05:27.993483Z
@@ -27455,7 +27516,6 @@ components:
- schemaVersion
type: object
Export:
- description: ""
example:
filter: '{}'
accountId: 3886
@@ -27506,7 +27566,6 @@ components:
- userId
type: object
Import:
- description: ""
example:
accountId: 3886
amount: 10
@@ -27551,7 +27610,6 @@ components:
- userId
type: object
FeaturesFeed:
- description: ""
properties:
title:
type: string
@@ -27559,7 +27617,6 @@ components:
type: string
type: object
LibraryAttribute:
- description: ""
properties:
entity:
description: The name of the entity that can have this attribute. When creating
@@ -27618,7 +27675,6 @@ components:
- type
type: object
TalangAttribute:
- description: ""
properties:
entity:
description: The name of the entity of the attribute.
@@ -27696,7 +27752,6 @@ components:
type: array
type: object
Role:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -27756,7 +27811,6 @@ components:
- name
type: object
NewRole:
- description: ""
properties:
name:
description: Name of the role.
@@ -27813,7 +27867,6 @@ components:
type: array
type: object
RoleAssign:
- description: ""
properties:
users:
description: An array of user IDs.
@@ -27838,7 +27891,6 @@ components:
- users
type: object
NewRoleV2:
- description: ""
properties:
name:
description: Name of the role.
@@ -27866,7 +27918,6 @@ components:
UpdateRoleV2:
$ref: '#/components/schemas/RoleV2Base'
RoleV2:
- description: ""
example:
accountId: 3886
created: 2020-06-10T09:05:27.993483Z
@@ -28246,7 +28297,7 @@ components:
- integrationIDs
type: object
LedgerEntry:
- description: ""
+ description: Entry in the point ledger.
example:
expiryDate: 2022-04-26T11:02:38Z
accountId: 0
@@ -28315,11 +28366,12 @@ components:
type: object
LoyaltyMembership:
example:
- joined: 2000-01-23T04:56:07.000+00:00
+ joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
properties:
joined:
description: The moment in which the loyalty program was joined.
+ example: 2012-03-20T14:15:22Z
format: date-time
title: Loyalty program joined at
type: string
@@ -28434,7 +28486,6 @@ components:
- referralId
type: object
ApplicationAPIKey:
- description: ""
properties:
title:
description: Title of the API key.
@@ -28509,7 +28560,6 @@ components:
- title
type: object
NewApplicationAPIKey:
- description: ""
properties:
title:
description: Title of the API key.
@@ -28679,7 +28729,6 @@ components:
- name
type: object
ManagementKey:
- description: ""
properties:
name:
description: Name for management key.
@@ -28733,7 +28782,6 @@ components:
- name
type: object
NewManagementKey:
- description: ""
properties:
name:
description: Name for management key.
@@ -28851,7 +28899,7 @@ components:
$ref: '#/components/schemas/NotificationListItem'
type: array
SamlConnection:
- description: ""
+ description: A SAML 2.0 connection.
properties:
assertionConsumerServiceURL:
description: The location where the SAML assertion is sent with a HTTP POST.
@@ -28907,7 +28955,7 @@ components:
- signOnURL
type: object
NewSamlConnection:
- description: ""
+ description: A new SAML 2.0 connection.
properties:
x509certificate:
description: X.509 Certificate.
@@ -29078,7 +29126,8 @@ components:
- enforced
type: object
Effect:
- description: ""
+ description: A generic effect that is fired by a triggered campaign. The props
+ property will contain information specific to the specific effect type.
example:
rulesetId: 73
ruleIndex: 2
@@ -29587,6 +29636,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
bundleIndex:
description: The position of the bundle in a list of item bundles created
@@ -29635,6 +29685,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
required:
- name
@@ -29825,6 +29876,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
required:
- programId
@@ -29870,6 +29922,7 @@ components:
The alphanumeric identifier of the loyalty card.
example: summer-loyalty-card-0543
maxLength: 108
+ pattern: ^[A-Za-z0-9_-]*$
type: string
required:
- programId
@@ -30143,7 +30196,7 @@ components:
storeIntegrationId: STORE-001
profileId: URNGV8294NV
identifiers:
- - 91.11.156.141
+ - d41306257915f83fe01e54092ae470f631161ea16fcf4415842eed41470386ea
evaluableCampaignIds:
- 10
- 12
@@ -30266,7 +30319,9 @@ components:
- return
type: object
CustomerProfileIntegrationRequestV2:
- description: ""
+ description: The body of a V2 integration API request (customer profile update).
+ Next to the customer profile details, this contains an optional listing of
+ extra properties that should be returned in the response.
example:
evaluableCampaignIds:
- 10
@@ -30389,7 +30444,9 @@ components:
type: array
type: object
MultipleCustomerProfileIntegrationRequestItem:
- description: ""
+ description: |
+ The body of a V2 integration API request (customer profile update).
+ Next to the customer profile details, this contains an optional listing of extra properties that should be returned in the response.
example:
integrationId: R195412
attributes:
@@ -30421,7 +30478,7 @@ components:
- customerProfile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -30431,9 +30488,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -30443,7 +30500,7 @@ components:
- customerProfile:
accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -30453,9 +30510,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -30492,7 +30549,10 @@ components:
action:
description: |
Defines the action to perform:
- - `add`: Adds the customer profile to the audience. If the customer profile does not exist, it will be created.
+ - `add`: Adds the customer profile to the audience.
+
+ **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application
+ until a session or profile update is received for that profile.
- `delete`: Removes the customer profile from the audience.
enum:
- add
@@ -30524,6 +30584,9 @@ components:
disabled:
description: Number of disabled campaigns.
type: integer
+ staged:
+ description: Number of staged campaigns.
+ type: integer
scheduled:
description: Number of scheduled campaigns.
type: integer
@@ -30542,6 +30605,7 @@ components:
- expired
- running
- scheduled
+ - staged
type: object
RuleFailureReason:
description: Details about why a rule failed.
@@ -30620,7 +30684,6 @@ components:
- rulesetID
type: object
Giveaway:
- description: ""
example:
profileIntegrationId: R195412
code: GIVEAWAY1
@@ -30774,7 +30837,6 @@ components:
- sandbox
type: object
NewCustomEffect:
- description: ""
properties:
applicationIds:
description: The IDs of the Applications that are related to this entity.
@@ -30825,7 +30887,7 @@ components:
- boolean
- number
- time
- example: 2012-11-01T22:08:41+00:00
+ example: string
type: string
values:
description: The list of allowed values provided by this picklist.
@@ -30842,7 +30904,6 @@ components:
- values
type: object
Picklist:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -30861,7 +30922,7 @@ components:
- boolean
- number
- time
- example: 2012-11-01T22:08:41+00:00
+ example: string
type: string
values:
description: The list of allowed values provided by this picklist.
@@ -30898,7 +30959,6 @@ components:
- values
type: object
UpdatePicklist:
- description: ""
properties:
type:
description: The type of allowed values in the picklist. If the type `time`
@@ -30908,7 +30968,7 @@ components:
- boolean
- number
- time
- example: 2012-11-01T22:08:41+00:00
+ example: string
type: string
values:
description: The list of allowed values provided by this picklist.
@@ -30925,49 +30985,8 @@ components:
- values
type: object
UpdateCustomEffect:
- description: ""
- properties:
- applicationIds:
- description: The IDs of the Applications that are related to this entity.
- items:
- type: integer
- minItems: 1
- type: array
- isPerItem:
- description: Indicates if this effect is per item or not.
- type: boolean
- x-fieldType: bool
- name:
- description: The name of this effect.
- pattern: ^[A-Za-z](\w|\s)*$
- type: string
- title:
- description: The title of this effect.
- pattern: ^[^[:cntrl:]\s][^[:cntrl:]]*$
- type: string
- payload:
- description: The JSON payload of this effect.
- type: string
- description:
- description: The description of this effect.
- type: string
- enabled:
- description: Determines if this effect is active.
- type: boolean
- params:
- description: Array of template argument definitions.
- items:
- $ref: '#/components/schemas/TemplateArgDef'
- type: array
- required:
- - applicationIds
- - enabled
- - name
- - payload
- - title
- type: object
+ $ref: '#/components/schemas/NewCustomEffect'
CustomEffect:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -31049,7 +31068,6 @@ components:
type: string
type: object
NewCampaignCollection:
- description: ""
example:
name: My collection
description: My collection of SKUs
@@ -31068,7 +31086,6 @@ components:
- name
type: object
CampaignCollectionWithoutPayload:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -31123,7 +31140,6 @@ components:
- name
type: object
CampaignCollection:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -31210,7 +31226,6 @@ components:
type: array
type: object
NewCollection:
- description: ""
example:
subscribedApplicationsIds:
- 1
@@ -31243,7 +31258,6 @@ components:
- name
type: object
CollectionWithoutPayload:
- description: ""
example:
accountId: 3886
createdBy: 134
@@ -31323,7 +31337,6 @@ components:
- name
type: object
Collection:
- description: ""
example:
accountId: 3886
createdBy: 134
@@ -31415,7 +31428,6 @@ components:
- name
type: object
CollectionItem:
- description: ""
example:
item: item
properties:
@@ -31425,7 +31437,6 @@ components:
- item
type: object
NewCouponCreationJob:
- description: ""
example:
expiryDate: 2023-08-24T14:15:22Z
usageLimit: 100
@@ -31524,7 +31535,6 @@ components:
- usageLimit
type: object
CouponCreationJob:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -31695,7 +31705,7 @@ components:
expiresAfter: 2000-01-23T04:56:07.000+00:00
expiresBefore: 2000-01-23T04:56:07.000+00:00
createdBefore: 2000-01-23T04:56:07.000+00:00
- value: "false"
+ value: value
startsBefore: 2000-01-23T04:56:07.000+00:00
properties:
filters:
@@ -31729,7 +31739,7 @@ components:
expiresAfter: 2000-01-23T04:56:07.000+00:00
expiresBefore: 2000-01-23T04:56:07.000+00:00
createdBefore: 2000-01-23T04:56:07.000+00:00
- value: "false"
+ value: value
startsBefore: 2000-01-23T04:56:07.000+00:00
properties:
createdBefore:
@@ -31789,7 +31799,6 @@ components:
the coupon code
type: boolean
value:
- default: "false"
description: Filter results by the coupon code
type: string
batchId:
@@ -31813,7 +31822,6 @@ components:
type: string
type: object
CouponDeletionJob:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -31892,7 +31900,6 @@ components:
- status
type: object
AsyncCouponDeletionJobResponse:
- description: ""
example:
id: 6
properties:
@@ -31905,7 +31912,6 @@ components:
- id
type: object
LimitCounter:
- description: ""
properties:
campaignId:
description: The ID of the campaign that owns this entity.
@@ -32331,7 +32337,6 @@ components:
- payload
type: object
NewBaseNotification:
- description: ""
example:
webhook:
headers:
@@ -32675,7 +32680,6 @@ components:
type: array
type: object
BaseNotification:
- description: ""
example:
webhook:
headers:
@@ -32729,7 +32733,6 @@ components:
- webhook
type: object
BaseNotificationWebhook:
- description: ""
example:
headers:
- 'content-type: application/json'
@@ -33108,7 +33111,6 @@ components:
- title
type: object
OutgoingIntegrationTemplateWithConfigurationDetails:
- description: ""
properties:
id:
description: Unique ID for this entity.
@@ -33210,7 +33212,6 @@ components:
type: array
type: object
Return:
- description: ""
example:
returnedCartItems:
- quantity: 1
@@ -33329,7 +33330,6 @@ components:
- position
type: object
EventV2:
- description: ""
properties:
profileId:
description: |
@@ -33376,7 +33376,6 @@ components:
- type
type: object
IntegrationEventV2Request:
- description: ""
example:
storeIntegrationId: STORE-001
profileId: URNGV8294NV
@@ -33486,7 +33485,6 @@ components:
type: array
type: object
NewCatalog:
- description: ""
properties:
name:
description: The cart item catalog name.
@@ -33511,7 +33509,6 @@ components:
- name
type: object
Catalog:
- description: ""
example:
accountId: 3886
createdBy: 6
@@ -33763,7 +33760,6 @@ components:
type: array
type: object
CatalogItem:
- description: ""
example:
product:
name: sample_product
@@ -33828,7 +33824,7 @@ components:
name: sample_product
properties:
name:
- description: The name of the product.
+ description: The product the item belongs to.
example: sample_product
maxLength: 50
type: string
@@ -33836,7 +33832,6 @@ components:
- name
type: object
ItemAttribute:
- description: ""
example:
attributeid: 6
name: name
@@ -34002,7 +33997,6 @@ components:
- name
type: object
NewStore:
- description: ""
example:
name: South US store
description: This is the description of the store in south US.
@@ -34044,13 +34038,12 @@ components:
- name
type: object
Store:
- description: ""
example:
linkedCampaignIds:
- 4
- 6
- 8
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
name: South US store
description: This is the description of the store in south US.
integrationId: STORE-001
@@ -34066,8 +34059,8 @@ components:
example: 6
type: integer
created:
- description: The time this entity was created. The time this entity was
- created.
+ description: The time this entity was created.
+ example: 2020-02-07T08:15:22Z
format: date-time
type: string
name:
@@ -34125,8 +34118,45 @@ components:
- name
- updated
type: object
+ NewCampaignStoreBudgetStoreLimit:
+ properties:
+ storeId:
+ description: |
+ The ID of the store.
+ You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.
+ example: 17
+ type: integer
+ limit:
+ description: The value to set for the limit.
+ example: 1000.0
+ type: number
+ required:
+ - limit
+ - storeId
+ type: object
+ NewCampaignStoreBudget:
+ properties:
+ action:
+ enum:
+ - setDiscount
+ type: string
+ storeLimits:
+ description: The set of budget limits for stores linked to the campaign.
+ items:
+ $ref: '#/components/schemas/NewCampaignStoreBudgetStoreLimit'
+ type: array
+ period:
+ enum:
+ - daily
+ - weekly
+ - monthly
+ - yearly
+ type: string
+ required:
+ - action
+ - storeLimits
+ type: object
CampaignStoreBudget:
- description: ""
properties:
id:
description: Internal ID of this entity.
@@ -34156,6 +34186,68 @@ components:
- limits
- storeId
type: object
+ ListCampaignStoreBudgetsStore:
+ properties:
+ id:
+ type: integer
+ integrationId:
+ type: string
+ name:
+ type: string
+ required:
+ - id
+ - integrationId
+ - name
+ type: object
+ ListCampaignStoreBudgets:
+ properties:
+ store:
+ $ref: '#/components/schemas/ListCampaignStoreBudgetsStore'
+ limit:
+ type: integer
+ action:
+ type: string
+ period:
+ type: string
+ required:
+ - action
+ - limit
+ - store
+ type: object
+ SummaryCampaignStoreBudget:
+ properties:
+ action:
+ enum:
+ - redeemCoupon
+ - redeemReferral
+ - setDiscount
+ - setDiscountEffect
+ - createCoupon
+ - createReferral
+ - createLoyaltyPoints
+ - redeemLoyaltyPoints
+ - customEffect
+ - createLoyaltyPointsEffect
+ - redeemLoyaltyPointsEffect
+ - callApi
+ - awardGiveaway
+ - addFreeItemEffect
+ - reserveCoupon
+ type: string
+ period:
+ enum:
+ - overall
+ - daily
+ - weekly
+ - monthly
+ - yearly
+ type: string
+ storeCount:
+ type: integer
+ required:
+ - action
+ - storeCount
+ type: object
BulkOperationOnCampaigns:
properties:
operation:
@@ -34164,6 +34256,7 @@ components:
enum:
- disable
- delete
+ - activate_revision
type: string
campaignIds:
description: The list of campaign IDs on which the operation will be performed.
@@ -34175,13 +34268,22 @@ components:
type: integer
maxItems: 50
type: array
+ activateAt:
+ description: |
+ Timestamp when the revisions are finalized after the `activate_revision` operation. The current time is used when left blank.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
required:
- campaignIds
- operation
type: object
CreateAchievement:
example:
+ fixedStartDate: 2000-01-23T04:56:07.000+00:00
period: 1Y
+ endDate: 2000-01-23T04:56:07.000+00:00
name: Order50Discount
periodEndOverride:
month: 11
@@ -34190,8 +34292,10 @@ components:
minute: 59
second: 59
description: 50% off for every 50th purchase in a year.
+ activationPolicy: fixed_schedule
title: 50% off on 50th purchase.
target: 50.0
+ recurrencePolicy: no_recurrence
properties:
name:
description: |
@@ -34248,6 +34352,40 @@ components:
type: string
periodEndOverride:
$ref: '#/components/schemas/TimePoint'
+ recurrencePolicy:
+ description: |
+ The policy that determines if and how the achievement recurs.
+ - `no_recurrence`: The achievement can be completed only once.
+ - `on_expiration`: The achievement resets after it expires and becomes available again.
+ enum:
+ - no_recurrence
+ - on_expiration
+ example: no_recurrence
+ type: string
+ activationPolicy:
+ description: |
+ The policy that determines how the achievement starts, ends, or resets.
+ - `user_action`: The achievement ends or resets relative to when the customer started the achievement.
+ - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ enum:
+ - user_action
+ - fixed_schedule
+ example: fixed_schedule
+ type: string
+ fixedStartDate:
+ description: |
+ The achievement's start date when `activationPolicy` is set to `fixed_schedule`.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
+ endDate:
+ description: |
+ The achievement's end date. If defined, customers cannot participate in the achievement after this date.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
required:
- description
- name
@@ -34281,12 +34419,19 @@ components:
- userId
type: object
Achievement:
- description: ""
example:
period: 1Y
- createdBy: John Doe
+ endDate: 2000-01-23T04:56:07.000+00:00
created: 2020-06-10T09:05:27.993483Z
campaignId: 1
+ description: 50% off for every 50th purchase in a year.
+ activationPolicy: fixed_schedule
+ title: 50% off on 50th purchase.
+ userId: 1234
+ hasProgress: true
+ target: 50.0
+ fixedStartDate: 2000-01-23T04:56:07.000+00:00
+ createdBy: John Doe
name: Order50Discount
periodEndOverride:
month: 11
@@ -34294,12 +34439,8 @@ components:
hour: 23
minute: 59
second: 59
- description: 50% off for every 50th purchase in a year.
id: 6
- title: 50% off on 50th purchase.
- userId: 1234
- hasProgress: true
- target: 50.0
+ recurrencePolicy: no_recurrence
properties:
id:
description: Internal ID of this entity.
@@ -34365,6 +34506,40 @@ components:
type: string
periodEndOverride:
$ref: '#/components/schemas/TimePoint'
+ recurrencePolicy:
+ description: |
+ The policy that determines if and how the achievement recurs.
+ - `no_recurrence`: The achievement can be completed only once.
+ - `on_expiration`: The achievement resets after it expires and becomes available again.
+ enum:
+ - no_recurrence
+ - on_expiration
+ example: no_recurrence
+ type: string
+ activationPolicy:
+ description: |
+ The policy that determines how the achievement starts, ends, or resets.
+ - `user_action`: The achievement ends or resets relative to when the customer started the achievement.
+ - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ enum:
+ - user_action
+ - fixed_schedule
+ example: fixed_schedule
+ type: string
+ fixedStartDate:
+ description: |
+ The achievement's start date when `activationPolicy` is set to `fixed_schedule`.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
+ endDate:
+ description: |
+ The achievement's end date. If defined, customers cannot participate in the achievement after this date.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
campaignId:
description: ID of the campaign, to which the achievement belongs to
example: 1
@@ -34397,7 +34572,9 @@ components:
type: object
UpdateAchievement:
example:
+ fixedStartDate: 2000-01-23T04:56:07.000+00:00
period: 1Y
+ endDate: 2000-01-23T04:56:07.000+00:00
name: Order50Discount
periodEndOverride:
month: 11
@@ -34406,8 +34583,10 @@ components:
minute: 59
second: 59
description: 50% off for every 50th purchase in a year.
+ activationPolicy: fixed_schedule
title: 50% off on 50th purchase.
target: 50.0
+ recurrencePolicy: no_recurrence
properties:
name:
description: |
@@ -34438,6 +34617,40 @@ components:
type: string
periodEndOverride:
$ref: '#/components/schemas/TimePoint'
+ recurrencePolicy:
+ description: |
+ The policy that determines if and how the achievement recurs.
+ - `no_recurrence`: The achievement can be completed only once.
+ - `on_expiration`: The achievement resets after it expires and becomes available again.
+ enum:
+ - no_recurrence
+ - on_expiration
+ example: no_recurrence
+ type: string
+ activationPolicy:
+ description: |
+ The policy that determines how the achievement starts, ends, or resets.
+ - `user_action`: The achievement ends or resets relative to when the customer started the achievement.
+ - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ enum:
+ - user_action
+ - fixed_schedule
+ example: fixed_schedule
+ type: string
+ fixedStartDate:
+ description: |
+ The achievement's start date when `activationPolicy` is set to `fixed_schedule`.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
+ endDate:
+ description: |
+ The achievement's end date. If defined, customers cannot participate in the achievement after this date.
+
+ **Note:** It must be an RFC3339 timestamp string.
+ format: date-time
+ type: string
type: object
AchievementProgress:
example:
@@ -34592,6 +34805,7 @@ components:
- running
- disabled
- archived
+ - staged
example: running
type: string
totalRevenue:
@@ -34672,23 +34886,23 @@ components:
type: object
GenerateCampaignDescription:
properties:
- campaignID:
- description: ID of the campaign.
+ rulesetID:
+ description: ID of a ruleset.
type: integer
currency:
description: Currency for the campaign.
type: string
required:
- - campaignID
- currency
+ - rulesetID
type: object
GenerateCampaignTags:
properties:
- campaignID:
- description: ID of the campaign.
+ rulesetID:
+ description: ID of a ruleset.
type: integer
required:
- - campaignID
+ - rulesetID
type: object
GenerateRuleTitle:
properties:
@@ -34727,6 +34941,137 @@ components:
required:
- itemFilter
type: object
+ StrikethroughDebugResponse:
+ properties:
+ campaignsIDs:
+ description: The campaign IDs that got fetched for the evaluation process.
+ items:
+ type: integer
+ type: array
+ effects:
+ description: The strikethrough effects that are returned from the evaluation
+ process.
+ items:
+ $ref: '#/components/schemas/StrikethroughEffect'
+ type: array
+ type: object
+ ProductSearchMatch:
+ properties:
+ productId:
+ description: The ID of the product.
+ example: 1
+ type: integer
+ value:
+ description: The string matching the given value. Either a product name
+ or SKU.
+ example: MyProduct
+ type: string
+ productSkuId:
+ description: The ID of the SKU linked to a product. If empty, this is an
+ analytics-level product.
+ example: 1
+ type: integer
+ required:
+ - productId
+ - value
+ type: object
+ AnalyticsProduct:
+ properties:
+ id:
+ description: The ID of the analytics-level product.
+ example: 1
+ type: integer
+ isPreliminary:
+ description: Indicates whether the analytics-level product is connected
+ to a catalog and also has a product name.
+ example: false
+ type: boolean
+ name:
+ description: The name of the analytics-level product.
+ example: MyProduct
+ type: string
+ catalogId:
+ description: |
+ The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.
+ example: 1
+ type: integer
+ required:
+ - id
+ - isPreliminary
+ - name
+ type: object
+ AnalyticsProductSKU:
+ properties:
+ id:
+ description: The ID of the SKU linked to the analytics-level product.
+ example: 1
+ type: integer
+ sku:
+ description: The SKU linked to the analytics-level product.
+ example: SKU-123
+ type: string
+ lastUpdated:
+ description: Values in UTC for the date the SKU linked to the analytics-level
+ product was last updated.
+ example: 2024-02-01T00:00:00Z
+ format: date-time
+ type: string
+ required:
+ - id
+ - lastUpdated
+ - sku
+ type: object
+ ProductUnitAnalytics:
+ properties:
+ startTime:
+ description: The start of the aggregation time frame in UTC.
+ example: 2024-02-01T00:00:00Z
+ format: date-time
+ type: string
+ endTime:
+ description: The end of the aggregation time frame in UTC.
+ format: date-time
+ type: string
+ purchasedUnits:
+ $ref: '#/components/schemas/AnalyticsDataPointWithTrend'
+ productId:
+ description: The ID of the analytics-level product.
+ example: 1
+ type: integer
+ productName:
+ description: The name of the analytics-level product.
+ example: MyProduct
+ type: string
+ required:
+ - endTime
+ - productId
+ - productName
+ - purchasedUnits
+ - startTime
+ type: object
+ ProductSkuUnitAnalytics:
+ properties:
+ startTime:
+ description: The start of the aggregation time frame in UTC.
+ example: 2024-02-01T00:00:00Z
+ format: date-time
+ type: string
+ endTime:
+ description: The end of the aggregation time frame in UTC.
+ format: date-time
+ type: string
+ purchasedUnits:
+ $ref: '#/components/schemas/AnalyticsDataPointWithTrend'
+ sku:
+ description: The SKU linked to the analytics-level product.
+ example: SKU-123
+ type: string
+ required:
+ - endTime
+ - purchasedUnits
+ - sku
+ - startTime
+ type: object
inline_response_201:
example:
data:
@@ -34775,7 +35120,7 @@ components:
data:
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -34785,9 +35130,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -34796,7 +35141,7 @@ components:
id: 2
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -34806,9 +35151,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -35009,12 +35354,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -35066,10 +35411,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -35090,12 +35436,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -35147,10 +35493,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -35210,12 +35557,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -35267,10 +35614,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -35291,12 +35639,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -35348,10 +35696,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -35395,19 +35744,13 @@ components:
inline_response_200_6:
example:
data:
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -35449,22 +35792,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -35472,7 +35801,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -35480,12 +35808,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -35494,10 +35816,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -35540,22 +35892,14 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
- - callApiEffectCount: 0
- createdLoyaltyPointsEffectCount: 2
- discountCount: 288.0
- description: Campaign for all summer 2021 promotions
- type: advanced
+ - type: advanced
templateId: 3
- activeRevisionVersionId: 6
customEffectCount: 0
activeRevisionId: 6
features:
- coupons
- referrals
- currentRevisionVersionId: 6
createdLoyaltyPointsCount: 9.0
storesImported: true
couponSettings:
@@ -35597,22 +35941,8 @@ components:
- "7"
- "8"
- "9"
- startTime: 2021-07-20T22:00:00Z
id: 4
state: enabled
- currentRevisionId: 6
- limits:
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- - period: yearly
- entities:
- - Coupon
- limit: 1000.0
- action: createCoupon
- activeRulesetId: 6
reservecouponEffectCount: 9
updatedBy: Jane Doe
frontendState: running
@@ -35620,7 +35950,6 @@ components:
referralCreationCount: 8
stageRevision: false
couponRedemptionCount: 163
- userId: 388
couponCreationCount: 16
version: 6
campaignGroups:
@@ -35628,12 +35957,6 @@ components:
- 3
tags:
- summer
- awardedGiveawaysCount: 9
- redeemedLoyaltyPointsEffectCount: 9
- linkedStoreIds:
- - 1
- - 2
- - 3
discountEffectCount: 343
budgets:
- limit: 1000.0
@@ -35642,10 +35965,40 @@ components:
- limit: 1000.0
action: createCoupon
counter: 42.0
- createdBy: John Doe
redeemedLoyaltyPointsCount: 8.0
- addFreeItemEffectCount: 0
name: Summer promotions
+ applicationId: 322
+ updated: 2000-01-23T04:56:07.000+00:00
+ callApiEffectCount: 0
+ createdLoyaltyPointsEffectCount: 2
+ discountCount: 288.0
+ revisionFrontendState: revised
+ description: Campaign for all summer 2021 promotions
+ activeRevisionVersionId: 6
+ currentRevisionVersionId: 6
+ startTime: 2021-07-20T22:00:00Z
+ currentRevisionId: 6
+ limits:
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ - period: yearly
+ entities:
+ - Coupon
+ limit: 1000.0
+ action: createCoupon
+ activeRulesetId: 6
+ userId: 388
+ awardedGiveawaysCount: 9
+ redeemedLoyaltyPointsEffectCount: 9
+ linkedStoreIds:
+ - 1
+ - 2
+ - 3
+ createdBy: John Doe
+ addFreeItemEffectCount: 0
referralSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -35688,9 +36041,7 @@ components:
attributes: '{}'
lastActivity: 2022-11-10T23:00:00Z
endTime: 2021-09-22T22:00:00Z
- applicationId: 322
referralRedemptionCount: 3
- updated: 2000-01-23T04:56:07.000+00:00
totalResultSize: 1
properties:
totalResultSize:
@@ -36245,75 +36596,22 @@ components:
inline_response_200_12:
example:
data:
- - activeRulesetId: 5
- instructions: Use this template for discount campaigns. Set the campaign
+ - instructions: Use this template for discount campaigns. Set the campaign
properties according to the campaign goals, and don't forget to set an
end date.
- campaignAttributes: '{}'
- applicationsIds:
- - 0
- - 0
- campaignType: advanced
- updatedBy: Jane Doe
campaignCollections:
- name: My collection
description: My collection of SKUs
- name: My collection
description: My collection of SKUs
- created: 2020-06-10T09:05:27.993483Z
defaultCampaignGroupId: 42
description: This is a template for a discount campaign.
- userId: 388
- tags:
- - discount
- accountId: 3886
features:
- coupons
- coupons
- validApplicationIds:
- - 1
- - 2
- - 3
- name: Discount campaign
- referralSettings:
- couponPattern: SUMMER-####-####
- validCharacters:
- - A
- - B
- - C
- - D
- - E
- - F
- - G
- - H
- - I
- - J
- - K
- - L
- - M
- - "N"
- - O
- - P
- - Q
- - R
- - S
- - T
- - U
- - V
- - W
- - X
- - "Y"
- - Z
- - "0"
- - "1"
- - "2"
- - "3"
- - "4"
- - "5"
- - "6"
- - "7"
- - "8"
- - "9"
+ couponReservationSettings:
+ reservationLimit: 45
+ isReservationMandatory: false
couponSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -36365,7 +36663,6 @@ components:
id: 6
couponAttributes: '{}'
state: draft
- updated: 2022-08-24T14:15:22Z
limits:
- period: yearly
entities:
@@ -36377,31 +36674,22 @@ components:
- Coupon
limit: 1000.0
action: createCoupon
- - activeRulesetId: 5
- instructions: Use this template for discount campaigns. Set the campaign
- properties according to the campaign goals, and don't forget to set an
- end date.
+ activeRulesetId: 5
campaignAttributes: '{}'
applicationsIds:
- - 0
- - 0
+ - 1
+ - 2
+ - 3
+ - 1
+ - 2
+ - 3
campaignType: advanced
updatedBy: Jane Doe
- campaignCollections:
- - name: My collection
- description: My collection of SKUs
- - name: My collection
- description: My collection of SKUs
created: 2020-06-10T09:05:27.993483Z
- defaultCampaignGroupId: 42
- description: This is a template for a discount campaign.
userId: 388
tags:
- discount
accountId: 3886
- features:
- - coupons
- - coupons
validApplicationIds:
- 1
- 2
@@ -36446,6 +36734,23 @@ components:
- "7"
- "8"
- "9"
+ updated: 2022-08-24T14:15:22Z
+ - instructions: Use this template for discount campaigns. Set the campaign
+ properties according to the campaign goals, and don't forget to set an
+ end date.
+ campaignCollections:
+ - name: My collection
+ description: My collection of SKUs
+ - name: My collection
+ description: My collection of SKUs
+ defaultCampaignGroupId: 42
+ description: This is a template for a discount campaign.
+ features:
+ - coupons
+ - coupons
+ couponReservationSettings:
+ reservationLimit: 45
+ isReservationMandatory: false
couponSettings:
couponPattern: SUMMER-####-####
validCharacters:
@@ -36497,7 +36802,6 @@ components:
id: 6
couponAttributes: '{}'
state: draft
- updated: 2022-08-24T14:15:22Z
limits:
- period: yearly
entities:
@@ -36509,6 +36813,67 @@ components:
- Coupon
limit: 1000.0
action: createCoupon
+ activeRulesetId: 5
+ campaignAttributes: '{}'
+ applicationsIds:
+ - 1
+ - 2
+ - 3
+ - 1
+ - 2
+ - 3
+ campaignType: advanced
+ updatedBy: Jane Doe
+ created: 2020-06-10T09:05:27.993483Z
+ userId: 388
+ tags:
+ - discount
+ accountId: 3886
+ validApplicationIds:
+ - 1
+ - 2
+ - 3
+ name: Discount campaign
+ referralSettings:
+ couponPattern: SUMMER-####-####
+ validCharacters:
+ - A
+ - B
+ - C
+ - D
+ - E
+ - F
+ - G
+ - H
+ - I
+ - J
+ - K
+ - L
+ - M
+ - "N"
+ - O
+ - P
+ - Q
+ - R
+ - S
+ - T
+ - U
+ - V
+ - W
+ - X
+ - "Y"
+ - Z
+ - "0"
+ - "1"
+ - "2"
+ - "3"
+ - "4"
+ - "5"
+ - "6"
+ - "7"
+ - "8"
+ - "9"
+ updated: 2022-08-24T14:15:22Z
hasMore: true
properties:
hasMore:
@@ -36535,12 +36900,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -36592,10 +36957,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -36616,12 +36982,12 @@ components:
minPoints: 200
id: 2
created: 2021-06-10T09:04:59.355258Z
- programId: 139
+ programID: 139
- name: Bronze
minPoints: 100
id: 1
created: 2021-06-10T09:04:39.355258Z
- programId: 139
+ programID: 139
canUpdateTiers: true
usersPerCardLimit: 111
tierCycleStartDate: 2021-09-12T10:12:42Z
@@ -36673,10 +37039,11 @@ components:
- "7"
- "8"
- "9"
- id: 0
+ id: 139
canUpgradeToAdvancedTiers: true
created: 2020-06-10T09:05:27.993483Z
sandbox: true
+ returnPolicy: only_pending
subscribedApplications:
- 132
- 97
@@ -36791,6 +37158,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -36836,6 +37205,8 @@ components:
id: 11
startDate: 2000-01-23T04:56:07.000+00:00
batchId: wdefpov
+ programTitle: Loyalty program
+ programName: Loyalty_program
modified: 2021-09-12T10:12:42Z
id: 6
blockReason: Current card lost. Customer needs a new card.
@@ -36999,47 +37370,6 @@ components:
- data
- hasMore
inline_response_200_20:
- example:
- data:
- - method: PUT
- requestPayload: |-
- {
- "customerSession": {
- "profileId": "customer123",
- "state": "closed",
- ...
- }
- responsePayload: '{"coupons":[],"createdCoupons":[],...}'
- requestUri: /v2/customer_sessions/Session136667
- time: 2023-01-16T16:00:00.700763Z
- uuid: 606e7d34-2d36-4d53-ac71-d4442c325985
- status: 200
- - method: PUT
- requestPayload: |-
- {
- "customerSession": {
- "profileId": "customer123",
- "state": "closed",
- ...
- }
- responsePayload: '{"coupons":[],"createdCoupons":[],...}'
- requestUri: /v2/customer_sessions/Session136667
- time: 2023-01-16T16:00:00.700763Z
- uuid: 606e7d34-2d36-4d53-ac71-d4442c325985
- status: 200
- totalResultSize: 1
- properties:
- totalResultSize:
- example: 1
- type: integer
- data:
- items:
- $ref: '#/components/schemas/AccessLogEntry'
- type: array
- required:
- - data
- - totalResultSize
- inline_response_200_21:
example:
data:
- date: 2021-10-12T10:12:42Z
@@ -37104,24 +37434,24 @@ components:
required:
- data
- totalResultSize
- inline_response_200_22:
+ inline_response_200_21:
example:
data:
- - accountId: 6
+ - accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
- integrationId: integrationId
+ integrationId: URNGV8294NV
attributes:
Language: english
ShippingCountry: DE
totalSales: 299.99
lastActivity: 2020-02-08T14:15:20Z
- id: 0
+ id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
advocateIntegrationId: advocateIntegrationId
audienceMemberships:
@@ -37129,21 +37459,21 @@ components:
id: 2
- name: Travel audience
id: 2
- - accountId: 6
+ - accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
- integrationId: integrationId
+ integrationId: URNGV8294NV
attributes:
Language: english
ShippingCountry: DE
totalSales: 299.99
lastActivity: 2020-02-08T14:15:20Z
- id: 0
+ id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
advocateIntegrationId: advocateIntegrationId
audienceMemberships:
@@ -37165,24 +37495,24 @@ components:
type: array
required:
- data
- inline_response_200_23:
+ inline_response_200_22:
example:
data:
- - accountId: 6
+ - accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
- integrationId: integrationId
+ integrationId: URNGV8294NV
attributes:
Language: english
ShippingCountry: DE
totalSales: 299.99
lastActivity: 2020-02-08T14:15:20Z
- id: 0
+ id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
advocateIntegrationId: advocateIntegrationId
audienceMemberships:
@@ -37190,21 +37520,21 @@ components:
id: 2
- name: Travel audience
id: 2
- - accountId: 6
+ - accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
- integrationId: integrationId
+ integrationId: URNGV8294NV
attributes:
Language: english
ShippingCountry: DE
totalSales: 299.99
lastActivity: 2020-02-08T14:15:20Z
- id: 0
+ id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
advocateIntegrationId: advocateIntegrationId
audienceMemberships:
@@ -37225,12 +37555,12 @@ components:
type: array
required:
- data
- inline_response_200_24:
+ inline_response_200_23:
example:
data:
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -37240,9 +37570,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -37251,7 +37581,7 @@ components:
id: 2
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -37261,9 +37591,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -37283,12 +37613,12 @@ components:
type: array
required:
- data
- inline_response_200_25:
+ inline_response_200_24:
example:
data:
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -37298,9 +37628,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -37309,7 +37639,7 @@ components:
id: 2
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -37319,9 +37649,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -37339,7 +37669,7 @@ components:
required:
- data
- hasMore
- inline_response_200_26:
+ inline_response_200_25:
example:
data:
- couponUseAttempts: 1
@@ -37379,11 +37709,11 @@ components:
required:
- data
- hasMore
- inline_response_200_27:
+ inline_response_200_26:
example:
data:
- coupon: BKDB946
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
totalDiscounts: 100.0
integrationId: URNGV8294NV
profileintegrationid: 382370BKDB946
@@ -37441,7 +37771,7 @@ components:
category: shoes
height: 0.8008281904610115
- coupon: BKDB946
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
totalDiscounts: 100.0
integrationId: URNGV8294NV
profileintegrationid: 382370BKDB946
@@ -37508,7 +37838,7 @@ components:
type: array
required:
- data
- inline_response_200_28:
+ inline_response_200_27:
example:
data:
- effects:
@@ -37652,7 +37982,7 @@ components:
required:
- data
- hasMore
- inline_response_200_29:
+ inline_response_200_28:
example:
data:
- data
@@ -37669,7 +37999,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_30:
+ inline_response_200_29:
example:
data:
- accountId: 3886
@@ -37706,7 +38036,7 @@ components:
type: array
required:
- data
- inline_response_200_31:
+ inline_response_200_30:
example:
data:
- membersCount: 1234
@@ -37723,12 +38053,12 @@ components:
type: array
required:
- data
- inline_response_200_32:
+ inline_response_200_31:
example:
data:
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -37738,9 +38068,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -37749,7 +38079,7 @@ components:
id: 2
- accountId: 31
closedSessions: 3
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
sandbox: false
integrationId: URNGV8294NV
attributes:
@@ -37759,9 +38089,9 @@ components:
lastActivity: 2020-02-08T14:15:20Z
id: 6
loyaltyMemberships:
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
- - joined: 2000-01-23T04:56:07.000+00:00
+ - joined: 2012-03-20T14:15:22Z
loyaltyProgramId: 323414846
audienceMemberships:
- name: Travel audience
@@ -37778,7 +38108,7 @@ components:
type: array
required:
- data
- inline_response_200_33:
+ inline_response_200_32:
example:
data:
- friendIntegrationId: friendIntegrationId
@@ -37807,7 +38137,7 @@ components:
type: array
required:
- data
- inline_response_200_34:
+ inline_response_200_33:
example:
data:
- created: 2020-06-10T09:05:27.993483Z
@@ -37880,7 +38210,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_35:
+ inline_response_200_34:
example:
data:
- product:
@@ -37927,7 +38257,7 @@ components:
type: array
required:
- data
- inline_response_200_36:
+ inline_response_200_35:
example:
data:
- accountId: 3886
@@ -37962,7 +38292,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_37:
+ inline_response_200_36:
example:
data:
- headers:
@@ -38015,7 +38345,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_38:
+ inline_response_200_37:
example:
data:
- webhookId: 1
@@ -38040,7 +38370,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_39:
+ inline_response_200_38:
example:
data:
- requestTime: 2021-07-20T22:00:00Z
@@ -38081,7 +38411,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_40:
+ inline_response_200_39:
example:
data:
- created: 2020-06-10T09:05:27.993483Z
@@ -38106,7 +38436,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_41:
+ inline_response_200_40:
example:
data:
- created: 2020-06-10T09:05:27.993483Z
@@ -38114,7 +38444,7 @@ components:
- 71
isAdmin: false
accountId: 3886
- applicationNotificationSubscriptions: '{}'
+ applicationNotificationSubscriptions: {}
inviteToken: Gy9b8w1irmQtEPo5RmbMmSPheL5h4
name: John Doe
modified: 2021-09-12T10:12:42Z
@@ -38127,13 +38457,13 @@ components:
email: john.doe@example.com
policy:
Role: 127
- additionalAttributes: '{}'
+ additionalAttributes: {}
- created: 2020-06-10T09:05:27.993483Z
roles:
- 71
isAdmin: false
accountId: 3886
- applicationNotificationSubscriptions: '{}'
+ applicationNotificationSubscriptions: {}
inviteToken: Gy9b8w1irmQtEPo5RmbMmSPheL5h4
name: John Doe
modified: 2021-09-12T10:12:42Z
@@ -38146,7 +38476,7 @@ components:
email: john.doe@example.com
policy:
Role: 127
- additionalAttributes: '{}'
+ additionalAttributes: {}
totalResultSize: 1
properties:
totalResultSize:
@@ -38159,7 +38489,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_42:
+ inline_response_200_41:
example:
data:
- new:
@@ -38173,7 +38503,7 @@ components:
- loyalty
id: 6727
created: 2020-06-10T09:05:27.993483Z
- old: '{}'
+ old: {}
id: 6
applicationId: 359
userId: 388
@@ -38190,7 +38520,7 @@ components:
- loyalty
id: 6727
created: 2020-06-10T09:05:27.993483Z
- old: '{}'
+ old: {}
id: 6
applicationId: 359
userId: 388
@@ -38210,7 +38540,7 @@ components:
type: array
required:
- data
- inline_response_200_43:
+ inline_response_200_42:
example:
data:
- filter: '{}'
@@ -38237,7 +38567,7 @@ components:
required:
- data
- totalResultSize
- inline_response_200_44:
+ inline_response_200_43:
example:
data:
- accountId: 3886
@@ -38344,14 +38674,14 @@ components:
required:
- data
- totalResultSize
- inline_response_200_45:
+ inline_response_200_44:
example:
data:
- linkedCampaignIds:
- 4
- 6
- 8
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
name: South US store
description: This is the description of the store in south US.
integrationId: STORE-001
@@ -38365,7 +38695,7 @@ components:
- 4
- 6
- 8
- created: 2000-01-23T04:56:07.000+00:00
+ created: 2020-02-07T08:15:22Z
name: South US store
description: This is the description of the store in south US.
integrationId: STORE-001
@@ -38389,13 +38719,21 @@ components:
type: array
required:
- data
- inline_response_200_46:
+ inline_response_200_45:
example:
data:
- period: 1Y
- createdBy: John Doe
+ endDate: 2000-01-23T04:56:07.000+00:00
created: 2020-06-10T09:05:27.993483Z
campaignId: 1
+ description: 50% off for every 50th purchase in a year.
+ activationPolicy: fixed_schedule
+ title: 50% off on 50th purchase.
+ userId: 1234
+ hasProgress: true
+ target: 50.0
+ fixedStartDate: 2000-01-23T04:56:07.000+00:00
+ createdBy: John Doe
name: Order50Discount
periodEndOverride:
month: 11
@@ -38403,16 +38741,20 @@ components:
hour: 23
minute: 59
second: 59
- description: 50% off for every 50th purchase in a year.
id: 6
+ recurrencePolicy: no_recurrence
+ - period: 1Y
+ endDate: 2000-01-23T04:56:07.000+00:00
+ created: 2020-06-10T09:05:27.993483Z
+ campaignId: 1
+ description: 50% off for every 50th purchase in a year.
+ activationPolicy: fixed_schedule
title: 50% off on 50th purchase.
userId: 1234
hasProgress: true
target: 50.0
- - period: 1Y
+ fixedStartDate: 2000-01-23T04:56:07.000+00:00
createdBy: John Doe
- created: 2020-06-10T09:05:27.993483Z
- campaignId: 1
name: Order50Discount
periodEndOverride:
month: 11
@@ -38420,12 +38762,8 @@ components:
hour: 23
minute: 59
second: 59
- description: 50% off for every 50th purchase in a year.
id: 6
- title: 50% off on 50th purchase.
- userId: 1234
- hasProgress: true
- target: 50.0
+ recurrencePolicy: no_recurrence
hasMore: true
properties:
hasMore:
@@ -38436,7 +38774,7 @@ components:
type: array
required:
- data
- inline_response_200_47:
+ inline_response_200_46:
example:
data:
- endDate: 2000-01-23T04:56:07.000+00:00
@@ -38525,6 +38863,14 @@ components:
description: Indicates whether the service provider supports patch operations
for modifying resources.
type: boolean
+ ScimServiceProviderConfigResponse_sort:
+ description: Configuration settings related to sorting SCIM resources in query
+ responses.
+ properties:
+ supported:
+ description: Indicates whether the service provider supports sorting operations
+ for ordered query results.
+ type: boolean
GenerateRuleTitle_rule:
properties:
effects:
@@ -38553,20 +38899,19 @@ components:
- and
- - couponValid
items:
- properties: {}
type: object
minItems: 1
type: array
securitySchemes:
api_key_v1:
description: |
- To authenticate to use the Integration API, generate an API key in the Campaign Manager
- then prefix it with `ApiKey-v1`.
+ To authenticate with the Integration API, generate an API key in the Campaign Manager
+ and prefix it with `ApiKey-v1`.
To generate an API key:
- 1. Log into the Campaign Manager and open the Application of your choice, or create one.
- 1. Click **Settings** > **Developer settings**.
+ 1. Sign in to the Campaign Manager and open the Application of your choice, or create one.
+ 1. Click **Settings** > **Integration API Keys**.
1. Click **Create API Key** and give it a name and an expiration date, then click **Create API Key**.
You can now use the API key in the HTTP header, prefixing it with `ApiKey-v1`:
@@ -38609,7 +38954,7 @@ components:
The key must be generated by an admin and given to the developer that requires it:
- 1. Log into the Campaign Manager and click **Account** > **Management API keys**.
+ 1. Sign in to the Campaign Manager and click **Account** > **Tools** > **Management API Keys**.
1. Click **Create Key** and give it a name.
1. Set an expiration date.
1. Choose the endpoints the key should give access to.
diff --git a/api_integration.go b/api_integration.go
index 1d348440..002e96e5 100644
--- a/api_integration.go
+++ b/api_integration.go
@@ -14,6 +14,7 @@ import (
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
+ "reflect"
"strings"
"time"
)
@@ -221,16 +222,22 @@ func (r apiCreateCouponReservationRequest) Body(body CouponReservations) apiCrea
CreateCouponReservation Create coupon reservation
Create a coupon reservation for the specified customer profiles on the specified coupon.
You can also create a reservation via the Campaign Manager using the
-[Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code).
+[Create coupon code reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code) effect.
+
+**Note:**
- If the **Reservation mandatory** option was selected when creating the specified coupon,
the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it.
-Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it.
+Otherwise, the endpoint creates a **soft** reservation, meaning the coupon is associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it.
This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store.
- - If the **Coupon visibility** option was selected when creating the specified coupon,
+- If the **Coupon visibility** option was selected when creating the specified coupon,
the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint.
+- This endpoint overrides the coupon reservation limit set when [the coupon is created](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons).
+To ensure that coupons cannot be reserved after the reservation limit is reached, use the [Create coupon code reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code) effect in the Rule Builder
+and the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.
+
To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -1121,9 +1128,17 @@ type apiDeleteCustomerDataRequest struct {
DeleteCustomerData Delete customer's personal data
Delete all attributes on the customer profile and on entities that reference this customer profile.
-**Important:** To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
+**Important:**
+
+ - Customer data is deleted from all Applications in the [environment](https://docs.talon.one/docs/product/applications/overview#application-environments)
+ that the API key belongs to. For example, if you use this endpoint with an API key that belongs to a sandbox Application,
+ customer data will be deleted from all sandbox Applications. This is because customer data is shared
+ between Applications from the same environment.
+
+ - To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
- @param integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
@return apiDeleteCustomerDataRequest
@@ -1787,9 +1802,9 @@ func (r apiGetLoyaltyBalancesRequest) IncludeProjectedTier(includeProjectedTier
}
/*
-GetLoyaltyBalances Get customer's loyalty points
+GetLoyaltyBalances Get customer's loyalty balances
Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program.
-You can filter balances by date and subledger ID.
+You can filter balances by date and subledger ID, and include tier-related information in the response.
**Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID.
@@ -2035,7 +2050,15 @@ func (r apiGetLoyaltyCardBalancesRequest) Execute() (LoyaltyCardBalances, *_neth
localVarQueryParams.Add("endDate", parameterToString(*r.endDate, ""))
}
if r.subledgerId != nil {
- localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "csv"))
+ t := *r.subledgerId
+ if reflect.TypeOf(t).Kind() == reflect.Slice {
+ s := reflect.ValueOf(t)
+ for i := 0; i < s.Len(); i++ {
+ localVarQueryParams.Add("subledgerId", parameterToString(s.Index(i), "multi"))
+ }
+ } else {
+ localVarQueryParams.Add("subledgerId", parameterToString(t, "multi"))
+ }
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@@ -2234,7 +2257,15 @@ func (r apiGetLoyaltyCardPointsRequest) Execute() (InlineResponse2003, *_nethttp
localVarQueryParams.Add("status", parameterToString(*r.status, ""))
}
if r.subledgerId != nil {
- localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "csv"))
+ t := *r.subledgerId
+ if reflect.TypeOf(t).Kind() == reflect.Slice {
+ s := reflect.ValueOf(t)
+ for i := 0; i < s.Len(); i++ {
+ localVarQueryParams.Add("subledgerId", parameterToString(s.Index(i), "multi"))
+ }
+ } else {
+ localVarQueryParams.Add("subledgerId", parameterToString(t, "multi"))
+ }
}
if r.pageSize != nil {
localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, ""))
@@ -2444,7 +2475,15 @@ func (r apiGetLoyaltyCardTransactionsRequest) Execute() (InlineResponse2001, *_n
}
if r.subledgerId != nil {
- localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "csv"))
+ t := *r.subledgerId
+ if reflect.TypeOf(t).Kind() == reflect.Slice {
+ s := reflect.ValueOf(t)
+ for i := 0; i < s.Len(); i++ {
+ localVarQueryParams.Add("subledgerId", parameterToString(s.Index(i), "multi"))
+ }
+ } else {
+ localVarQueryParams.Add("subledgerId", parameterToString(t, "multi"))
+ }
}
if r.loyaltyTransactionType != nil {
localVarQueryParams.Add("loyaltyTransactionType", parameterToString(*r.loyaltyTransactionType, ""))
diff --git a/api_management.go b/api_management.go
index 484c7e00..7ec921d6 100644
--- a/api_management.go
+++ b/api_management.go
@@ -29,10 +29,10 @@ type ManagementApiService service
type apiActivateUserByEmailRequest struct {
ctx _context.Context
apiService *ManagementApiService
- body *ActivateUserRequest
+ body *DeactivateUserRequest
}
-func (r apiActivateUserByEmailRequest) Body(body ActivateUserRequest) apiActivateUserByEmailRequest {
+func (r apiActivateUserByEmailRequest) Body(body DeactivateUserRequest) apiActivateUserByEmailRequest {
r.body = &body
return r
}
@@ -4944,10 +4944,10 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
type apiDeleteUserByEmailRequest struct {
ctx _context.Context
apiService *ManagementApiService
- body *DeleteUserRequest
+ body *DeactivateUserRequest
}
-func (r apiDeleteUserByEmailRequest) Body(body DeleteUserRequest) apiDeleteUserByEmailRequest {
+func (r apiDeleteUserByEmailRequest) Body(body DeactivateUserRequest) apiDeleteUserByEmailRequest {
r.body = &body
return r
}
@@ -6318,7 +6318,7 @@ The CSV file can contain the following columns:
- `counter`: The number of times this coupon has been redeemed.
- - `created`: The creation date of the coupon code.
+ - `created`: The creation date in RFC3339 of the coupon code.
- `deleted`: Whether the coupon code is deleted.
@@ -7850,6 +7850,7 @@ type apiExportLoyaltyCardsRequest struct {
apiService *ManagementApiService
loyaltyProgramId int32
batchId *string
+ dateFormat *string
}
func (r apiExportLoyaltyCardsRequest) BatchId(batchId string) apiExportLoyaltyCardsRequest {
@@ -7857,6 +7858,11 @@ func (r apiExportLoyaltyCardsRequest) BatchId(batchId string) apiExportLoyaltyCa
return r
}
+func (r apiExportLoyaltyCardsRequest) DateFormat(dateFormat string) apiExportLoyaltyCardsRequest {
+ r.dateFormat = &dateFormat
+ return r
+}
+
/*
ExportLoyaltyCards Export loyalty cards
Download a CSV file containing the loyalty cards from a specified loyalty program.
@@ -7916,6 +7922,9 @@ func (r apiExportLoyaltyCardsRequest) Execute() (string, *_nethttp.Response, err
if r.batchId != nil {
localVarQueryParams.Add("batchId", parameterToString(*r.batchId, ""))
}
+ if r.dateFormat != nil {
+ localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, ""))
+ }
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@@ -9612,16 +9621,16 @@ func (a *ManagementApiService) GetAdditionalCosts(ctx _context.Context) apiGetAd
/*
Execute executes the request
- @return InlineResponse20036
+ @return InlineResponse20035
*/
-func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20036, *_nethttp.Response, error) {
+func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20035, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20036
+ localVarReturnValue InlineResponse20035
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAdditionalCosts")
@@ -9711,215 +9720,7 @@ func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20036, *_nethttp.
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20036
- err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHTTPResponse, newErr
- }
- newErr.model = v
- }
- return localVarReturnValue, localVarHTTPResponse, newErr
- }
-
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
- if err != nil {
- newErr := GenericOpenAPIError{
- body: localVarBody,
- error: err.Error(),
- }
- return localVarReturnValue, localVarHTTPResponse, newErr
- }
-
- return localVarReturnValue, localVarHTTPResponse, nil
-}
-
-type apiGetAllAccessLogsRequest struct {
- ctx _context.Context
- apiService *ManagementApiService
- rangeStart *time.Time
- rangeEnd *time.Time
- path *string
- method *string
- status *string
- pageSize *int32
- skip *int32
- sort *string
-}
-
-func (r apiGetAllAccessLogsRequest) RangeStart(rangeStart time.Time) apiGetAllAccessLogsRequest {
- r.rangeStart = &rangeStart
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) RangeEnd(rangeEnd time.Time) apiGetAllAccessLogsRequest {
- r.rangeEnd = &rangeEnd
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) Path(path string) apiGetAllAccessLogsRequest {
- r.path = &path
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) Method(method string) apiGetAllAccessLogsRequest {
- r.method = &method
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) Status(status string) apiGetAllAccessLogsRequest {
- r.status = &status
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) PageSize(pageSize int32) apiGetAllAccessLogsRequest {
- r.pageSize = &pageSize
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) Skip(skip int32) apiGetAllAccessLogsRequest {
- r.skip = &skip
- return r
-}
-
-func (r apiGetAllAccessLogsRequest) Sort(sort string) apiGetAllAccessLogsRequest {
- r.sort = &sort
- return r
-}
-
-/*
-GetAllAccessLogs List access logs
-Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs.
-
- - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-
-@return apiGetAllAccessLogsRequest
-*/
-func (a *ManagementApiService) GetAllAccessLogs(ctx _context.Context) apiGetAllAccessLogsRequest {
- return apiGetAllAccessLogsRequest{
- apiService: a,
- ctx: ctx,
- }
-}
-
-/*
-Execute executes the request
-
- @return InlineResponse20020
-*/
-func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Response, error) {
- var (
- localVarHTTPMethod = _nethttp.MethodGet
- localVarPostBody interface{}
- localVarFormFileName string
- localVarFileName string
- localVarFileBytes []byte
- localVarReturnValue InlineResponse20020
- )
-
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAllAccessLogs")
- if err != nil {
- return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
- }
-
- localVarPath := localBasePath + "/v1/access_logs"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := _neturl.Values{}
- localVarFormParams := _neturl.Values{}
-
- if r.rangeStart != nil {
- localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, ""))
- }
- if r.rangeEnd != nil {
- localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, ""))
- }
- if r.path != nil {
- localVarQueryParams.Add("path", parameterToString(*r.path, ""))
- }
- if r.method != nil {
- localVarQueryParams.Add("method", parameterToString(*r.method, ""))
- }
- if r.status != nil {
- localVarQueryParams.Add("status", parameterToString(*r.status, ""))
- }
- if r.pageSize != nil {
- localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, ""))
- }
- if r.skip != nil {
- localVarQueryParams.Add("skip", parameterToString(*r.skip, ""))
- }
- if r.sort != nil {
- localVarQueryParams.Add("sort", parameterToString(*r.sort, ""))
- }
- // to determine the Content-Type header
- localVarHTTPContentTypes := []string{}
-
- // set Content-Type header
- localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
- if localVarHTTPContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHTTPContentType
- }
-
- // to determine the Accept header
- localVarHTTPHeaderAccepts := []string{"application/json"}
-
- // set Accept header
- localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
- if localVarHTTPHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
- }
- if r.ctx != nil {
- // API Key Authentication
- if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
- if auth, ok := auth["Authorization"]; ok {
- var key string
- if auth.Prefix != "" {
- key = auth.Prefix + " " + auth.Key
- } else {
- key = auth.Key
- }
- localVarHeaderParams["Authorization"] = key
- }
- }
- }
- if r.ctx != nil {
- // API Key Authentication
- if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
- if auth, ok := auth["Authorization"]; ok {
- var key string
- if auth.Prefix != "" {
- key = auth.Prefix + " " + auth.Key
- } else {
- key = auth.Key
- }
- localVarHeaderParams["Authorization"] = key
- }
- }
- }
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
- if err != nil {
- return localVarReturnValue, nil, err
- }
-
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
- if err != nil || localVarHTTPResponse == nil {
- return localVarReturnValue, localVarHTTPResponse, err
- }
-
- localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
- localVarHTTPResponse.Body.Close()
- if err != nil {
- return localVarReturnValue, localVarHTTPResponse, err
- }
-
- if localVarHTTPResponse.StatusCode >= 300 {
- newErr := GenericOpenAPIError{
- body: localVarBody,
- error: localVarHTTPResponse.Status,
- }
- if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20020
+ var v InlineResponse20035
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -10092,7 +9893,7 @@ GetApplicationApiHealth Get Application health
Display the health of the Application and show the last time the Application
was used.
-You can also display this information from the **Settings** of an Application, in the **Developer Settings** menu.
+You can also find this information in the Campaign Manager. In your Application, click **Settings** > **Integration API Keys**.
See the [docs](https://docs.talon.one/docs/dev/tutorials/monitoring-integration-status).
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -10422,16 +10223,16 @@ func (a *ManagementApiService) GetApplicationCustomerFriends(ctx _context.Contex
/*
Execute executes the request
- @return InlineResponse20033
+ @return InlineResponse20032
*/
-func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20033, *_nethttp.Response, error) {
+func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20032, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20033
+ localVarReturnValue InlineResponse20032
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomerFriends")
@@ -10526,7 +10327,7 @@ func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20033,
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20033
+ var v InlineResponse20032
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -10598,16 +10399,16 @@ func (a *ManagementApiService) GetApplicationCustomers(ctx _context.Context, app
/*
Execute executes the request
- @return InlineResponse20022
+ @return InlineResponse20021
*/
-func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20022, *_nethttp.Response, error) {
+func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20021, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20022
+ localVarReturnValue InlineResponse20021
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomers")
@@ -10701,7 +10502,7 @@ func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20022, *_net
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20022
+ var v InlineResponse20021
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -10776,16 +10577,16 @@ func (a *ManagementApiService) GetApplicationCustomersByAttributes(ctx _context.
/*
Execute executes the request
- @return InlineResponse20023
+ @return InlineResponse20022
*/
-func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse20023, *_nethttp.Response, error) {
+func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse20022, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20023
+ localVarReturnValue InlineResponse20022
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomersByAttributes")
@@ -10882,7 +10683,7 @@ func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20023
+ var v InlineResponse20022
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -10951,16 +10752,16 @@ func (a *ManagementApiService) GetApplicationEventTypes(ctx _context.Context, ap
/*
Execute executes the request
- @return InlineResponse20029
+ @return InlineResponse20028
*/
-func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20029, *_nethttp.Response, error) {
+func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20028, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20029
+ localVarReturnValue InlineResponse20028
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationEventTypes")
@@ -11051,7 +10852,7 @@ func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20029, *_ne
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20029
+ var v InlineResponse20028
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -11184,16 +10985,16 @@ func (a *ManagementApiService) GetApplicationEventsWithoutTotalCount(ctx _contex
/*
Execute executes the request
- @return InlineResponse20028
+ @return InlineResponse20027
*/
-func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineResponse20028, *_nethttp.Response, error) {
+func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineResponse20027, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20028
+ localVarReturnValue InlineResponse20027
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationEventsWithoutTotalCount")
@@ -11317,7 +11118,7 @@ func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineRespon
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20028
+ var v InlineResponse20027
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -11577,16 +11378,16 @@ func (a *ManagementApiService) GetApplicationSessions(ctx _context.Context, appl
/*
Execute executes the request
- @return InlineResponse20027
+ @return InlineResponse20026
*/
-func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_nethttp.Response, error) {
+func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20026, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20027
+ localVarReturnValue InlineResponse20026
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationSessions")
@@ -11701,7 +11502,7 @@ func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_neth
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20027
+ var v InlineResponse20026
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -12073,16 +11874,16 @@ func (a *ManagementApiService) GetAttributes(ctx _context.Context) apiGetAttribu
/*
Execute executes the request
- @return InlineResponse20034
+ @return InlineResponse20033
*/
-func (r apiGetAttributesRequest) Execute() (InlineResponse20034, *_nethttp.Response, error) {
+func (r apiGetAttributesRequest) Execute() (InlineResponse20033, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20034
+ localVarReturnValue InlineResponse20033
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAttributes")
@@ -12175,7 +11976,7 @@ func (r apiGetAttributesRequest) Execute() (InlineResponse20034, *_nethttp.Respo
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20034
+ var v InlineResponse20033
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -12250,16 +12051,16 @@ func (a *ManagementApiService) GetAudienceMemberships(ctx _context.Context, audi
/*
Execute executes the request
- @return InlineResponse20032
+ @return InlineResponse20031
*/
-func (r apiGetAudienceMembershipsRequest) Execute() (InlineResponse20032, *_nethttp.Response, error) {
+func (r apiGetAudienceMembershipsRequest) Execute() (InlineResponse20031, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20032
+ localVarReturnValue InlineResponse20031
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudienceMemberships")
@@ -12353,7 +12154,7 @@ func (r apiGetAudienceMembershipsRequest) Execute() (InlineResponse20032, *_neth
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20032
+ var v InlineResponse20031
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -12433,16 +12234,16 @@ func (a *ManagementApiService) GetAudiences(ctx _context.Context) apiGetAudience
/*
Execute executes the request
- @return InlineResponse20030
+ @return InlineResponse20029
*/
-func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Response, error) {
+func (r apiGetAudiencesRequest) Execute() (InlineResponse20029, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20030
+ localVarReturnValue InlineResponse20029
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudiences")
@@ -12535,7 +12336,7 @@ func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Respon
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20030
+ var v InlineResponse20029
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -12593,16 +12394,16 @@ func (a *ManagementApiService) GetAudiencesAnalytics(ctx _context.Context) apiGe
/*
Execute executes the request
- @return InlineResponse20031
+ @return InlineResponse20030
*/
-func (r apiGetAudiencesAnalyticsRequest) Execute() (InlineResponse20031, *_nethttp.Response, error) {
+func (r apiGetAudiencesAnalyticsRequest) Execute() (InlineResponse20030, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20031
+ localVarReturnValue InlineResponse20030
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudiencesAnalytics")
@@ -12691,7 +12492,7 @@ func (r apiGetAudiencesAnalyticsRequest) Execute() (InlineResponse20031, *_netht
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20031
+ var v InlineResponse20030
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -12903,16 +12704,16 @@ func (a *ManagementApiService) GetCampaignAnalytics(ctx _context.Context, applic
/*
Execute executes the request
- @return InlineResponse20021
+ @return InlineResponse20020
*/
-func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20021, *_nethttp.Response, error) {
+func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20020, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20021
+ localVarReturnValue InlineResponse20020
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignAnalytics")
@@ -13008,7 +12809,7 @@ func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20021, *_nethtt
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20021
+ var v InlineResponse20020
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -14056,16 +13857,16 @@ func (a *ManagementApiService) GetChanges(ctx _context.Context) apiGetChangesReq
/*
Execute executes the request
- @return InlineResponse20042
+ @return InlineResponse20041
*/
-func (r apiGetChangesRequest) Execute() (InlineResponse20042, *_nethttp.Response, error) {
+func (r apiGetChangesRequest) Execute() (InlineResponse20041, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20042
+ localVarReturnValue InlineResponse20041
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetChanges")
@@ -14179,7 +13980,7 @@ func (r apiGetChangesRequest) Execute() (InlineResponse20042, *_nethttp.Response
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20042
+ var v InlineResponse20041
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -15099,16 +14900,16 @@ func (a *ManagementApiService) GetCustomerActivityReportsWithoutTotalCount(ctx _
/*
Execute executes the request
- @return InlineResponse20026
+ @return InlineResponse20025
*/
-func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (InlineResponse20026, *_nethttp.Response, error) {
+func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (InlineResponse20025, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20026
+ localVarReturnValue InlineResponse20025
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerActivityReportsWithoutTotalCount")
@@ -15221,7 +15022,7 @@ func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (Inline
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20026
+ var v InlineResponse20025
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -15619,16 +15420,16 @@ func (a *ManagementApiService) GetCustomerProfileAchievementProgress(ctx _contex
/*
Execute executes the request
- @return InlineResponse20047
+ @return InlineResponse20046
*/
-func (r apiGetCustomerProfileAchievementProgressRequest) Execute() (InlineResponse20047, *_nethttp.Response, error) {
+func (r apiGetCustomerProfileAchievementProgressRequest) Execute() (InlineResponse20046, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20047
+ localVarReturnValue InlineResponse20046
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfileAchievementProgress")
@@ -15723,7 +15524,7 @@ func (r apiGetCustomerProfileAchievementProgressRequest) Execute() (InlineRespon
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20047
+ var v InlineResponse20046
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -15806,16 +15607,16 @@ func (a *ManagementApiService) GetCustomerProfiles(ctx _context.Context) apiGetC
/*
Execute executes the request
- @return InlineResponse20025
+ @return InlineResponse20024
*/
-func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20025, *_nethttp.Response, error) {
+func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20024, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20025
+ localVarReturnValue InlineResponse20024
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfiles")
@@ -15905,7 +15706,7 @@ func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20025, *_nethttp
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20025
+ var v InlineResponse20024
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -15977,16 +15778,16 @@ func (a *ManagementApiService) GetCustomersByAttributes(ctx _context.Context) ap
/*
Execute executes the request
- @return InlineResponse20024
+ @return InlineResponse20023
*/
-func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_nethttp.Response, error) {
+func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20023, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20024
+ localVarReturnValue InlineResponse20023
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomersByAttributes")
@@ -16082,7 +15883,7 @@ func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_ne
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20024
+ var v InlineResponse20023
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -16158,16 +15959,16 @@ func (a *ManagementApiService) GetEventTypes(ctx _context.Context) apiGetEventTy
/*
Execute executes the request
- @return InlineResponse20040
+ @return InlineResponse20039
*/
-func (r apiGetEventTypesRequest) Execute() (InlineResponse20040, *_nethttp.Response, error) {
+func (r apiGetEventTypesRequest) Execute() (InlineResponse20039, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20040
+ localVarReturnValue InlineResponse20039
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetEventTypes")
@@ -16263,7 +16064,7 @@ func (r apiGetEventTypesRequest) Execute() (InlineResponse20040, *_nethttp.Respo
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20040
+ var v InlineResponse20039
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -16339,16 +16140,16 @@ func (a *ManagementApiService) GetExports(ctx _context.Context) apiGetExportsReq
/*
Execute executes the request
- @return InlineResponse20043
+ @return InlineResponse20042
*/
-func (r apiGetExportsRequest) Execute() (InlineResponse20043, *_nethttp.Response, error) {
+func (r apiGetExportsRequest) Execute() (InlineResponse20042, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20043
+ localVarReturnValue InlineResponse20042
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetExports")
@@ -16444,7 +16245,7 @@ func (r apiGetExportsRequest) Execute() (InlineResponse20043, *_nethttp.Response
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20043
+ var v InlineResponse20042
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -18892,16 +18693,16 @@ func (a *ManagementApiService) GetUsers(ctx _context.Context) apiGetUsersRequest
/*
Execute executes the request
- @return InlineResponse20041
+ @return InlineResponse20040
*/
-func (r apiGetUsersRequest) Execute() (InlineResponse20041, *_nethttp.Response, error) {
+func (r apiGetUsersRequest) Execute() (InlineResponse20040, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20041
+ localVarReturnValue InlineResponse20040
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetUsers")
@@ -18991,7 +18792,7 @@ func (r apiGetUsersRequest) Execute() (InlineResponse20041, *_nethttp.Response,
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20041
+ var v InlineResponse20040
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -19231,16 +19032,16 @@ func (a *ManagementApiService) GetWebhookActivationLogs(ctx _context.Context) ap
/*
Execute executes the request
- @return InlineResponse20038
+ @return InlineResponse20037
*/
-func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20038, *_nethttp.Response, error) {
+func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20037, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20038
+ localVarReturnValue InlineResponse20037
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhookActivationLogs")
@@ -19348,7 +19149,7 @@ func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20038, *_ne
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20038
+ var v InlineResponse20037
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -19453,16 +19254,16 @@ func (a *ManagementApiService) GetWebhookLogs(ctx _context.Context) apiGetWebhoo
/*
Execute executes the request
- @return InlineResponse20039
+ @return InlineResponse20038
*/
-func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20039, *_nethttp.Response, error) {
+func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20038, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20039
+ localVarReturnValue InlineResponse20038
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhookLogs")
@@ -19573,7 +19374,7 @@ func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20039, *_nethttp.Resp
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20039
+ var v InlineResponse20038
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -19666,16 +19467,16 @@ func (a *ManagementApiService) GetWebhooks(ctx _context.Context) apiGetWebhooksR
/*
Execute executes the request
- @return InlineResponse20037
+ @return InlineResponse20036
*/
-func (r apiGetWebhooksRequest) Execute() (InlineResponse20037, *_nethttp.Response, error) {
+func (r apiGetWebhooksRequest) Execute() (InlineResponse20036, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20037
+ localVarReturnValue InlineResponse20036
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhooks")
@@ -19780,7 +19581,7 @@ func (r apiGetWebhooksRequest) Execute() (InlineResponse20037, *_nethttp.Respons
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20037
+ var v InlineResponse20036
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -20977,7 +20778,7 @@ It contains the following columns for each card:
- `identifier` (required): The alphanumeric identifier of the loyalty card.
- `state` (required): The state of the loyalty card. It can be `active` or `inactive`.
-- `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card.
+- `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;).
**Note:** We recommend limiting your file size to 500MB.
@@ -21370,6 +21171,10 @@ Depending on the type of loyalty program, you can import points into a given cus
The CSV file contains the following columns:
- `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported.
+
+ **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application
+ until a session or profile update is received for that profile.
+
- `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported.
- `amount`: The amount of points to award to the customer profile.
- `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date.
@@ -22279,16 +22084,16 @@ func (a *ManagementApiService) ListAchievements(ctx _context.Context, applicatio
/*
Execute executes the request
- @return InlineResponse20046
+ @return InlineResponse20045
*/
-func (r apiListAchievementsRequest) Execute() (InlineResponse20046, *_nethttp.Response, error) {
+func (r apiListAchievementsRequest) Execute() (InlineResponse20045, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20046
+ localVarReturnValue InlineResponse20045
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListAchievements")
@@ -22380,7 +22185,7 @@ func (r apiListAchievementsRequest) Execute() (InlineResponse20046, *_nethttp.Re
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20046
+ var v InlineResponse20045
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -22425,16 +22230,16 @@ func (a *ManagementApiService) ListAllRolesV2(ctx _context.Context) apiListAllRo
/*
Execute executes the request
- @return InlineResponse20044
+ @return InlineResponse20043
*/
-func (r apiListAllRolesV2Request) Execute() (InlineResponse20044, *_nethttp.Response, error) {
+func (r apiListAllRolesV2Request) Execute() (InlineResponse20043, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20044
+ localVarReturnValue InlineResponse20043
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListAllRolesV2")
@@ -22515,7 +22320,7 @@ func (r apiListAllRolesV2Request) Execute() (InlineResponse20044, *_nethttp.Resp
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20044
+ var v InlineResponse20043
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -22594,16 +22399,16 @@ func (a *ManagementApiService) ListCatalogItems(ctx _context.Context, catalogId
/*
Execute executes the request
- @return InlineResponse20035
+ @return InlineResponse20034
*/
-func (r apiListCatalogItemsRequest) Execute() (InlineResponse20035, *_nethttp.Response, error) {
+func (r apiListCatalogItemsRequest) Execute() (InlineResponse20034, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20035
+ localVarReturnValue InlineResponse20034
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCatalogItems")
@@ -22700,7 +22505,7 @@ func (r apiListCatalogItemsRequest) Execute() (InlineResponse20035, *_nethttp.Re
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20035
+ var v InlineResponse20034
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -23188,16 +22993,16 @@ func (a *ManagementApiService) ListStores(ctx _context.Context, applicationId in
/*
Execute executes the request
- @return InlineResponse20045
+ @return InlineResponse20044
*/
-func (r apiListStoresRequest) Execute() (InlineResponse20045, *_nethttp.Response, error) {
+func (r apiListStoresRequest) Execute() (InlineResponse20044, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue InlineResponse20045
+ localVarReturnValue InlineResponse20044
)
localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListStores")
@@ -23303,7 +23108,7 @@ func (r apiListStoresRequest) Execute() (InlineResponse20045, *_nethttp.Response
error: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 200 {
- var v InlineResponse20045
+ var v InlineResponse20044
err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
@@ -27119,6 +26924,9 @@ func (r apiUpdateCampaignRequest) Body(body UpdateCampaign) apiUpdateCampaignReq
/*
UpdateCampaign Update campaign
Update the given campaign.
+
+**Important:** You cannot use this endpoint to update campaigns if [campaign staging and revisions](https://docs.talon.one/docs/product/applications/managing-general-settings#campaign-staging-and-revisions) is enabled for your Application.
+
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL.
- @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL.
@@ -27449,7 +27257,7 @@ Update the specified coupon.
Important
- With this PUT
endpoint alone, if you do not explicitly set a value for the startDate
, expiryDate
, and recipientIntegrationId
properties in your request, it is automatically set to null
.
+ With this PUT
endpoint, if you do not explicitly set a value for the startDate
, expiryDate
, and recipientIntegrationId
properties in your request, it is automatically set to null
.
@@ -27610,8 +27418,8 @@ func (r apiUpdateCouponBatchRequest) Body(body UpdateCouponBatch) apiUpdateCoupo
/*
UpdateCouponBatch Update coupons
-Update all coupons, or a specific batch of coupons in the given campaign.
-You can find the `batchId` in the **Coupons** view of your Application
+Update all coupons or a specific batch of coupons in the given campaign.
+You can find the `batchId` on the **Coupons** page of your campaign
in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount).
@@ -27620,7 +27428,8 @@ in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWith
- Only send sequential requests to this endpoint.
- - Requests to this endpoint timeout after 30 minutes. If you hit a timeout, reach out to our support team.
+ - Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team.
+ - With this
PUT
endpoint, if you do not explicitly set a value for the startDate
and expiryDate
properties in your request, it is automatically set to null
.
diff --git a/configuration.go b/configuration.go
index df66f44f..b8e41b58 100644
--- a/configuration.go
+++ b/configuration.go
@@ -97,7 +97,7 @@ type Configuration struct {
func NewConfiguration() *Configuration {
cfg := &Configuration{
DefaultHeader: make(map[string]string),
- UserAgent: "OpenAPI-Generator/8.0.0/go",
+ UserAgent: "OpenAPI-Generator/9.0.0/go",
Debug: false,
Servers: ServerConfigurations{
{
diff --git a/docs/Achievement.md b/docs/Achievement.md
index e355134e..d083c53d 100644
--- a/docs/Achievement.md
+++ b/docs/Achievement.md
@@ -12,6 +12,10 @@ Name | Type | Description | Notes
**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. |
**Period** | Pointer to **string** | The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. |
**PeriodEndOverride** | Pointer to [**TimePoint**](TimePoint.md) | | [optional]
+**RecurrencePolicy** | Pointer to **string** | The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. | [optional]
+**ActivationPolicy** | Pointer to **string** | The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. | [optional]
+**FixedStartDate** | Pointer to [**time.Time**](time.Time.md) | The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string. | [optional]
+**EndDate** | Pointer to [**time.Time**](time.Time.md) | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. | [optional]
**CampaignId** | Pointer to **int32** | ID of the campaign, to which the achievement belongs to |
**UserId** | Pointer to **int32** | ID of the user that created this achievement. |
**CreatedBy** | Pointer to **string** | Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. |
@@ -219,6 +223,106 @@ HasPeriodEndOverride returns a boolean if a field has been set.
SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field.
+### GetRecurrencePolicy
+
+`func (o *Achievement) GetRecurrencePolicy() string`
+
+GetRecurrencePolicy returns the RecurrencePolicy field if non-nil, zero value otherwise.
+
+### GetRecurrencePolicyOk
+
+`func (o *Achievement) GetRecurrencePolicyOk() (string, bool)`
+
+GetRecurrencePolicyOk returns a tuple with the RecurrencePolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasRecurrencePolicy
+
+`func (o *Achievement) HasRecurrencePolicy() bool`
+
+HasRecurrencePolicy returns a boolean if a field has been set.
+
+### SetRecurrencePolicy
+
+`func (o *Achievement) SetRecurrencePolicy(v string)`
+
+SetRecurrencePolicy gets a reference to the given string and assigns it to the RecurrencePolicy field.
+
+### GetActivationPolicy
+
+`func (o *Achievement) GetActivationPolicy() string`
+
+GetActivationPolicy returns the ActivationPolicy field if non-nil, zero value otherwise.
+
+### GetActivationPolicyOk
+
+`func (o *Achievement) GetActivationPolicyOk() (string, bool)`
+
+GetActivationPolicyOk returns a tuple with the ActivationPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasActivationPolicy
+
+`func (o *Achievement) HasActivationPolicy() bool`
+
+HasActivationPolicy returns a boolean if a field has been set.
+
+### SetActivationPolicy
+
+`func (o *Achievement) SetActivationPolicy(v string)`
+
+SetActivationPolicy gets a reference to the given string and assigns it to the ActivationPolicy field.
+
+### GetFixedStartDate
+
+`func (o *Achievement) GetFixedStartDate() time.Time`
+
+GetFixedStartDate returns the FixedStartDate field if non-nil, zero value otherwise.
+
+### GetFixedStartDateOk
+
+`func (o *Achievement) GetFixedStartDateOk() (time.Time, bool)`
+
+GetFixedStartDateOk returns a tuple with the FixedStartDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFixedStartDate
+
+`func (o *Achievement) HasFixedStartDate() bool`
+
+HasFixedStartDate returns a boolean if a field has been set.
+
+### SetFixedStartDate
+
+`func (o *Achievement) SetFixedStartDate(v time.Time)`
+
+SetFixedStartDate gets a reference to the given time.Time and assigns it to the FixedStartDate field.
+
+### GetEndDate
+
+`func (o *Achievement) GetEndDate() time.Time`
+
+GetEndDate returns the EndDate field if non-nil, zero value otherwise.
+
+### GetEndDateOk
+
+`func (o *Achievement) GetEndDateOk() (time.Time, bool)`
+
+GetEndDateOk returns a tuple with the EndDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEndDate
+
+`func (o *Achievement) HasEndDate() bool`
+
+HasEndDate returns a boolean if a field has been set.
+
+### SetEndDate
+
+`func (o *Achievement) SetEndDate(v time.Time)`
+
+SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
+
### GetCampaignId
`func (o *Achievement) GetCampaignId() int32`
diff --git a/docs/ActivateUserRequest.md b/docs/ActivateUserRequest.md
index a0f3bb37..3d5d0e4d 100644
--- a/docs/ActivateUserRequest.md
+++ b/docs/ActivateUserRequest.md
@@ -4,35 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Email** | Pointer to **string** | The email address associated with the user profile. |
## Methods
-### GetEmail
-
-`func (o *ActivateUserRequest) GetEmail() string`
-
-GetEmail returns the Email field if non-nil, zero value otherwise.
-
-### GetEmailOk
-
-`func (o *ActivateUserRequest) GetEmailOk() (string, bool)`
-
-GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasEmail
-
-`func (o *ActivateUserRequest) HasEmail() bool`
-
-HasEmail returns a boolean if a field has been set.
-
-### SetEmail
-
-`func (o *ActivateUserRequest) SetEmail(v string)`
-
-SetEmail gets a reference to the given string and assigns it to the Email field.
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/AdditionalCampaignProperties.md b/docs/AdditionalCampaignProperties.md
index 793b796d..22a49dbb 100644
--- a/docs/AdditionalCampaignProperties.md
+++ b/docs/AdditionalCampaignProperties.md
@@ -25,7 +25,7 @@ Name | Type | Description | Notes
**CreatedBy** | Pointer to **string** | Name of the user who created this campaign if available. | [optional]
**UpdatedBy** | Pointer to **string** | Name of the user who last updated this campaign if available. | [optional]
**TemplateId** | Pointer to **int32** | The ID of the Campaign Template this Campaign was created from. | [optional]
-**FrontendState** | Pointer to **string** | A campaign state described exactly as in the Campaign Manager. |
+**FrontendState** | Pointer to **string** | The campaign state displayed in the Campaign Manager. |
**StoresImported** | Pointer to **bool** | Indicates whether the linked stores were imported via a CSV file. |
## Methods
diff --git a/docs/AnalyticsProduct.md b/docs/AnalyticsProduct.md
new file mode 100644
index 00000000..dd103eb7
--- /dev/null
+++ b/docs/AnalyticsProduct.md
@@ -0,0 +1,117 @@
+# AnalyticsProduct
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | Pointer to **int32** | The ID of the analytics-level product. |
+**IsPreliminary** | Pointer to **bool** | Indicates whether the analytics-level product is connected to a catalog and also has a product name. |
+**Name** | Pointer to **string** | The name of the analytics-level product. |
+**CatalogId** | Pointer to **int32** | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. | [optional]
+
+## Methods
+
+### GetId
+
+`func (o *AnalyticsProduct) GetId() int32`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *AnalyticsProduct) GetIdOk() (int32, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *AnalyticsProduct) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *AnalyticsProduct) SetId(v int32)`
+
+SetId gets a reference to the given int32 and assigns it to the Id field.
+
+### GetIsPreliminary
+
+`func (o *AnalyticsProduct) GetIsPreliminary() bool`
+
+GetIsPreliminary returns the IsPreliminary field if non-nil, zero value otherwise.
+
+### GetIsPreliminaryOk
+
+`func (o *AnalyticsProduct) GetIsPreliminaryOk() (bool, bool)`
+
+GetIsPreliminaryOk returns a tuple with the IsPreliminary field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasIsPreliminary
+
+`func (o *AnalyticsProduct) HasIsPreliminary() bool`
+
+HasIsPreliminary returns a boolean if a field has been set.
+
+### SetIsPreliminary
+
+`func (o *AnalyticsProduct) SetIsPreliminary(v bool)`
+
+SetIsPreliminary gets a reference to the given bool and assigns it to the IsPreliminary field.
+
+### GetName
+
+`func (o *AnalyticsProduct) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AnalyticsProduct) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AnalyticsProduct) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AnalyticsProduct) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
+### GetCatalogId
+
+`func (o *AnalyticsProduct) GetCatalogId() int32`
+
+GetCatalogId returns the CatalogId field if non-nil, zero value otherwise.
+
+### GetCatalogIdOk
+
+`func (o *AnalyticsProduct) GetCatalogIdOk() (int32, bool)`
+
+GetCatalogIdOk returns a tuple with the CatalogId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCatalogId
+
+`func (o *AnalyticsProduct) HasCatalogId() bool`
+
+HasCatalogId returns a boolean if a field has been set.
+
+### SetCatalogId
+
+`func (o *AnalyticsProduct) SetCatalogId(v int32)`
+
+SetCatalogId gets a reference to the given int32 and assigns it to the CatalogId field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AnalyticsProductSku.md b/docs/AnalyticsProductSku.md
new file mode 100644
index 00000000..0db120fa
--- /dev/null
+++ b/docs/AnalyticsProductSku.md
@@ -0,0 +1,91 @@
+# AnalyticsProductSku
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | Pointer to **int32** | The ID of the SKU linked to the analytics-level product. |
+**Sku** | Pointer to **string** | The SKU linked to the analytics-level product. |
+**LastUpdated** | Pointer to [**time.Time**](time.Time.md) | Values in UTC for the date the SKU linked to the analytics-level product was last updated. |
+
+## Methods
+
+### GetId
+
+`func (o *AnalyticsProductSku) GetId() int32`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *AnalyticsProductSku) GetIdOk() (int32, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *AnalyticsProductSku) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *AnalyticsProductSku) SetId(v int32)`
+
+SetId gets a reference to the given int32 and assigns it to the Id field.
+
+### GetSku
+
+`func (o *AnalyticsProductSku) GetSku() string`
+
+GetSku returns the Sku field if non-nil, zero value otherwise.
+
+### GetSkuOk
+
+`func (o *AnalyticsProductSku) GetSkuOk() (string, bool)`
+
+GetSkuOk returns a tuple with the Sku field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSku
+
+`func (o *AnalyticsProductSku) HasSku() bool`
+
+HasSku returns a boolean if a field has been set.
+
+### SetSku
+
+`func (o *AnalyticsProductSku) SetSku(v string)`
+
+SetSku gets a reference to the given string and assigns it to the Sku field.
+
+### GetLastUpdated
+
+`func (o *AnalyticsProductSku) GetLastUpdated() time.Time`
+
+GetLastUpdated returns the LastUpdated field if non-nil, zero value otherwise.
+
+### GetLastUpdatedOk
+
+`func (o *AnalyticsProductSku) GetLastUpdatedOk() (time.Time, bool)`
+
+GetLastUpdatedOk returns a tuple with the LastUpdated field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasLastUpdated
+
+`func (o *AnalyticsProductSku) HasLastUpdated() bool`
+
+HasLastUpdated returns a boolean if a field has been set.
+
+### SetLastUpdated
+
+`func (o *AnalyticsProductSku) SetLastUpdated(v time.Time)`
+
+SetLastUpdated gets a reference to the given time.Time and assigns it to the LastUpdated field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ApplicationCampaignStats.md b/docs/ApplicationCampaignStats.md
index 0c96609c..df6e2fe3 100644
--- a/docs/ApplicationCampaignStats.md
+++ b/docs/ApplicationCampaignStats.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Disabled** | Pointer to **int32** | Number of disabled campaigns. |
+**Staged** | Pointer to **int32** | Number of staged campaigns. |
**Scheduled** | Pointer to **int32** | Number of scheduled campaigns. |
**Running** | Pointer to **int32** | Number of running campaigns. |
**Expired** | Pointer to **int32** | Number of expired campaigns. |
@@ -37,6 +38,31 @@ HasDisabled returns a boolean if a field has been set.
SetDisabled gets a reference to the given int32 and assigns it to the Disabled field.
+### GetStaged
+
+`func (o *ApplicationCampaignStats) GetStaged() int32`
+
+GetStaged returns the Staged field if non-nil, zero value otherwise.
+
+### GetStagedOk
+
+`func (o *ApplicationCampaignStats) GetStagedOk() (int32, bool)`
+
+GetStagedOk returns a tuple with the Staged field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStaged
+
+`func (o *ApplicationCampaignStats) HasStaged() bool`
+
+HasStaged returns a boolean if a field has been set.
+
+### SetStaged
+
+`func (o *ApplicationCampaignStats) SetStaged(v int32)`
+
+SetStaged gets a reference to the given int32 and assigns it to the Staged field.
+
### GetScheduled
`func (o *ApplicationCampaignStats) GetScheduled() int32`
diff --git a/docs/ApplicationCifExpression.md b/docs/ApplicationCifExpression.md
index 84f25177..72085d60 100644
--- a/docs/ApplicationCifExpression.md
+++ b/docs/ApplicationCifExpression.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**CartItemFilterId** | Pointer to **int32** | The ID of the Application cart item filter. | [optional]
**CreatedBy** | Pointer to **int32** | The ID of the user who created the Application cart item filter. | [optional]
-**Expression** | Pointer to [**[]interface{}**](map[string]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
+**Expression** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
**ApplicationId** | Pointer to **int32** | The ID of the application that owns this entity. |
## Methods
@@ -115,13 +115,13 @@ SetCreatedBy gets a reference to the given int32 and assigns it to the CreatedBy
### GetExpression
-`func (o *ApplicationCifExpression) GetExpression() []interface{}`
+`func (o *ApplicationCifExpression) GetExpression() []map[string]interface{}`
GetExpression returns the Expression field if non-nil, zero value otherwise.
### GetExpressionOk
-`func (o *ApplicationCifExpression) GetExpressionOk() ([]interface{}, bool)`
+`func (o *ApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool)`
GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -134,7 +134,7 @@ HasExpression returns a boolean if a field has been set.
### SetExpression
-`func (o *ApplicationCifExpression) SetExpression(v []interface{})`
+`func (o *ApplicationCifExpression) SetExpression(v []map[string]interface{})`
SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
diff --git a/docs/ApplicationCustomer.md b/docs/ApplicationCustomer.md
index f62e4019..62fc70df 100644
--- a/docs/ApplicationCustomer.md
+++ b/docs/ApplicationCustomer.md
@@ -4,11 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | Pointer to **int32** | Internal ID of this entity. Internal ID of this entity. |
-**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. The time this entity was created. The time this entity was created. The time this entity was created. |
-**IntegrationId** | Pointer to **string** | The integration ID set by your integration layer. The integration ID set by your integration layer. |
+**Id** | Pointer to **int32** | Internal ID of this entity. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
+**IntegrationId** | Pointer to **string** | The integration ID set by your integration layer. |
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary properties associated with this item. |
-**AccountId** | Pointer to **int32** | The ID of the Talon.One account that owns this profile. The ID of the Talon.One account that owns this profile. |
+**AccountId** | Pointer to **int32** | The ID of the Talon.One account that owns this profile. |
**ClosedSessions** | Pointer to **int32** | The total amount of closed sessions by a customer. A closed session is a successful purchase. |
**TotalSales** | Pointer to **float32** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. |
**LoyaltyMemberships** | Pointer to [**[]LoyaltyMembership**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional]
diff --git a/docs/ApplicationSession.md b/docs/ApplicationSession.md
index 865c76eb..f6734d1a 100644
--- a/docs/ApplicationSession.md
+++ b/docs/ApplicationSession.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Internal ID of this entity. |
-**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. The time this entity was created. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**IntegrationId** | Pointer to **string** | The integration ID set by your integration layer. |
**StoreIntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. | [optional]
**ApplicationId** | Pointer to **int32** | The ID of the application that owns this entity. |
diff --git a/docs/AudienceCustomer.md b/docs/AudienceCustomer.md
index 74d49986..be98451e 100644
--- a/docs/AudienceCustomer.md
+++ b/docs/AudienceCustomer.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Internal ID of this entity. |
-**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. The time this entity was created. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**IntegrationId** | Pointer to **string** | The integration ID set by your integration layer. |
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary properties associated with this item. |
**AccountId** | Pointer to **int32** | The ID of the Talon.One account that owns this profile. |
diff --git a/docs/BaseLoyaltyProgram.md b/docs/BaseLoyaltyProgram.md
index d64ce729..215a08a3 100644
--- a/docs/BaseLoyaltyProgram.md
+++ b/docs/BaseLoyaltyProgram.md
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires and is reevaluated. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional]
**TiersDowngradePolicy** | Pointer to **string** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional]
**CardCodeSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**ReturnPolicy** | Pointer to **string** | The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative. | [optional]
## Methods
@@ -371,6 +372,31 @@ HasCardCodeSettings returns a boolean if a field has been set.
SetCardCodeSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CardCodeSettings field.
+### GetReturnPolicy
+
+`func (o *BaseLoyaltyProgram) GetReturnPolicy() string`
+
+GetReturnPolicy returns the ReturnPolicy field if non-nil, zero value otherwise.
+
+### GetReturnPolicyOk
+
+`func (o *BaseLoyaltyProgram) GetReturnPolicyOk() (string, bool)`
+
+GetReturnPolicyOk returns a tuple with the ReturnPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasReturnPolicy
+
+`func (o *BaseLoyaltyProgram) HasReturnPolicy() bool`
+
+HasReturnPolicy returns a boolean if a field has been set.
+
+### SetReturnPolicy
+
+`func (o *BaseLoyaltyProgram) SetReturnPolicy(v string)`
+
+SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Binding.md b/docs/Binding.md
index 225b681f..0d51b941 100644
--- a/docs/Binding.md
+++ b/docs/Binding.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | A descriptive name for the value to be bound. |
**Type** | Pointer to **string** | The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter` | [optional]
-**Expression** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that will be evaluated and its result attached to the name of the binding. |
+**Expression** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that will be evaluated and its result attached to the name of the binding. |
**ValueType** | Pointer to **string** | Can be one of the following: - `string` - `number` - `boolean` | [optional]
## Methods
@@ -63,13 +63,13 @@ SetType gets a reference to the given string and assigns it to the Type field.
### GetExpression
-`func (o *Binding) GetExpression() []interface{}`
+`func (o *Binding) GetExpression() []map[string]interface{}`
GetExpression returns the Expression field if non-nil, zero value otherwise.
### GetExpressionOk
-`func (o *Binding) GetExpressionOk() ([]interface{}, bool)`
+`func (o *Binding) GetExpressionOk() ([]map[string]interface{}, bool)`
GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -82,9 +82,9 @@ HasExpression returns a boolean if a field has been set.
### SetExpression
-`func (o *Binding) SetExpression(v []interface{})`
+`func (o *Binding) SetExpression(v []map[string]interface{})`
-SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
+SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
### GetValueType
diff --git a/docs/BulkOperationOnCampaigns.md b/docs/BulkOperationOnCampaigns.md
index 4e02a564..9f5f4a09 100644
--- a/docs/BulkOperationOnCampaigns.md
+++ b/docs/BulkOperationOnCampaigns.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Operation** | Pointer to **string** | The operation to perform on the specified campaign IDs. |
**CampaignIds** | Pointer to **[]int32** | The list of campaign IDs on which the operation will be performed. |
+**ActivateAt** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the revisions are finalized after the `activate_revision` operation. The current time is used when left blank. **Note:** It must be an RFC3339 timestamp string. | [optional]
## Methods
@@ -59,6 +60,31 @@ HasCampaignIds returns a boolean if a field has been set.
SetCampaignIds gets a reference to the given []int32 and assigns it to the CampaignIds field.
+### GetActivateAt
+
+`func (o *BulkOperationOnCampaigns) GetActivateAt() time.Time`
+
+GetActivateAt returns the ActivateAt field if non-nil, zero value otherwise.
+
+### GetActivateAtOk
+
+`func (o *BulkOperationOnCampaigns) GetActivateAtOk() (time.Time, bool)`
+
+GetActivateAtOk returns a tuple with the ActivateAt field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasActivateAt
+
+`func (o *BulkOperationOnCampaigns) HasActivateAt() bool`
+
+HasActivateAt returns a boolean if a field has been set.
+
+### SetActivateAt
+
+`func (o *BulkOperationOnCampaigns) SetActivateAt(v time.Time)`
+
+SetActivateAt gets a reference to the given time.Time and assigns it to the ActivateAt field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Campaign.md b/docs/Campaign.md
index dc2143da..0cdac413 100644
--- a/docs/Campaign.md
+++ b/docs/Campaign.md
@@ -44,8 +44,9 @@ Name | Type | Description | Notes
**CreatedBy** | Pointer to **string** | Name of the user who created this campaign if available. | [optional]
**UpdatedBy** | Pointer to **string** | Name of the user who last updated this campaign if available. | [optional]
**TemplateId** | Pointer to **int32** | The ID of the Campaign Template this Campaign was created from. | [optional]
-**FrontendState** | Pointer to **string** | A campaign state described exactly as in the Campaign Manager. |
+**FrontendState** | Pointer to **string** | The campaign state displayed in the Campaign Manager. |
**StoresImported** | Pointer to **bool** | Indicates whether the linked stores were imported via a CSV file. |
+**RevisionFrontendState** | Pointer to **string** | The campaign revision state displayed in the Campaign Manager. | [optional]
**ActiveRevisionId** | Pointer to **int32** | ID of the revision that was last activated on this campaign. | [optional]
**ActiveRevisionVersionId** | Pointer to **int32** | ID of the revision version that is active on the campaign. | [optional]
**Version** | Pointer to **int32** | Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign. | [optional]
@@ -1105,6 +1106,31 @@ HasStoresImported returns a boolean if a field has been set.
SetStoresImported gets a reference to the given bool and assigns it to the StoresImported field.
+### GetRevisionFrontendState
+
+`func (o *Campaign) GetRevisionFrontendState() string`
+
+GetRevisionFrontendState returns the RevisionFrontendState field if non-nil, zero value otherwise.
+
+### GetRevisionFrontendStateOk
+
+`func (o *Campaign) GetRevisionFrontendStateOk() (string, bool)`
+
+GetRevisionFrontendStateOk returns a tuple with the RevisionFrontendState field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasRevisionFrontendState
+
+`func (o *Campaign) HasRevisionFrontendState() bool`
+
+HasRevisionFrontendState returns a boolean if a field has been set.
+
+### SetRevisionFrontendState
+
+`func (o *Campaign) SetRevisionFrontendState(v string)`
+
+SetRevisionFrontendState gets a reference to the given string and assigns it to the RevisionFrontendState field.
+
### GetActiveRevisionId
`func (o *Campaign) GetActiveRevisionId() int32`
diff --git a/docs/CampaignTemplate.md b/docs/CampaignTemplate.md
index 61f4fb08..bca9ac5c 100644
--- a/docs/CampaignTemplate.md
+++ b/docs/CampaignTemplate.md
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
**Tags** | Pointer to **[]string** | A list of tags for the campaign template. | [optional]
**Features** | Pointer to **[]string** | A list of features for the campaign template. | [optional]
**CouponSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**CouponReservationSettings** | Pointer to [**CampaignTemplateCouponReservationSettings**](CampaignTemplateCouponReservationSettings.md) | | [optional]
**ReferralSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
**Limits** | Pointer to [**[]TemplateLimitConfig**](TemplateLimitConfig.md) | The set of limits that operate for this campaign template. | [optional]
**TemplateParams** | Pointer to [**[]CampaignTemplateParams**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional]
@@ -381,6 +382,31 @@ HasCouponSettings returns a boolean if a field has been set.
SetCouponSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CouponSettings field.
+### GetCouponReservationSettings
+
+`func (o *CampaignTemplate) GetCouponReservationSettings() CampaignTemplateCouponReservationSettings`
+
+GetCouponReservationSettings returns the CouponReservationSettings field if non-nil, zero value otherwise.
+
+### GetCouponReservationSettingsOk
+
+`func (o *CampaignTemplate) GetCouponReservationSettingsOk() (CampaignTemplateCouponReservationSettings, bool)`
+
+GetCouponReservationSettingsOk returns a tuple with the CouponReservationSettings field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCouponReservationSettings
+
+`func (o *CampaignTemplate) HasCouponReservationSettings() bool`
+
+HasCouponReservationSettings returns a boolean if a field has been set.
+
+### SetCouponReservationSettings
+
+`func (o *CampaignTemplate) SetCouponReservationSettings(v CampaignTemplateCouponReservationSettings)`
+
+SetCouponReservationSettings gets a reference to the given CampaignTemplateCouponReservationSettings and assigns it to the CouponReservationSettings field.
+
### GetReferralSettings
`func (o *CampaignTemplate) GetReferralSettings() CodeGeneratorSettings`
diff --git a/docs/CampaignTemplateCouponReservationSettings.md b/docs/CampaignTemplateCouponReservationSettings.md
new file mode 100644
index 00000000..7acdcd93
--- /dev/null
+++ b/docs/CampaignTemplateCouponReservationSettings.md
@@ -0,0 +1,65 @@
+# CampaignTemplateCouponReservationSettings
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ReservationLimit** | Pointer to **int32** | The number of reservations that can be made with this coupon code. | [optional]
+**IsReservationMandatory** | Pointer to **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false]
+
+## Methods
+
+### GetReservationLimit
+
+`func (o *CampaignTemplateCouponReservationSettings) GetReservationLimit() int32`
+
+GetReservationLimit returns the ReservationLimit field if non-nil, zero value otherwise.
+
+### GetReservationLimitOk
+
+`func (o *CampaignTemplateCouponReservationSettings) GetReservationLimitOk() (int32, bool)`
+
+GetReservationLimitOk returns a tuple with the ReservationLimit field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasReservationLimit
+
+`func (o *CampaignTemplateCouponReservationSettings) HasReservationLimit() bool`
+
+HasReservationLimit returns a boolean if a field has been set.
+
+### SetReservationLimit
+
+`func (o *CampaignTemplateCouponReservationSettings) SetReservationLimit(v int32)`
+
+SetReservationLimit gets a reference to the given int32 and assigns it to the ReservationLimit field.
+
+### GetIsReservationMandatory
+
+`func (o *CampaignTemplateCouponReservationSettings) GetIsReservationMandatory() bool`
+
+GetIsReservationMandatory returns the IsReservationMandatory field if non-nil, zero value otherwise.
+
+### GetIsReservationMandatoryOk
+
+`func (o *CampaignTemplateCouponReservationSettings) GetIsReservationMandatoryOk() (bool, bool)`
+
+GetIsReservationMandatoryOk returns a tuple with the IsReservationMandatory field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasIsReservationMandatory
+
+`func (o *CampaignTemplateCouponReservationSettings) HasIsReservationMandatory() bool`
+
+HasIsReservationMandatory returns a boolean if a field has been set.
+
+### SetIsReservationMandatory
+
+`func (o *CampaignTemplateCouponReservationSettings) SetIsReservationMandatory(v bool)`
+
+SetIsReservationMandatory gets a reference to the given bool and assigns it to the IsReservationMandatory field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CampaignVersions.md b/docs/CampaignVersions.md
index 13754752..d5be754e 100644
--- a/docs/CampaignVersions.md
+++ b/docs/CampaignVersions.md
@@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**RevisionFrontendState** | Pointer to **string** | The campaign revision state displayed in the Campaign Manager. | [optional]
**ActiveRevisionId** | Pointer to **int32** | ID of the revision that was last activated on this campaign. | [optional]
**ActiveRevisionVersionId** | Pointer to **int32** | ID of the revision version that is active on the campaign. | [optional]
**Version** | Pointer to **int32** | Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign. | [optional]
@@ -13,6 +14,31 @@ Name | Type | Description | Notes
## Methods
+### GetRevisionFrontendState
+
+`func (o *CampaignVersions) GetRevisionFrontendState() string`
+
+GetRevisionFrontendState returns the RevisionFrontendState field if non-nil, zero value otherwise.
+
+### GetRevisionFrontendStateOk
+
+`func (o *CampaignVersions) GetRevisionFrontendStateOk() (string, bool)`
+
+GetRevisionFrontendStateOk returns a tuple with the RevisionFrontendState field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasRevisionFrontendState
+
+`func (o *CampaignVersions) HasRevisionFrontendState() bool`
+
+HasRevisionFrontendState returns a boolean if a field has been set.
+
+### SetRevisionFrontendState
+
+`func (o *CampaignVersions) SetRevisionFrontendState(v string)`
+
+SetRevisionFrontendState gets a reference to the given string and assigns it to the RevisionFrontendState field.
+
### GetActiveRevisionId
`func (o *CampaignVersions) GetActiveRevisionId() int32`
diff --git a/docs/CouponDeletionFilters.md b/docs/CouponDeletionFilters.md
index e80345d1..5806023d 100644
--- a/docs/CouponDeletionFilters.md
+++ b/docs/CouponDeletionFilters.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**Redeemed** | Pointer to **bool** | - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. **Note:** This field cannot be used in conjunction with the `usable` query parameter. | [optional]
**RecipientIntegrationId** | Pointer to **string** | Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. | [optional]
**ExactMatch** | Pointer to **bool** | Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false]
-**Value** | Pointer to **string** | Filter results by the coupon code | [optional] [default to false]
+**Value** | Pointer to **string** | Filter results by the coupon code | [optional]
**BatchId** | Pointer to **string** | Filter results by batches of coupons | [optional]
**ReferralId** | Pointer to **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional]
**ExpiresAfter** | Pointer to [**time.Time**](time.Time.md) | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional]
diff --git a/docs/CreateAchievement.md b/docs/CreateAchievement.md
index 629059df..5db3d99d 100644
--- a/docs/CreateAchievement.md
+++ b/docs/CreateAchievement.md
@@ -10,6 +10,10 @@ Name | Type | Description | Notes
**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. |
**Period** | Pointer to **string** | The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. |
**PeriodEndOverride** | Pointer to [**TimePoint**](TimePoint.md) | | [optional]
+**RecurrencePolicy** | Pointer to **string** | The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. | [optional]
+**ActivationPolicy** | Pointer to **string** | The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. | [optional]
+**FixedStartDate** | Pointer to [**time.Time**](time.Time.md) | The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string. | [optional]
+**EndDate** | Pointer to [**time.Time**](time.Time.md) | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. | [optional]
## Methods
@@ -163,6 +167,106 @@ HasPeriodEndOverride returns a boolean if a field has been set.
SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field.
+### GetRecurrencePolicy
+
+`func (o *CreateAchievement) GetRecurrencePolicy() string`
+
+GetRecurrencePolicy returns the RecurrencePolicy field if non-nil, zero value otherwise.
+
+### GetRecurrencePolicyOk
+
+`func (o *CreateAchievement) GetRecurrencePolicyOk() (string, bool)`
+
+GetRecurrencePolicyOk returns a tuple with the RecurrencePolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasRecurrencePolicy
+
+`func (o *CreateAchievement) HasRecurrencePolicy() bool`
+
+HasRecurrencePolicy returns a boolean if a field has been set.
+
+### SetRecurrencePolicy
+
+`func (o *CreateAchievement) SetRecurrencePolicy(v string)`
+
+SetRecurrencePolicy gets a reference to the given string and assigns it to the RecurrencePolicy field.
+
+### GetActivationPolicy
+
+`func (o *CreateAchievement) GetActivationPolicy() string`
+
+GetActivationPolicy returns the ActivationPolicy field if non-nil, zero value otherwise.
+
+### GetActivationPolicyOk
+
+`func (o *CreateAchievement) GetActivationPolicyOk() (string, bool)`
+
+GetActivationPolicyOk returns a tuple with the ActivationPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasActivationPolicy
+
+`func (o *CreateAchievement) HasActivationPolicy() bool`
+
+HasActivationPolicy returns a boolean if a field has been set.
+
+### SetActivationPolicy
+
+`func (o *CreateAchievement) SetActivationPolicy(v string)`
+
+SetActivationPolicy gets a reference to the given string and assigns it to the ActivationPolicy field.
+
+### GetFixedStartDate
+
+`func (o *CreateAchievement) GetFixedStartDate() time.Time`
+
+GetFixedStartDate returns the FixedStartDate field if non-nil, zero value otherwise.
+
+### GetFixedStartDateOk
+
+`func (o *CreateAchievement) GetFixedStartDateOk() (time.Time, bool)`
+
+GetFixedStartDateOk returns a tuple with the FixedStartDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFixedStartDate
+
+`func (o *CreateAchievement) HasFixedStartDate() bool`
+
+HasFixedStartDate returns a boolean if a field has been set.
+
+### SetFixedStartDate
+
+`func (o *CreateAchievement) SetFixedStartDate(v time.Time)`
+
+SetFixedStartDate gets a reference to the given time.Time and assigns it to the FixedStartDate field.
+
+### GetEndDate
+
+`func (o *CreateAchievement) GetEndDate() time.Time`
+
+GetEndDate returns the EndDate field if non-nil, zero value otherwise.
+
+### GetEndDateOk
+
+`func (o *CreateAchievement) GetEndDateOk() (time.Time, bool)`
+
+GetEndDateOk returns a tuple with the EndDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEndDate
+
+`func (o *CreateAchievement) HasEndDate() bool`
+
+HasEndDate returns a boolean if a field has been set.
+
+### SetEndDate
+
+`func (o *CreateAchievement) SetEndDate(v time.Time)`
+
+SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CustomerProfile.md b/docs/CustomerProfile.md
index 3959fbc1..3f881811 100644
--- a/docs/CustomerProfile.md
+++ b/docs/CustomerProfile.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Internal ID of this entity. |
-**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. The time this entity was created. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**IntegrationId** | Pointer to **string** | The integration ID set by your integration layer. |
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary properties associated with this item. |
**AccountId** | Pointer to **int32** | The ID of the Talon.One account that owns this profile. |
diff --git a/docs/CustomerProfileAudienceRequestItem.md b/docs/CustomerProfileAudienceRequestItem.md
index 32b0b3bb..4f2f41e1 100644
--- a/docs/CustomerProfileAudienceRequestItem.md
+++ b/docs/CustomerProfileAudienceRequestItem.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Action** | Pointer to **string** | Defines the action to perform: - `add`: Adds the customer profile to the audience. If the customer profile does not exist, it will be created. - `delete`: Removes the customer profile from the audience. |
+**Action** | Pointer to **string** | Defines the action to perform: - `add`: Adds the customer profile to the audience. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `delete`: Removes the customer profile from the audience. |
**ProfileIntegrationId** | Pointer to **string** | The ID of this customer profile in the third-party integration. |
**AudienceId** | Pointer to **int32** | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). |
diff --git a/docs/CustomerSessionV2.md b/docs/CustomerSessionV2.md
index b875fb57..3e27e50e 100644
--- a/docs/CustomerSessionV2.md
+++ b/docs/CustomerSessionV2.md
@@ -5,25 +5,26 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Internal ID of this entity. |
-**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. The time this entity was created. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**IntegrationId** | Pointer to **string** | The integration ID set by your integration layer. |
**ApplicationId** | Pointer to **int32** | The ID of the application that owns this entity. |
**ProfileId** | Pointer to **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. |
**StoreIntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. | [optional]
**EvaluableCampaignIds** | Pointer to **[]int32** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional]
-**CouponCodes** | Pointer to **[]string** | Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely. | [optional]
-**ReferralCode** | Pointer to **string** | Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely. | [optional]
+**CouponCodes** | Pointer to **[]string** | Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, omit the parameter entirely. | [optional]
+**ReferralCode** | Pointer to **string** | Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, omit the parameter entirely. | [optional]
**LoyaltyCards** | Pointer to **[]string** | Identifier of a loyalty card. | [optional]
**State** | Pointer to **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [default to STATE_OPEN]
**CartItems** | Pointer to [**[]CartItem**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. |
**AdditionalCosts** | Pointer to [**map[string]AdditionalCost**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional]
-**Identifiers** | Pointer to **[]string** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). | [optional]
+**Identifiers** | Pointer to **[]string** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). - We recommend passing an anonymized (hashed) version of the identifier value. | [optional]
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property. |
-**FirstSession** | Pointer to **bool** | Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions. |
+**FirstSession** | Pointer to **bool** | Indicates whether this is the first session for the customer's profile. It's always `true` for anonymous sessions. |
**Total** | Pointer to **float32** | The total value of cart items and additional costs in the session, before any discounts are applied. |
**CartItemTotal** | Pointer to **float32** | The total value of cart items, before any discounts are applied. |
**AdditionalCostTotal** | Pointer to **float32** | The total value of additional costs, before any discounts are applied. |
**Updated** | Pointer to [**time.Time**](time.Time.md) | Timestamp of the most recent event received on this session. |
+**ClosurePrediction** | Pointer to **float32** | The likelihood of the customer session closing based on predictive modeling, expressed as a decimal between `0` and `1`. | [optional]
## Methods
@@ -527,6 +528,31 @@ HasUpdated returns a boolean if a field has been set.
SetUpdated gets a reference to the given time.Time and assigns it to the Updated field.
+### GetClosurePrediction
+
+`func (o *CustomerSessionV2) GetClosurePrediction() float32`
+
+GetClosurePrediction returns the ClosurePrediction field if non-nil, zero value otherwise.
+
+### GetClosurePredictionOk
+
+`func (o *CustomerSessionV2) GetClosurePredictionOk() (float32, bool)`
+
+GetClosurePredictionOk returns a tuple with the ClosurePrediction field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClosurePrediction
+
+`func (o *CustomerSessionV2) HasClosurePrediction() bool`
+
+HasClosurePrediction returns a boolean if a field has been set.
+
+### SetClosurePrediction
+
+`func (o *CustomerSessionV2) SetClosurePrediction(v float32)`
+
+SetClosurePrediction gets a reference to the given float32 and assigns it to the ClosurePrediction field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/DeleteUserRequest.md b/docs/DeleteUserRequest.md
index 06ae0cca..c7ffb0b8 100644
--- a/docs/DeleteUserRequest.md
+++ b/docs/DeleteUserRequest.md
@@ -4,35 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Email** | Pointer to **string** | The email address associated with the user profile. |
## Methods
-### GetEmail
-
-`func (o *DeleteUserRequest) GetEmail() string`
-
-GetEmail returns the Email field if non-nil, zero value otherwise.
-
-### GetEmailOk
-
-`func (o *DeleteUserRequest) GetEmailOk() (string, bool)`
-
-GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasEmail
-
-`func (o *DeleteUserRequest) HasEmail() bool`
-
-HasEmail returns a boolean if a field has been set.
-
-### SetEmail
-
-`func (o *DeleteUserRequest) SetEmail(v string)`
-
-SetEmail gets a reference to the given string and assigns it to the Email field.
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Event.md b/docs/Event.md
index b00c3061..7c330a6e 100644
--- a/docs/Event.md
+++ b/docs/Event.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**Type** | Pointer to **string** | A string representing the event. Must not be a reserved event name. |
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary additional JSON data associated with the event. |
**SessionId** | Pointer to **string** | The ID of the session that this event occurred in. | [optional]
-**Effects** | Pointer to [**[][]interface{}**]([]interface{}.md) | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). |
+**Effects** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). |
**LedgerEntries** | Pointer to [**[]LedgerEntry**](LedgerEntry.md) | Ledger entries for the event. | [optional]
**Meta** | Pointer to [**Meta**](Meta.md) | | [optional]
@@ -220,13 +220,13 @@ SetSessionId gets a reference to the given string and assigns it to the SessionI
### GetEffects
-`func (o *Event) GetEffects() [][]interface{}`
+`func (o *Event) GetEffects() []map[string]interface{}`
GetEffects returns the Effects field if non-nil, zero value otherwise.
### GetEffectsOk
-`func (o *Event) GetEffectsOk() ([][]interface{}, bool)`
+`func (o *Event) GetEffectsOk() ([]map[string]interface{}, bool)`
GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -239,9 +239,9 @@ HasEffects returns a boolean if a field has been set.
### SetEffects
-`func (o *Event) SetEffects(v [][]interface{})`
+`func (o *Event) SetEffects(v []map[string]interface{})`
-SetEffects gets a reference to the given [][]interface{} and assigns it to the Effects field.
+SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
### GetLedgerEntries
diff --git a/docs/GenerateCampaignDescription.md b/docs/GenerateCampaignDescription.md
index f0d4b15a..aa9e0ad3 100644
--- a/docs/GenerateCampaignDescription.md
+++ b/docs/GenerateCampaignDescription.md
@@ -4,35 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**CampaignID** | Pointer to **int32** | ID of the campaign. |
+**RulesetID** | Pointer to **int32** | ID of a ruleset. |
**Currency** | Pointer to **string** | Currency for the campaign. |
## Methods
-### GetCampaignID
+### GetRulesetID
-`func (o *GenerateCampaignDescription) GetCampaignID() int32`
+`func (o *GenerateCampaignDescription) GetRulesetID() int32`
-GetCampaignID returns the CampaignID field if non-nil, zero value otherwise.
+GetRulesetID returns the RulesetID field if non-nil, zero value otherwise.
-### GetCampaignIDOk
+### GetRulesetIDOk
-`func (o *GenerateCampaignDescription) GetCampaignIDOk() (int32, bool)`
+`func (o *GenerateCampaignDescription) GetRulesetIDOk() (int32, bool)`
-GetCampaignIDOk returns a tuple with the CampaignID field if it's non-nil, zero value otherwise
+GetRulesetIDOk returns a tuple with the RulesetID field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
-### HasCampaignID
+### HasRulesetID
-`func (o *GenerateCampaignDescription) HasCampaignID() bool`
+`func (o *GenerateCampaignDescription) HasRulesetID() bool`
-HasCampaignID returns a boolean if a field has been set.
+HasRulesetID returns a boolean if a field has been set.
-### SetCampaignID
+### SetRulesetID
-`func (o *GenerateCampaignDescription) SetCampaignID(v int32)`
+`func (o *GenerateCampaignDescription) SetRulesetID(v int32)`
-SetCampaignID gets a reference to the given int32 and assigns it to the CampaignID field.
+SetRulesetID gets a reference to the given int32 and assigns it to the RulesetID field.
### GetCurrency
diff --git a/docs/GenerateCampaignTags.md b/docs/GenerateCampaignTags.md
index 8ff662b1..b30650d5 100644
--- a/docs/GenerateCampaignTags.md
+++ b/docs/GenerateCampaignTags.md
@@ -4,34 +4,34 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**CampaignID** | Pointer to **int32** | ID of the campaign. |
+**RulesetID** | Pointer to **int32** | ID of a ruleset. |
## Methods
-### GetCampaignID
+### GetRulesetID
-`func (o *GenerateCampaignTags) GetCampaignID() int32`
+`func (o *GenerateCampaignTags) GetRulesetID() int32`
-GetCampaignID returns the CampaignID field if non-nil, zero value otherwise.
+GetRulesetID returns the RulesetID field if non-nil, zero value otherwise.
-### GetCampaignIDOk
+### GetRulesetIDOk
-`func (o *GenerateCampaignTags) GetCampaignIDOk() (int32, bool)`
+`func (o *GenerateCampaignTags) GetRulesetIDOk() (int32, bool)`
-GetCampaignIDOk returns a tuple with the CampaignID field if it's non-nil, zero value otherwise
+GetRulesetIDOk returns a tuple with the RulesetID field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
-### HasCampaignID
+### HasRulesetID
-`func (o *GenerateCampaignTags) HasCampaignID() bool`
+`func (o *GenerateCampaignTags) HasRulesetID() bool`
-HasCampaignID returns a boolean if a field has been set.
+HasRulesetID returns a boolean if a field has been set.
-### SetCampaignID
+### SetRulesetID
-`func (o *GenerateCampaignTags) SetCampaignID(v int32)`
+`func (o *GenerateCampaignTags) SetRulesetID(v int32)`
-SetCampaignID gets a reference to the given int32 and assigns it to the CampaignID field.
+SetRulesetID gets a reference to the given int32 and assigns it to the RulesetID field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/GenerateItemFilterDescription.md b/docs/GenerateItemFilterDescription.md
index a26ab864..9ffcb1dc 100644
--- a/docs/GenerateItemFilterDescription.md
+++ b/docs/GenerateItemFilterDescription.md
@@ -4,19 +4,19 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ItemFilter** | Pointer to [**[][]interface{}**]([][]interface{}.md) | An array of item filter Talang expressions. |
+**ItemFilter** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of item filter Talang expressions. |
## Methods
### GetItemFilter
-`func (o *GenerateItemFilterDescription) GetItemFilter() [][]interface{}`
+`func (o *GenerateItemFilterDescription) GetItemFilter() []map[string]interface{}`
GetItemFilter returns the ItemFilter field if non-nil, zero value otherwise.
### GetItemFilterOk
-`func (o *GenerateItemFilterDescription) GetItemFilterOk() ([][]interface{}, bool)`
+`func (o *GenerateItemFilterDescription) GetItemFilterOk() ([]map[string]interface{}, bool)`
GetItemFilterOk returns a tuple with the ItemFilter field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -29,9 +29,9 @@ HasItemFilter returns a boolean if a field has been set.
### SetItemFilter
-`func (o *GenerateItemFilterDescription) SetItemFilter(v [][]interface{})`
+`func (o *GenerateItemFilterDescription) SetItemFilter(v []map[string]interface{})`
-SetItemFilter gets a reference to the given [][]interface{} and assigns it to the ItemFilter field.
+SetItemFilter gets a reference to the given []map[string]interface{} and assigns it to the ItemFilter field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/GenerateLoyaltyCard.md b/docs/GenerateLoyaltyCard.md
index 9eaf29da..f48929f2 100644
--- a/docs/GenerateLoyaltyCard.md
+++ b/docs/GenerateLoyaltyCard.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | Pointer to **string** | Status of the loyalty card. | [optional] [default to STATUS_ACTIVE]
**CustomerProfileIds** | Pointer to **[]string** | Integration IDs of the customer profiles linked to the card. | [optional]
+**CardIdentifier** | Pointer to **string** | The alphanumeric identifier of the loyalty card. | [optional]
## Methods
@@ -59,6 +60,31 @@ HasCustomerProfileIds returns a boolean if a field has been set.
SetCustomerProfileIds gets a reference to the given []string and assigns it to the CustomerProfileIds field.
+### GetCardIdentifier
+
+`func (o *GenerateLoyaltyCard) GetCardIdentifier() string`
+
+GetCardIdentifier returns the CardIdentifier field if non-nil, zero value otherwise.
+
+### GetCardIdentifierOk
+
+`func (o *GenerateLoyaltyCard) GetCardIdentifierOk() (string, bool)`
+
+GetCardIdentifierOk returns a tuple with the CardIdentifier field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCardIdentifier
+
+`func (o *GenerateLoyaltyCard) HasCardIdentifier() bool`
+
+HasCardIdentifier returns a boolean if a field has been set.
+
+### SetCardIdentifier
+
+`func (o *GenerateLoyaltyCard) SetCardIdentifier(v string)`
+
+SetCardIdentifier gets a reference to the given string and assigns it to the CardIdentifier field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/GenerateRuleTitleRule.md b/docs/GenerateRuleTitleRule.md
index 07eca417..b4cddc79 100644
--- a/docs/GenerateRuleTitleRule.md
+++ b/docs/GenerateRuleTitleRule.md
@@ -4,20 +4,20 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Effects** | Pointer to [**[][]interface{}**]([][]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. | [optional]
-**Condition** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. | [optional]
+**Effects** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. | [optional]
+**Condition** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. | [optional]
## Methods
### GetEffects
-`func (o *GenerateRuleTitleRule) GetEffects() [][]interface{}`
+`func (o *GenerateRuleTitleRule) GetEffects() []map[string]interface{}`
GetEffects returns the Effects field if non-nil, zero value otherwise.
### GetEffectsOk
-`func (o *GenerateRuleTitleRule) GetEffectsOk() ([][]interface{}, bool)`
+`func (o *GenerateRuleTitleRule) GetEffectsOk() ([]map[string]interface{}, bool)`
GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -30,19 +30,19 @@ HasEffects returns a boolean if a field has been set.
### SetEffects
-`func (o *GenerateRuleTitleRule) SetEffects(v [][]interface{})`
+`func (o *GenerateRuleTitleRule) SetEffects(v []map[string]interface{})`
-SetEffects gets a reference to the given [][]interface{} and assigns it to the Effects field.
+SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
### GetCondition
-`func (o *GenerateRuleTitleRule) GetCondition() []interface{}`
+`func (o *GenerateRuleTitleRule) GetCondition() []map[string]interface{}`
GetCondition returns the Condition field if non-nil, zero value otherwise.
### GetConditionOk
-`func (o *GenerateRuleTitleRule) GetConditionOk() ([]interface{}, bool)`
+`func (o *GenerateRuleTitleRule) GetConditionOk() ([]map[string]interface{}, bool)`
GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasCondition returns a boolean if a field has been set.
### SetCondition
-`func (o *GenerateRuleTitleRule) SetCondition(v []interface{})`
+`func (o *GenerateRuleTitleRule) SetCondition(v []map[string]interface{})`
-SetCondition gets a reference to the given []interface{} and assigns it to the Condition field.
+SetCondition gets a reference to the given []map[string]interface{} and assigns it to the Condition field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20020.md b/docs/InlineResponse20020.md
index 5a57177f..563acfd1 100644
--- a/docs/InlineResponse20020.md
+++ b/docs/InlineResponse20020.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]AccessLogEntry**](AccessLogEntry.md) | |
+**Data** | Pointer to [**[]CampaignAnalytics**](CampaignAnalytics.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20020) GetData() []AccessLogEntry`
+`func (o *InlineResponse20020) GetData() []CampaignAnalytics`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20020) GetDataOk() ([]AccessLogEntry, bool)`
+`func (o *InlineResponse20020) GetDataOk() ([]CampaignAnalytics, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20020) SetData(v []AccessLogEntry)`
+`func (o *InlineResponse20020) SetData(v []CampaignAnalytics)`
-SetData gets a reference to the given []AccessLogEntry and assigns it to the Data field.
+SetData gets a reference to the given []CampaignAnalytics and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20021.md b/docs/InlineResponse20021.md
index b0ef4070..b1fdc933 100644
--- a/docs/InlineResponse20021.md
+++ b/docs/InlineResponse20021.md
@@ -4,8 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]CampaignAnalytics**](CampaignAnalytics.md) | |
+**TotalResultSize** | Pointer to **int32** | | [optional]
+**HasMore** | Pointer to **bool** | | [optional]
+**Data** | Pointer to [**[]ApplicationCustomer**](ApplicationCustomer.md) | |
## Methods
@@ -34,15 +35,40 @@ HasTotalResultSize returns a boolean if a field has been set.
SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+### GetHasMore
+
+`func (o *InlineResponse20021) GetHasMore() bool`
+
+GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+
+### GetHasMoreOk
+
+`func (o *InlineResponse20021) GetHasMoreOk() (bool, bool)`
+
+GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasHasMore
+
+`func (o *InlineResponse20021) HasHasMore() bool`
+
+HasHasMore returns a boolean if a field has been set.
+
+### SetHasMore
+
+`func (o *InlineResponse20021) SetHasMore(v bool)`
+
+SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+
### GetData
-`func (o *InlineResponse20021) GetData() []CampaignAnalytics`
+`func (o *InlineResponse20021) GetData() []ApplicationCustomer`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20021) GetDataOk() ([]CampaignAnalytics, bool)`
+`func (o *InlineResponse20021) GetDataOk() ([]ApplicationCustomer, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20021) SetData(v []CampaignAnalytics)`
+`func (o *InlineResponse20021) SetData(v []ApplicationCustomer)`
-SetData gets a reference to the given []CampaignAnalytics and assigns it to the Data field.
+SetData gets a reference to the given []ApplicationCustomer and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20022.md b/docs/InlineResponse20022.md
index 8ba2a534..b002f4dc 100644
--- a/docs/InlineResponse20022.md
+++ b/docs/InlineResponse20022.md
@@ -4,61 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | | [optional]
**HasMore** | Pointer to **bool** | | [optional]
+**TotalResultSize** | Pointer to **int32** | | [optional]
**Data** | Pointer to [**[]ApplicationCustomer**](ApplicationCustomer.md) | |
## Methods
-### GetTotalResultSize
+### GetHasMore
-`func (o *InlineResponse20022) GetTotalResultSize() int32`
+`func (o *InlineResponse20022) GetHasMore() bool`
-GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
+GetHasMore returns the HasMore field if non-nil, zero value otherwise.
-### GetTotalResultSizeOk
+### GetHasMoreOk
-`func (o *InlineResponse20022) GetTotalResultSizeOk() (int32, bool)`
+`func (o *InlineResponse20022) GetHasMoreOk() (bool, bool)`
-GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
+GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
-### HasTotalResultSize
+### HasHasMore
-`func (o *InlineResponse20022) HasTotalResultSize() bool`
+`func (o *InlineResponse20022) HasHasMore() bool`
-HasTotalResultSize returns a boolean if a field has been set.
+HasHasMore returns a boolean if a field has been set.
-### SetTotalResultSize
+### SetHasMore
-`func (o *InlineResponse20022) SetTotalResultSize(v int32)`
+`func (o *InlineResponse20022) SetHasMore(v bool)`
-SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-### GetHasMore
+### GetTotalResultSize
-`func (o *InlineResponse20022) GetHasMore() bool`
+`func (o *InlineResponse20022) GetTotalResultSize() int32`
-GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
-### GetHasMoreOk
+### GetTotalResultSizeOk
-`func (o *InlineResponse20022) GetHasMoreOk() (bool, bool)`
+`func (o *InlineResponse20022) GetTotalResultSizeOk() (int32, bool)`
-GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
-### HasHasMore
+### HasTotalResultSize
-`func (o *InlineResponse20022) HasHasMore() bool`
+`func (o *InlineResponse20022) HasTotalResultSize() bool`
-HasHasMore returns a boolean if a field has been set.
+HasTotalResultSize returns a boolean if a field has been set.
-### SetHasMore
+### SetTotalResultSize
-`func (o *InlineResponse20022) SetHasMore(v bool)`
+`func (o *InlineResponse20022) SetTotalResultSize(v int32)`
-SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
### GetData
diff --git a/docs/InlineResponse20023.md b/docs/InlineResponse20023.md
index 40db183c..6a1b468b 100644
--- a/docs/InlineResponse20023.md
+++ b/docs/InlineResponse20023.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**HasMore** | Pointer to **bool** | | [optional]
**TotalResultSize** | Pointer to **int32** | | [optional]
-**Data** | Pointer to [**[]ApplicationCustomer**](ApplicationCustomer.md) | |
+**Data** | Pointer to [**[]CustomerProfile**](CustomerProfile.md) | |
## Methods
@@ -62,13 +62,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20023) GetData() []ApplicationCustomer`
+`func (o *InlineResponse20023) GetData() []CustomerProfile`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20023) GetDataOk() ([]ApplicationCustomer, bool)`
+`func (o *InlineResponse20023) GetDataOk() ([]CustomerProfile, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20023) SetData(v []ApplicationCustomer)`
+`func (o *InlineResponse20023) SetData(v []CustomerProfile)`
-SetData gets a reference to the given []ApplicationCustomer and assigns it to the Data field.
+SetData gets a reference to the given []CustomerProfile and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20024.md b/docs/InlineResponse20024.md
index 5cce34f4..8a0de15d 100644
--- a/docs/InlineResponse20024.md
+++ b/docs/InlineResponse20024.md
@@ -4,8 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | | [optional]
-**TotalResultSize** | Pointer to **int32** | | [optional]
+**HasMore** | Pointer to **bool** | |
**Data** | Pointer to [**[]CustomerProfile**](CustomerProfile.md) | |
## Methods
@@ -35,31 +34,6 @@ HasHasMore returns a boolean if a field has been set.
SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-### GetTotalResultSize
-
-`func (o *InlineResponse20024) GetTotalResultSize() int32`
-
-GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
-
-### GetTotalResultSizeOk
-
-`func (o *InlineResponse20024) GetTotalResultSizeOk() (int32, bool)`
-
-GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasTotalResultSize
-
-`func (o *InlineResponse20024) HasTotalResultSize() bool`
-
-HasTotalResultSize returns a boolean if a field has been set.
-
-### SetTotalResultSize
-
-`func (o *InlineResponse20024) SetTotalResultSize(v int32)`
-
-SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-
### GetData
`func (o *InlineResponse20024) GetData() []CustomerProfile`
diff --git a/docs/InlineResponse20025.md b/docs/InlineResponse20025.md
index 201a9e55..f679baf2 100644
--- a/docs/InlineResponse20025.md
+++ b/docs/InlineResponse20025.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**HasMore** | Pointer to **bool** | |
-**Data** | Pointer to [**[]CustomerProfile**](CustomerProfile.md) | |
+**Data** | Pointer to [**[]CustomerActivityReport**](CustomerActivityReport.md) | |
## Methods
@@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel
### GetData
-`func (o *InlineResponse20025) GetData() []CustomerProfile`
+`func (o *InlineResponse20025) GetData() []CustomerActivityReport`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20025) GetDataOk() ([]CustomerProfile, bool)`
+`func (o *InlineResponse20025) GetDataOk() ([]CustomerActivityReport, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20025) SetData(v []CustomerProfile)`
+`func (o *InlineResponse20025) SetData(v []CustomerActivityReport)`
-SetData gets a reference to the given []CustomerProfile and assigns it to the Data field.
+SetData gets a reference to the given []CustomerActivityReport and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20026.md b/docs/InlineResponse20026.md
index 92e7b81a..c22af298 100644
--- a/docs/InlineResponse20026.md
+++ b/docs/InlineResponse20026.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | |
-**Data** | Pointer to [**[]CustomerActivityReport**](CustomerActivityReport.md) | |
+**HasMore** | Pointer to **bool** | | [optional]
+**Data** | Pointer to [**[]ApplicationSession**](ApplicationSession.md) | |
## Methods
@@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel
### GetData
-`func (o *InlineResponse20026) GetData() []CustomerActivityReport`
+`func (o *InlineResponse20026) GetData() []ApplicationSession`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20026) GetDataOk() ([]CustomerActivityReport, bool)`
+`func (o *InlineResponse20026) GetDataOk() ([]ApplicationSession, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20026) SetData(v []CustomerActivityReport)`
+`func (o *InlineResponse20026) SetData(v []ApplicationSession)`
-SetData gets a reference to the given []CustomerActivityReport and assigns it to the Data field.
+SetData gets a reference to the given []ApplicationSession and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20027.md b/docs/InlineResponse20027.md
index a175091a..08e249e9 100644
--- a/docs/InlineResponse20027.md
+++ b/docs/InlineResponse20027.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | | [optional]
-**Data** | Pointer to [**[]ApplicationSession**](ApplicationSession.md) | |
+**HasMore** | Pointer to **bool** | |
+**Data** | Pointer to [**[]ApplicationEvent**](ApplicationEvent.md) | |
## Methods
@@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel
### GetData
-`func (o *InlineResponse20027) GetData() []ApplicationSession`
+`func (o *InlineResponse20027) GetData() []ApplicationEvent`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20027) GetDataOk() ([]ApplicationSession, bool)`
+`func (o *InlineResponse20027) GetDataOk() ([]ApplicationEvent, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20027) SetData(v []ApplicationSession)`
+`func (o *InlineResponse20027) SetData(v []ApplicationEvent)`
-SetData gets a reference to the given []ApplicationSession and assigns it to the Data field.
+SetData gets a reference to the given []ApplicationEvent and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20028.md b/docs/InlineResponse20028.md
index 9b48c165..bda1ba93 100644
--- a/docs/InlineResponse20028.md
+++ b/docs/InlineResponse20028.md
@@ -4,45 +4,45 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | |
-**Data** | Pointer to [**[]ApplicationEvent**](ApplicationEvent.md) | |
+**TotalResultSize** | Pointer to **int32** | |
+**Data** | Pointer to **[]string** | |
## Methods
-### GetHasMore
+### GetTotalResultSize
-`func (o *InlineResponse20028) GetHasMore() bool`
+`func (o *InlineResponse20028) GetTotalResultSize() int32`
-GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
-### GetHasMoreOk
+### GetTotalResultSizeOk
-`func (o *InlineResponse20028) GetHasMoreOk() (bool, bool)`
+`func (o *InlineResponse20028) GetTotalResultSizeOk() (int32, bool)`
-GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
-### HasHasMore
+### HasTotalResultSize
-`func (o *InlineResponse20028) HasHasMore() bool`
+`func (o *InlineResponse20028) HasTotalResultSize() bool`
-HasHasMore returns a boolean if a field has been set.
+HasTotalResultSize returns a boolean if a field has been set.
-### SetHasMore
+### SetTotalResultSize
-`func (o *InlineResponse20028) SetHasMore(v bool)`
+`func (o *InlineResponse20028) SetTotalResultSize(v int32)`
-SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
### GetData
-`func (o *InlineResponse20028) GetData() []ApplicationEvent`
+`func (o *InlineResponse20028) GetData() []string`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20028) GetDataOk() ([]ApplicationEvent, bool)`
+`func (o *InlineResponse20028) GetDataOk() ([]string, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20028) SetData(v []ApplicationEvent)`
+`func (o *InlineResponse20028) SetData(v []string)`
-SetData gets a reference to the given []ApplicationEvent and assigns it to the Data field.
+SetData gets a reference to the given []string and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20029.md b/docs/InlineResponse20029.md
index 8d831918..0a4247aa 100644
--- a/docs/InlineResponse20029.md
+++ b/docs/InlineResponse20029.md
@@ -4,11 +4,37 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to **[]string** | |
+**HasMore** | Pointer to **bool** | | [optional]
+**TotalResultSize** | Pointer to **int32** | | [optional]
+**Data** | Pointer to [**[]Audience**](Audience.md) | |
## Methods
+### GetHasMore
+
+`func (o *InlineResponse20029) GetHasMore() bool`
+
+GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+
+### GetHasMoreOk
+
+`func (o *InlineResponse20029) GetHasMoreOk() (bool, bool)`
+
+GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasHasMore
+
+`func (o *InlineResponse20029) HasHasMore() bool`
+
+HasHasMore returns a boolean if a field has been set.
+
+### SetHasMore
+
+`func (o *InlineResponse20029) SetHasMore(v bool)`
+
+SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+
### GetTotalResultSize
`func (o *InlineResponse20029) GetTotalResultSize() int32`
@@ -36,13 +62,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20029) GetData() []string`
+`func (o *InlineResponse20029) GetData() []Audience`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20029) GetDataOk() ([]string, bool)`
+`func (o *InlineResponse20029) GetDataOk() ([]Audience, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20029) SetData(v []string)`
+`func (o *InlineResponse20029) SetData(v []Audience)`
-SetData gets a reference to the given []string and assigns it to the Data field.
+SetData gets a reference to the given []Audience and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20030.md b/docs/InlineResponse20030.md
index ddf27872..62a8cac4 100644
--- a/docs/InlineResponse20030.md
+++ b/docs/InlineResponse20030.md
@@ -5,8 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**HasMore** | Pointer to **bool** | | [optional]
-**TotalResultSize** | Pointer to **int32** | | [optional]
-**Data** | Pointer to [**[]Audience**](Audience.md) | |
+**Data** | Pointer to [**[]AudienceAnalytics**](AudienceAnalytics.md) | |
## Methods
@@ -35,40 +34,15 @@ HasHasMore returns a boolean if a field has been set.
SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-### GetTotalResultSize
-
-`func (o *InlineResponse20030) GetTotalResultSize() int32`
-
-GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
-
-### GetTotalResultSizeOk
-
-`func (o *InlineResponse20030) GetTotalResultSizeOk() (int32, bool)`
-
-GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasTotalResultSize
-
-`func (o *InlineResponse20030) HasTotalResultSize() bool`
-
-HasTotalResultSize returns a boolean if a field has been set.
-
-### SetTotalResultSize
-
-`func (o *InlineResponse20030) SetTotalResultSize(v int32)`
-
-SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-
### GetData
-`func (o *InlineResponse20030) GetData() []Audience`
+`func (o *InlineResponse20030) GetData() []AudienceAnalytics`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20030) GetDataOk() ([]Audience, bool)`
+`func (o *InlineResponse20030) GetDataOk() ([]AudienceAnalytics, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20030) SetData(v []Audience)`
+`func (o *InlineResponse20030) SetData(v []AudienceAnalytics)`
-SetData gets a reference to the given []Audience and assigns it to the Data field.
+SetData gets a reference to the given []AudienceAnalytics and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20031.md b/docs/InlineResponse20031.md
index f9cb029a..9e565b30 100644
--- a/docs/InlineResponse20031.md
+++ b/docs/InlineResponse20031.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**HasMore** | Pointer to **bool** | | [optional]
-**Data** | Pointer to [**[]AudienceAnalytics**](AudienceAnalytics.md) | |
+**Data** | Pointer to [**[]CustomerProfile**](CustomerProfile.md) | |
## Methods
@@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel
### GetData
-`func (o *InlineResponse20031) GetData() []AudienceAnalytics`
+`func (o *InlineResponse20031) GetData() []CustomerProfile`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20031) GetDataOk() ([]AudienceAnalytics, bool)`
+`func (o *InlineResponse20031) GetDataOk() ([]CustomerProfile, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20031) SetData(v []AudienceAnalytics)`
+`func (o *InlineResponse20031) SetData(v []CustomerProfile)`
-SetData gets a reference to the given []AudienceAnalytics and assigns it to the Data field.
+SetData gets a reference to the given []CustomerProfile and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20032.md b/docs/InlineResponse20032.md
index c015a2ee..7120a86e 100644
--- a/docs/InlineResponse20032.md
+++ b/docs/InlineResponse20032.md
@@ -5,7 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**HasMore** | Pointer to **bool** | | [optional]
-**Data** | Pointer to [**[]CustomerProfile**](CustomerProfile.md) | |
+**TotalResultSize** | Pointer to **int32** | | [optional]
+**Data** | Pointer to [**[]ApplicationReferee**](ApplicationReferee.md) | |
## Methods
@@ -34,15 +35,40 @@ HasHasMore returns a boolean if a field has been set.
SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+### GetTotalResultSize
+
+`func (o *InlineResponse20032) GetTotalResultSize() int32`
+
+GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
+
+### GetTotalResultSizeOk
+
+`func (o *InlineResponse20032) GetTotalResultSizeOk() (int32, bool)`
+
+GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasTotalResultSize
+
+`func (o *InlineResponse20032) HasTotalResultSize() bool`
+
+HasTotalResultSize returns a boolean if a field has been set.
+
+### SetTotalResultSize
+
+`func (o *InlineResponse20032) SetTotalResultSize(v int32)`
+
+SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+
### GetData
-`func (o *InlineResponse20032) GetData() []CustomerProfile`
+`func (o *InlineResponse20032) GetData() []ApplicationReferee`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20032) GetDataOk() ([]CustomerProfile, bool)`
+`func (o *InlineResponse20032) GetDataOk() ([]ApplicationReferee, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20032) SetData(v []CustomerProfile)`
+`func (o *InlineResponse20032) SetData(v []ApplicationReferee)`
-SetData gets a reference to the given []CustomerProfile and assigns it to the Data field.
+SetData gets a reference to the given []ApplicationReferee and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20033.md b/docs/InlineResponse20033.md
index 139adab6..4aea41bb 100644
--- a/docs/InlineResponse20033.md
+++ b/docs/InlineResponse20033.md
@@ -4,37 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | | [optional]
-**TotalResultSize** | Pointer to **int32** | | [optional]
-**Data** | Pointer to [**[]ApplicationReferee**](ApplicationReferee.md) | |
+**TotalResultSize** | Pointer to **int32** | |
+**Data** | Pointer to [**[]Attribute**](Attribute.md) | |
## Methods
-### GetHasMore
-
-`func (o *InlineResponse20033) GetHasMore() bool`
-
-GetHasMore returns the HasMore field if non-nil, zero value otherwise.
-
-### GetHasMoreOk
-
-`func (o *InlineResponse20033) GetHasMoreOk() (bool, bool)`
-
-GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasHasMore
-
-`func (o *InlineResponse20033) HasHasMore() bool`
-
-HasHasMore returns a boolean if a field has been set.
-
-### SetHasMore
-
-`func (o *InlineResponse20033) SetHasMore(v bool)`
-
-SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-
### GetTotalResultSize
`func (o *InlineResponse20033) GetTotalResultSize() int32`
@@ -62,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20033) GetData() []ApplicationReferee`
+`func (o *InlineResponse20033) GetData() []Attribute`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20033) GetDataOk() ([]ApplicationReferee, bool)`
+`func (o *InlineResponse20033) GetDataOk() ([]Attribute, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20033) SetData(v []ApplicationReferee)`
+`func (o *InlineResponse20033) SetData(v []Attribute)`
-SetData gets a reference to the given []ApplicationReferee and assigns it to the Data field.
+SetData gets a reference to the given []Attribute and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20034.md b/docs/InlineResponse20034.md
index 827aba87..21b29cb5 100644
--- a/docs/InlineResponse20034.md
+++ b/docs/InlineResponse20034.md
@@ -4,11 +4,37 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]Attribute**](Attribute.md) | |
+**HasMore** | Pointer to **bool** | | [optional]
+**TotalResultSize** | Pointer to **int32** | | [optional]
+**Data** | Pointer to [**[]CatalogItem**](CatalogItem.md) | |
## Methods
+### GetHasMore
+
+`func (o *InlineResponse20034) GetHasMore() bool`
+
+GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+
+### GetHasMoreOk
+
+`func (o *InlineResponse20034) GetHasMoreOk() (bool, bool)`
+
+GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasHasMore
+
+`func (o *InlineResponse20034) HasHasMore() bool`
+
+HasHasMore returns a boolean if a field has been set.
+
+### SetHasMore
+
+`func (o *InlineResponse20034) SetHasMore(v bool)`
+
+SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+
### GetTotalResultSize
`func (o *InlineResponse20034) GetTotalResultSize() int32`
@@ -36,13 +62,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20034) GetData() []Attribute`
+`func (o *InlineResponse20034) GetData() []CatalogItem`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20034) GetDataOk() ([]Attribute, bool)`
+`func (o *InlineResponse20034) GetDataOk() ([]CatalogItem, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20034) SetData(v []Attribute)`
+`func (o *InlineResponse20034) SetData(v []CatalogItem)`
-SetData gets a reference to the given []Attribute and assigns it to the Data field.
+SetData gets a reference to the given []CatalogItem and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20035.md b/docs/InlineResponse20035.md
index 8db61bdc..0a63aa21 100644
--- a/docs/InlineResponse20035.md
+++ b/docs/InlineResponse20035.md
@@ -4,37 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | | [optional]
-**TotalResultSize** | Pointer to **int32** | | [optional]
-**Data** | Pointer to [**[]CatalogItem**](CatalogItem.md) | |
+**TotalResultSize** | Pointer to **int32** | |
+**Data** | Pointer to [**[]AccountAdditionalCost**](AccountAdditionalCost.md) | |
## Methods
-### GetHasMore
-
-`func (o *InlineResponse20035) GetHasMore() bool`
-
-GetHasMore returns the HasMore field if non-nil, zero value otherwise.
-
-### GetHasMoreOk
-
-`func (o *InlineResponse20035) GetHasMoreOk() (bool, bool)`
-
-GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasHasMore
-
-`func (o *InlineResponse20035) HasHasMore() bool`
-
-HasHasMore returns a boolean if a field has been set.
-
-### SetHasMore
-
-`func (o *InlineResponse20035) SetHasMore(v bool)`
-
-SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-
### GetTotalResultSize
`func (o *InlineResponse20035) GetTotalResultSize() int32`
@@ -62,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20035) GetData() []CatalogItem`
+`func (o *InlineResponse20035) GetData() []AccountAdditionalCost`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20035) GetDataOk() ([]CatalogItem, bool)`
+`func (o *InlineResponse20035) GetDataOk() ([]AccountAdditionalCost, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20035) SetData(v []CatalogItem)`
+`func (o *InlineResponse20035) SetData(v []AccountAdditionalCost)`
-SetData gets a reference to the given []CatalogItem and assigns it to the Data field.
+SetData gets a reference to the given []AccountAdditionalCost and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20036.md b/docs/InlineResponse20036.md
index bf396ec4..7d7af1df 100644
--- a/docs/InlineResponse20036.md
+++ b/docs/InlineResponse20036.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]AccountAdditionalCost**](AccountAdditionalCost.md) | |
+**Data** | Pointer to [**[]WebhookWithOutgoingIntegrationDetails**](WebhookWithOutgoingIntegrationDetails.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20036) GetData() []AccountAdditionalCost`
+`func (o *InlineResponse20036) GetData() []WebhookWithOutgoingIntegrationDetails`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20036) GetDataOk() ([]AccountAdditionalCost, bool)`
+`func (o *InlineResponse20036) GetDataOk() ([]WebhookWithOutgoingIntegrationDetails, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20036) SetData(v []AccountAdditionalCost)`
+`func (o *InlineResponse20036) SetData(v []WebhookWithOutgoingIntegrationDetails)`
-SetData gets a reference to the given []AccountAdditionalCost and assigns it to the Data field.
+SetData gets a reference to the given []WebhookWithOutgoingIntegrationDetails and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20037.md b/docs/InlineResponse20037.md
index 4d9a766c..ebaa1b8c 100644
--- a/docs/InlineResponse20037.md
+++ b/docs/InlineResponse20037.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]WebhookWithOutgoingIntegrationDetails**](WebhookWithOutgoingIntegrationDetails.md) | |
+**Data** | Pointer to [**[]WebhookActivationLogEntry**](WebhookActivationLogEntry.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20037) GetData() []WebhookWithOutgoingIntegrationDetails`
+`func (o *InlineResponse20037) GetData() []WebhookActivationLogEntry`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20037) GetDataOk() ([]WebhookWithOutgoingIntegrationDetails, bool)`
+`func (o *InlineResponse20037) GetDataOk() ([]WebhookActivationLogEntry, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20037) SetData(v []WebhookWithOutgoingIntegrationDetails)`
+`func (o *InlineResponse20037) SetData(v []WebhookActivationLogEntry)`
-SetData gets a reference to the given []WebhookWithOutgoingIntegrationDetails and assigns it to the Data field.
+SetData gets a reference to the given []WebhookActivationLogEntry and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20038.md b/docs/InlineResponse20038.md
index f216e668..d20f0b10 100644
--- a/docs/InlineResponse20038.md
+++ b/docs/InlineResponse20038.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]WebhookActivationLogEntry**](WebhookActivationLogEntry.md) | |
+**Data** | Pointer to [**[]WebhookLogEntry**](WebhookLogEntry.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20038) GetData() []WebhookActivationLogEntry`
+`func (o *InlineResponse20038) GetData() []WebhookLogEntry`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20038) GetDataOk() ([]WebhookActivationLogEntry, bool)`
+`func (o *InlineResponse20038) GetDataOk() ([]WebhookLogEntry, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20038) SetData(v []WebhookActivationLogEntry)`
+`func (o *InlineResponse20038) SetData(v []WebhookLogEntry)`
-SetData gets a reference to the given []WebhookActivationLogEntry and assigns it to the Data field.
+SetData gets a reference to the given []WebhookLogEntry and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20039.md b/docs/InlineResponse20039.md
index 1b964285..51a8901d 100644
--- a/docs/InlineResponse20039.md
+++ b/docs/InlineResponse20039.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]WebhookLogEntry**](WebhookLogEntry.md) | |
+**Data** | Pointer to [**[]EventType**](EventType.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20039) GetData() []WebhookLogEntry`
+`func (o *InlineResponse20039) GetData() []EventType`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20039) GetDataOk() ([]WebhookLogEntry, bool)`
+`func (o *InlineResponse20039) GetDataOk() ([]EventType, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20039) SetData(v []WebhookLogEntry)`
+`func (o *InlineResponse20039) SetData(v []EventType)`
-SetData gets a reference to the given []WebhookLogEntry and assigns it to the Data field.
+SetData gets a reference to the given []EventType and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20040.md b/docs/InlineResponse20040.md
index 40b856ec..35765bbb 100644
--- a/docs/InlineResponse20040.md
+++ b/docs/InlineResponse20040.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]EventType**](EventType.md) | |
+**Data** | Pointer to [**[]User**](User.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20040) GetData() []EventType`
+`func (o *InlineResponse20040) GetData() []User`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20040) GetDataOk() ([]EventType, bool)`
+`func (o *InlineResponse20040) GetDataOk() ([]User, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20040) SetData(v []EventType)`
+`func (o *InlineResponse20040) SetData(v []User)`
-SetData gets a reference to the given []EventType and assigns it to the Data field.
+SetData gets a reference to the given []User and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20041.md b/docs/InlineResponse20041.md
index 3aa765b7..9899a807 100644
--- a/docs/InlineResponse20041.md
+++ b/docs/InlineResponse20041.md
@@ -4,8 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]User**](User.md) | |
+**TotalResultSize** | Pointer to **int32** | | [optional]
+**HasMore** | Pointer to **bool** | | [optional]
+**Data** | Pointer to [**[]Change**](Change.md) | |
## Methods
@@ -34,15 +35,40 @@ HasTotalResultSize returns a boolean if a field has been set.
SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+### GetHasMore
+
+`func (o *InlineResponse20041) GetHasMore() bool`
+
+GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+
+### GetHasMoreOk
+
+`func (o *InlineResponse20041) GetHasMoreOk() (bool, bool)`
+
+GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasHasMore
+
+`func (o *InlineResponse20041) HasHasMore() bool`
+
+HasHasMore returns a boolean if a field has been set.
+
+### SetHasMore
+
+`func (o *InlineResponse20041) SetHasMore(v bool)`
+
+SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+
### GetData
-`func (o *InlineResponse20041) GetData() []User`
+`func (o *InlineResponse20041) GetData() []Change`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20041) GetDataOk() ([]User, bool)`
+`func (o *InlineResponse20041) GetDataOk() ([]Change, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20041) SetData(v []User)`
+`func (o *InlineResponse20041) SetData(v []Change)`
-SetData gets a reference to the given []User and assigns it to the Data field.
+SetData gets a reference to the given []Change and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20042.md b/docs/InlineResponse20042.md
index f72a00a4..84c6af99 100644
--- a/docs/InlineResponse20042.md
+++ b/docs/InlineResponse20042.md
@@ -4,9 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | | [optional]
-**HasMore** | Pointer to **bool** | | [optional]
-**Data** | Pointer to [**[]Change**](Change.md) | |
+**TotalResultSize** | Pointer to **int32** | |
+**Data** | Pointer to [**[]Export**](Export.md) | |
## Methods
@@ -35,40 +34,15 @@ HasTotalResultSize returns a boolean if a field has been set.
SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-### GetHasMore
-
-`func (o *InlineResponse20042) GetHasMore() bool`
-
-GetHasMore returns the HasMore field if non-nil, zero value otherwise.
-
-### GetHasMoreOk
-
-`func (o *InlineResponse20042) GetHasMoreOk() (bool, bool)`
-
-GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasHasMore
-
-`func (o *InlineResponse20042) HasHasMore() bool`
-
-HasHasMore returns a boolean if a field has been set.
-
-### SetHasMore
-
-`func (o *InlineResponse20042) SetHasMore(v bool)`
-
-SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-
### GetData
-`func (o *InlineResponse20042) GetData() []Change`
+`func (o *InlineResponse20042) GetData() []Export`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20042) GetDataOk() ([]Change, bool)`
+`func (o *InlineResponse20042) GetDataOk() ([]Export, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20042) SetData(v []Change)`
+`func (o *InlineResponse20042) SetData(v []Export)`
-SetData gets a reference to the given []Change and assigns it to the Data field.
+SetData gets a reference to the given []Export and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20043.md b/docs/InlineResponse20043.md
index 8f34e9f3..9905c111 100644
--- a/docs/InlineResponse20043.md
+++ b/docs/InlineResponse20043.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]Export**](Export.md) | |
+**Data** | Pointer to [**[]RoleV2**](RoleV2.md) | |
## Methods
@@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20043) GetData() []Export`
+`func (o *InlineResponse20043) GetData() []RoleV2`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20043) GetDataOk() ([]Export, bool)`
+`func (o *InlineResponse20043) GetDataOk() ([]RoleV2, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20043) SetData(v []Export)`
+`func (o *InlineResponse20043) SetData(v []RoleV2)`
-SetData gets a reference to the given []Export and assigns it to the Data field.
+SetData gets a reference to the given []RoleV2 and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20044.md b/docs/InlineResponse20044.md
index 9f3d0535..3af05053 100644
--- a/docs/InlineResponse20044.md
+++ b/docs/InlineResponse20044.md
@@ -4,11 +4,37 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TotalResultSize** | Pointer to **int32** | |
-**Data** | Pointer to [**[]RoleV2**](RoleV2.md) | |
+**HasMore** | Pointer to **bool** | | [optional]
+**TotalResultSize** | Pointer to **int32** | | [optional]
+**Data** | Pointer to [**[]Store**](Store.md) | |
## Methods
+### GetHasMore
+
+`func (o *InlineResponse20044) GetHasMore() bool`
+
+GetHasMore returns the HasMore field if non-nil, zero value otherwise.
+
+### GetHasMoreOk
+
+`func (o *InlineResponse20044) GetHasMoreOk() (bool, bool)`
+
+GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasHasMore
+
+`func (o *InlineResponse20044) HasHasMore() bool`
+
+HasHasMore returns a boolean if a field has been set.
+
+### SetHasMore
+
+`func (o *InlineResponse20044) SetHasMore(v bool)`
+
+SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+
### GetTotalResultSize
`func (o *InlineResponse20044) GetTotalResultSize() int32`
@@ -36,13 +62,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot
### GetData
-`func (o *InlineResponse20044) GetData() []RoleV2`
+`func (o *InlineResponse20044) GetData() []Store`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20044) GetDataOk() ([]RoleV2, bool)`
+`func (o *InlineResponse20044) GetDataOk() ([]Store, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20044) SetData(v []RoleV2)`
+`func (o *InlineResponse20044) SetData(v []Store)`
-SetData gets a reference to the given []RoleV2 and assigns it to the Data field.
+SetData gets a reference to the given []Store and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20045.md b/docs/InlineResponse20045.md
index f63eaa86..2391af7f 100644
--- a/docs/InlineResponse20045.md
+++ b/docs/InlineResponse20045.md
@@ -5,8 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**HasMore** | Pointer to **bool** | | [optional]
-**TotalResultSize** | Pointer to **int32** | | [optional]
-**Data** | Pointer to [**[]Store**](Store.md) | |
+**Data** | Pointer to [**[]Achievement**](Achievement.md) | |
## Methods
@@ -35,40 +34,15 @@ HasHasMore returns a boolean if a field has been set.
SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-### GetTotalResultSize
-
-`func (o *InlineResponse20045) GetTotalResultSize() int32`
-
-GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise.
-
-### GetTotalResultSizeOk
-
-`func (o *InlineResponse20045) GetTotalResultSizeOk() (int32, bool)`
-
-GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasTotalResultSize
-
-`func (o *InlineResponse20045) HasTotalResultSize() bool`
-
-HasTotalResultSize returns a boolean if a field has been set.
-
-### SetTotalResultSize
-
-`func (o *InlineResponse20045) SetTotalResultSize(v int32)`
-
-SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-
### GetData
-`func (o *InlineResponse20045) GetData() []Store`
+`func (o *InlineResponse20045) GetData() []Achievement`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20045) GetDataOk() ([]Store, bool)`
+`func (o *InlineResponse20045) GetDataOk() ([]Achievement, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20045) SetData(v []Store)`
+`func (o *InlineResponse20045) SetData(v []Achievement)`
-SetData gets a reference to the given []Store and assigns it to the Data field.
+SetData gets a reference to the given []Achievement and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20046.md b/docs/InlineResponse20046.md
index a6b1681d..8ec6e6f2 100644
--- a/docs/InlineResponse20046.md
+++ b/docs/InlineResponse20046.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | | [optional]
-**Data** | Pointer to [**[]Achievement**](Achievement.md) | |
+**HasMore** | Pointer to **bool** | |
+**Data** | Pointer to [**[]AchievementProgress**](AchievementProgress.md) | |
## Methods
@@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel
### GetData
-`func (o *InlineResponse20046) GetData() []Achievement`
+`func (o *InlineResponse20046) GetData() []AchievementProgress`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
-`func (o *InlineResponse20046) GetDataOk() ([]Achievement, bool)`
+`func (o *InlineResponse20046) GetDataOk() ([]AchievementProgress, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set.
### SetData
-`func (o *InlineResponse20046) SetData(v []Achievement)`
+`func (o *InlineResponse20046) SetData(v []AchievementProgress)`
-SetData gets a reference to the given []Achievement and assigns it to the Data field.
+SetData gets a reference to the given []AchievementProgress and assigns it to the Data field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineResponse20047.md b/docs/InlineResponse20047.md
deleted file mode 100644
index 5f61d3c5..00000000
--- a/docs/InlineResponse20047.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# InlineResponse20047
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**HasMore** | Pointer to **bool** | |
-**Data** | Pointer to [**[]AchievementProgress**](AchievementProgress.md) | |
-
-## Methods
-
-### GetHasMore
-
-`func (o *InlineResponse20047) GetHasMore() bool`
-
-GetHasMore returns the HasMore field if non-nil, zero value otherwise.
-
-### GetHasMoreOk
-
-`func (o *InlineResponse20047) GetHasMoreOk() (bool, bool)`
-
-GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasHasMore
-
-`func (o *InlineResponse20047) HasHasMore() bool`
-
-HasHasMore returns a boolean if a field has been set.
-
-### SetHasMore
-
-`func (o *InlineResponse20047) SetHasMore(v bool)`
-
-SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-
-### GetData
-
-`func (o *InlineResponse20047) GetData() []AchievementProgress`
-
-GetData returns the Data field if non-nil, zero value otherwise.
-
-### GetDataOk
-
-`func (o *InlineResponse20047) GetDataOk() ([]AchievementProgress, bool)`
-
-GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasData
-
-`func (o *InlineResponse20047) HasData() bool`
-
-HasData returns a boolean if a field has been set.
-
-### SetData
-
-`func (o *InlineResponse20047) SetData(v []AchievementProgress)`
-
-SetData gets a reference to the given []AchievementProgress and assigns it to the Data field.
-
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md
index f5705653..1c1df235 100644
--- a/docs/IntegrationApi.md
+++ b/docs/IntegrationApi.md
@@ -1,6 +1,6 @@
# \IntegrationApi
-All URIs are relative to *https://yourbaseurl.talon.one*
+All URLs are relative to `https://yourbaseurl.talon.one`.
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -15,7 +15,7 @@ Method | HTTP request | Description
[**GenerateLoyaltyCard**](IntegrationApi.md#GenerateLoyaltyCard) | **Post** /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card
[**GetCustomerInventory**](IntegrationApi.md#GetCustomerInventory) | **Get** /v1/customer_profiles/{integrationId}/inventory | List customer data
[**GetCustomerSession**](IntegrationApi.md#GetCustomerSession) | **Get** /v2/customer_sessions/{customerSessionId} | Get customer session
-[**GetLoyaltyBalances**](IntegrationApi.md#GetLoyaltyBalances) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points
+[**GetLoyaltyBalances**](IntegrationApi.md#GetLoyaltyBalances) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty balances
[**GetLoyaltyCardBalances**](IntegrationApi.md#GetLoyaltyCardBalances) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances | Get card's point balances
[**GetLoyaltyCardPoints**](IntegrationApi.md#GetLoyaltyCardPoints) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/points | List card's unused loyalty points
[**GetLoyaltyCardTransactions**](IntegrationApi.md#GetLoyaltyCardTransactions) | **Get** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions | List card's transactions
@@ -38,24 +38,19 @@ Method | HTTP request | Description
## CreateAudienceV2
-> Audience CreateAudienceV2(ctx).Body(body).Execute()
+> Audience CreateAudienceV2(ctx, body)
Create audience
+Create an audience. The audience can be created directly from scratch or can come from third party platforms. **Note:** Audiences can also be created from scratch via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/creating-audiences). To create an audience from an existing audience from a [technology partner](https://docs.talon.one/docs/dev/technology-partners/overview): 1. Set the `integration` property to `mparticle`, `segment` etc., depending on a third-party platform. 1. Set `integrationId` to the ID of this audience in a third-party platform. To create an audience from an existing audience in another platform: 1. Do not use the `integration` property. 1. Set `integrationId` to the ID of this audience in the 3rd-party platform. To create an audience from scratch: 1. Only set the `name` property. Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateAudienceV2Request struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewAudience**](NewAudience.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewAudience**](NewAudience.md)| body |
### Return type
@@ -77,29 +72,20 @@ Name | Type | Description | Notes
## CreateCouponReservation
-> Coupon CreateCouponReservation(ctx, couponValue).Body(body).Execute()
+> Coupon CreateCouponReservation(ctx, couponValue, body)
Create coupon reservation
+Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code) effect. **Note:** - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon is associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. - This endpoint overrides the coupon reservation limit set when [the coupon is created](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons). To ensure that coupons cannot be reserved after the reservation limit is reached, use the [Create coupon code reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code) effect in the Rule Builder and the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**couponValue** | **string** | The code of the coupon. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateCouponReservationRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**CouponReservations**](CouponReservations.md) | body |
+**couponValue** | **string**| The code of the coupon. |
+**body** | [**CouponReservations**](CouponReservations.md)| body |
### Return type
@@ -121,24 +107,19 @@ Name | Type | Description | Notes
## CreateReferral
-> Referral CreateReferral(ctx).Body(body).Execute()
+> Referral CreateReferral(ctx, body)
Create referral code for an advocate
+Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the `campaignId` parameter, and will be associated with the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateReferralRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewReferral**](NewReferral.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewReferral**](NewReferral.md)| body |
### Return type
@@ -160,29 +141,34 @@ Name | Type | Description | Notes
## CreateReferralsForMultipleAdvocates
-> InlineResponse201 CreateReferralsForMultipleAdvocates(ctx).Body(body).Silent(silent).Execute()
+> InlineResponse201 CreateReferralsForMultipleAdvocates(ctx, body, optional)
Create referral codes for multiple advocates
+Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the `campaignId` parameter, and one referral code will be associated with one advocate using the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewReferralsForMultipleAdvocates**](NewReferralsForMultipleAdvocates.md)| body |
+ **optional** | ***CreateReferralsForMultipleAdvocatesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiCreateReferralsForMultipleAdvocatesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a CreateReferralsForMultipleAdvocatesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewReferralsForMultipleAdvocates**](NewReferralsForMultipleAdvocates.md) | body |
- **silent** | **string** | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
+
+ **silent** | **optional.**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
### Return type
-[**InlineResponse201**](inline_response_201.md)
+[**InlineResponse201**](InlineResponse201.md)
### Authorization
@@ -200,28 +186,19 @@ Name | Type | Description | Notes
## DeleteAudienceMembershipsV2
-> DeleteAudienceMembershipsV2(ctx, audienceId).Execute()
+> DeleteAudienceMembershipsV2(ctx, audienceId)
Delete audience memberships
+Remove all members from this audience.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteAudienceMembershipsV2Request struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**audienceId** | **int32**| The ID of the audience. |
### Return type
@@ -243,28 +220,19 @@ Name | Type | Description | Notes
## DeleteAudienceV2
-> DeleteAudienceV2(ctx, audienceId).Execute()
+> DeleteAudienceV2(ctx, audienceId)
Delete audience
+Delete an audience created by a third-party integration. **Warning:** This endpoint also removes any associations recorded between a customer profile and this audience. **Note:** Audiences can also be deleted via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/managing-audiences#deleting-an-audience).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteAudienceV2Request struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**audienceId** | **int32**| The ID of the audience. |
### Return type
@@ -286,29 +254,20 @@ Name | Type | Description | Notes
## DeleteCouponReservation
-> DeleteCouponReservation(ctx, couponValue).Body(body).Execute()
+> DeleteCouponReservation(ctx, couponValue, body)
Delete coupon reservations
+Remove all the coupon reservations from the provided customer profile integration IDs and the provided coupon code.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**couponValue** | **string** | The code of the coupon. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteCouponReservationRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**CouponReservations**](CouponReservations.md) | body |
+**couponValue** | **string**| The code of the coupon. |
+**body** | [**CouponReservations**](CouponReservations.md)| body |
### Return type
@@ -330,28 +289,19 @@ Name | Type | Description | Notes
## DeleteCustomerData
-> DeleteCustomerData(ctx, integrationId).Execute()
+> DeleteCustomerData(ctx, integrationId)
Delete customer's personal data
+Delete all attributes on the customer profile and on entities that reference this customer profile. **Important:** - Customer data is deleted from all Applications in the [environment](https://docs.talon.one/docs/product/applications/overview#application-environments) that the API key belongs to. For example, if you use this endpoint with an API key that belongs to a sandbox Application, customer data will be deleted from all sandbox Applications. This is because customer data is shared between Applications from the same environment. - To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**integrationId** | **string** | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteCustomerDataRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
### Return type
@@ -373,29 +323,20 @@ Name | Type | Description | Notes
## GenerateLoyaltyCard
-> LoyaltyCard GenerateLoyaltyCard(ctx, loyaltyProgramId).Body(body).Execute()
+> LoyaltyCard GenerateLoyaltyCard(ctx, loyaltyProgramId, body)
Generate loyalty card
+Generate a loyalty card in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview). To link the card to one or more customer profiles, use the `customerProfileIds` parameter in the request body. **Note:** - The number of customer profiles linked to the loyalty card cannot exceed the loyalty program's `usersPerCardLimit`. To find the program's limit, use the [Get loyalty program](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgram) endpoint. - If the loyalty program has a defined code format, it will be used for the loyalty card identifier.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGenerateLoyaltyCardRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**GenerateLoyaltyCard**](GenerateLoyaltyCard.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**body** | [**GenerateLoyaltyCard**](GenerateLoyaltyCard.md)| body |
### Return type
@@ -417,34 +358,35 @@ Name | Type | Description | Notes
## GetCustomerInventory
-> CustomerInventory GetCustomerInventory(ctx, integrationId).Profile(profile).Referrals(referrals).Coupons(coupons).Loyalty(loyalty).Giveaways(giveaways).Achievements(achievements).Execute()
+> CustomerInventory GetCustomerInventory(ctx, integrationId, optional)
List customer data
+Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**integrationId** | **string** | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
+**integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
+ **optional** | ***GetCustomerInventoryOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomerInventoryRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomerInventoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **profile** | **bool** | Set to `true` to include customer profile information in the response. |
- **referrals** | **bool** | Set to `true` to include referral information in the response. |
- **coupons** | **bool** | Set to `true` to include coupon information in the response. |
- **loyalty** | **bool** | Set to `true` to include loyalty information in the response. |
- **giveaways** | **bool** | Set to `true` to include giveaways information in the response. |
- **achievements** | **bool** | Set to `true` to include achievement information in the response. |
+ **profile** | **optional.**| Set to `true` to include customer profile information in the response. |
+ **referrals** | **optional.**| Set to `true` to include referral information in the response. |
+ **coupons** | **optional.**| Set to `true` to include coupon information in the response. |
+ **loyalty** | **optional.**| Set to `true` to include loyalty information in the response. |
+ **giveaways** | **optional.**| Set to `true` to include giveaways information in the response. |
+ **achievements** | **optional.**| Set to `true` to include achievement information in the response. |
### Return type
@@ -466,28 +408,19 @@ Name | Type | Description | Notes
## GetCustomerSession
-> IntegrationCustomerSessionResponse GetCustomerSession(ctx, customerSessionId).Execute()
+> IntegrationCustomerSessionResponse GetCustomerSession(ctx, customerSessionId)
Get customer session
+Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - [Update customer session](#tag/Customer-sessions/operation/updateCustomerSessionV2) - [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2)
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**customerSessionId** | **string** | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetCustomerSessionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
### Return type
@@ -509,34 +442,35 @@ Name | Type | Description | Notes
## GetLoyaltyBalances
-> LoyaltyBalancesWithTiers GetLoyaltyBalances(ctx, loyaltyProgramId, integrationId).EndDate(endDate).SubledgerId(subledgerId).IncludeTiers(includeTiers).IncludeProjectedTier(includeProjectedTier).Execute()
+> LoyaltyBalancesWithTiers GetLoyaltyBalances(ctx, loyaltyProgramId, integrationId, optional)
-Get customer's loyalty points
+Get customer's loyalty balances
+Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data)
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**integrationId** | **string** | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+**loyaltyProgramId** | **int32**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+ **optional** | ***GetLoyaltyBalancesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyBalancesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyBalancesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **subledgerId** | **string** | The ID of the subledger by which we filter the data. |
- **includeTiers** | **bool** | Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. | [default to false]
- **includeProjectedTier** | **bool** | Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. | [default to false]
+ **endDate** | **optional.**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **subledgerId** | **optional.**| The ID of the subledger by which we filter the data. |
+ **includeTiers** | **optional.**| Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. | [default to false]
+ **includeProjectedTier** | **optional.**| Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer's active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. | [default to false]
### Return type
@@ -558,32 +492,33 @@ Name | Type | Description | Notes
## GetLoyaltyCardBalances
-> LoyaltyCardBalances GetLoyaltyCardBalances(ctx, loyaltyProgramId, loyaltyCardId).EndDate(endDate).SubledgerId(subledgerId).Execute()
+> LoyaltyCardBalances GetLoyaltyCardBalances(ctx, loyaltyProgramId, loyaltyCardId, optional)
Get card's point balances
+Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+ **optional** | ***GetLoyaltyCardBalancesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyCardBalancesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyCardBalancesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **subledgerId** | [**[]string**](string.md) | Filter results by one or more subledger IDs. Must be exact match. |
+ **endDate** | **optional.**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **subledgerId** | [**optional.Interface of []string**](string.md)| Filter results by one or more subledger IDs. Must be exact match. |
### Return type
@@ -605,38 +540,39 @@ Name | Type | Description | Notes
## GetLoyaltyCardPoints
-> InlineResponse2003 GetLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId).Status(status).SubledgerId(subledgerId).PageSize(pageSize).Skip(skip).Execute()
+> InlineResponse2003 GetLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId, optional)
List card's unused loyalty points
+Get paginated results of loyalty points for a given loyalty card identifier in a card-based loyalty program. This endpoint returns only the balances of unused points on a loyalty card. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+ **optional** | ***GetLoyaltyCardPointsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyCardPointsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyCardPointsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | **string** | Filter points based on their status. | [default to active]
- **subledgerId** | [**[]string**](string.md) | Filter results by one or more subledger IDs. Must be exact match. |
- **pageSize** | **int32** | The number of items in the response. | [default to 50]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+ **status** | **optional.**| Filter points based on their status. | [default to active]
+ **subledgerId** | [**optional.Interface of []string**](string.md)| Filter results by one or more subledger IDs. Must be exact match. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 50]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
-[**InlineResponse2003**](inline_response_200_3.md)
+[**InlineResponse2003**](InlineResponse2003.md)
### Authorization
@@ -654,40 +590,41 @@ Name | Type | Description | Notes
## GetLoyaltyCardTransactions
-> InlineResponse2001 GetLoyaltyCardTransactions(ctx, loyaltyProgramId, loyaltyCardId).SubledgerId(subledgerId).LoyaltyTransactionType(loyaltyTransactionType).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).Execute()
+> InlineResponse2001 GetLoyaltyCardTransactions(ctx, loyaltyProgramId, loyaltyCardId, optional)
List card's transactions
+Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+ **optional** | ***GetLoyaltyCardTransactionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyCardTransactionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyCardTransactionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **subledgerId** | [**[]string**](string.md) | Filter results by one or more subledger IDs. Must be exact match. |
- **loyaltyTransactionType** | **string** | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. |
- **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+ **subledgerId** | [**optional.Interface of []string**](string.md)| Filter results by one or more subledger IDs. Must be exact match. |
+ **loyaltyTransactionType** | **optional.**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. |
+ **startDate** | **optional.**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
-[**InlineResponse2001**](inline_response_200_1.md)
+[**InlineResponse2001**](InlineResponse2001.md)
### Authorization
@@ -705,38 +642,39 @@ Name | Type | Description | Notes
## GetLoyaltyProgramProfilePoints
-> InlineResponse2004 GetLoyaltyProgramProfilePoints(ctx, loyaltyProgramId, integrationId).Status(status).SubledgerId(subledgerId).PageSize(pageSize).Skip(skip).Execute()
+> InlineResponse2004 GetLoyaltyProgramProfilePoints(ctx, loyaltyProgramId, integrationId, optional)
List customer's unused loyalty points
+Get paginated results of loyalty points for a given Integration ID in the specified profile-based loyalty program. This endpoint returns only the balances of unused points linked to a customer profile. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**integrationId** | **string** | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+**loyaltyProgramId** | **int32**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+ **optional** | ***GetLoyaltyProgramProfilePointsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyProgramProfilePointsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyProgramProfilePointsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | **string** | Filter points based on their status. | [default to active]
- **subledgerId** | **string** | The ID of the subledger by which we filter the data. |
- **pageSize** | **int32** | The number of items in the response. | [default to 50]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+ **status** | **optional.**| Filter points based on their status. | [default to active]
+ **subledgerId** | **optional.**| The ID of the subledger by which we filter the data. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 50]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
-[**InlineResponse2004**](inline_response_200_4.md)
+[**InlineResponse2004**](InlineResponse2004.md)
### Authorization
@@ -754,40 +692,41 @@ Name | Type | Description | Notes
## GetLoyaltyProgramProfileTransactions
-> InlineResponse2002 GetLoyaltyProgramProfileTransactions(ctx, loyaltyProgramId, integrationId).SubledgerId(subledgerId).LoyaltyTransactionType(loyaltyTransactionType).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).Execute()
+> InlineResponse2002 GetLoyaltyProgramProfileTransactions(ctx, loyaltyProgramId, integrationId, optional)
List customer's loyalty transactions
+Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date. If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. **Note:** To retrieve all loyalty program transaction logs in a given loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**integrationId** | **string** | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+**loyaltyProgramId** | **int32**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+ **optional** | ***GetLoyaltyProgramProfileTransactionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyProgramProfileTransactionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyProgramProfileTransactionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **subledgerId** | **string** | The ID of the subledger by which we filter the data. |
- **loyaltyTransactionType** | **string** | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. |
- **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **pageSize** | **int32** | The number of items in the response. | [default to 50]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+ **subledgerId** | **optional.**| The ID of the subledger by which we filter the data. |
+ **loyaltyTransactionType** | **optional.**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. |
+ **startDate** | **optional.**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 50]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
-[**InlineResponse2002**](inline_response_200_2.md)
+[**InlineResponse2002**](InlineResponse2002.md)
### Authorization
@@ -805,32 +744,23 @@ Name | Type | Description | Notes
## GetReservedCustomers
-> InlineResponse200 GetReservedCustomers(ctx, couponValue).Execute()
+> InlineResponse200 GetReservedCustomers(ctx, couponValue)
List customers that have this coupon reserved
+Return all customers that have this coupon marked as reserved. This includes hard and soft reservations.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**couponValue** | **string** | The code of the coupon. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetReservedCustomersRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**couponValue** | **string**| The code of the coupon. |
### Return type
-[**InlineResponse200**](inline_response_200.md)
+[**InlineResponse200**](InlineResponse200.md)
### Authorization
@@ -848,31 +778,21 @@ Name | Type | Description | Notes
## LinkLoyaltyCardToProfile
-> LoyaltyCard LinkLoyaltyCardToProfile(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute()
+> LoyaltyCard LinkLoyaltyCardToProfile(ctx, loyaltyProgramId, loyaltyCardId, body)
Link customer profile to card
+[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/card-based/creating-cb-programs) allows.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiLinkLoyaltyCardToProfileRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**LoyaltyCardRegistration**](LoyaltyCardRegistration.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**body** | [**LoyaltyCardRegistration**](LoyaltyCardRegistration.md)| body |
### Return type
@@ -894,28 +814,19 @@ Name | Type | Description | Notes
## ReopenCustomerSession
-> ReopenSessionResponse ReopenCustomerSession(ctx, customerSessionId).Execute()
+> ReopenSessionResponse ReopenCustomerSession(ctx, customerSessionId)
Reopen customer session
+Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below. Effects and budgets unimpacted by a session reopening
The following effects and budgets are left the way they were once the session was originally closed:
- Add free item effect
- Any non-pending loyalty points
- Award giveaway
- Coupon and referral creation
- Coupon reservation
- Custom effect
- Update attribute value
- Update cart item attribute value
To see an example of roll back, see the Cancelling a session with campaign budgets tutorial.
**Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**customerSessionId** | **string** | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiReopenCustomerSessionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
### Return type
@@ -937,30 +848,32 @@ Name | Type | Description | Notes
## ReturnCartItems
-> IntegrationStateV2 ReturnCartItems(ctx, customerSessionId).Body(body).Dry(dry).Execute()
+> IntegrationStateV2 ReturnCartItems(ctx, customerSessionId, body, optional)
Return cart items
+Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**customerSessionId** | **string** | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
+**customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
+**body** | [**ReturnIntegrationRequest**](ReturnIntegrationRequest.md)| body |
+ **optional** | ***ReturnCartItemsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiReturnCartItemsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ReturnCartItemsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ReturnIntegrationRequest**](ReturnIntegrationRequest.md) | body |
- **dry** | **bool** | Indicates whether to persist the changes. Changes are ignored when `dry=true`. |
+
+ **dry** | **optional.**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. |
### Return type
@@ -982,29 +895,20 @@ Name | Type | Description | Notes
## SyncCatalog
-> Catalog SyncCatalog(ctx, catalogId).Body(body).Execute()
+> Catalog SyncCatalog(ctx, catalogId, body)
Sync cart item catalog
+Perform the following actions for a given cart item catalog: - Add an item to the catalog. - Add multiple items to the catalog. - Update the attributes of an item in the catalog. - Update the attributes of multiple items in the catalog. - Remove an item from the catalog. - Remove multiple items from the catalog. You can either add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: You can perform only one type of action in a single sync request. Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Adding multiple items to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Updating the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ```
Updating the attributes of multiple items in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing multiple items from the catalog
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog
Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**catalogId** | **int32** | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiSyncCatalogRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**CatalogSyncRequest**](CatalogSyncRequest.md) | body |
+**catalogId** | **int32**| The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. |
+**body** | [**CatalogSyncRequest**](CatalogSyncRequest.md)| body |
### Return type
@@ -1026,26 +930,31 @@ Name | Type | Description | Notes
## TrackEventV2
-> TrackEventV2Response TrackEventV2(ctx).Body(body).Silent(silent).Dry(dry).Execute()
+> TrackEventV2Response TrackEventV2(ctx, body, optional)
Track event
+Triggers a custom event. To use this endpoint: 1. Define a [custom event](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the **Events** view in the Campaign Manager. Talon.One also offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/entities/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). Important
1. `profileId` is required even though the schema does not say it. 1. If the customer profile ID is new, a new profile is automatically created but the `customer_profile_created` [built-in event ](https://docs.talon.one/docs/dev/concepts/entities/events) is **not** triggered. 1. We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests).
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**IntegrationEventV2Request**](IntegrationEventV2Request.md)| body |
+ **optional** | ***TrackEventV2Opts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiTrackEventV2Request struct via the builder pattern
+Optional parameters are passed through a pointer to a TrackEventV2Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**IntegrationEventV2Request**](IntegrationEventV2Request.md) | body |
- **silent** | **string** | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
- **dry** | **bool** | Indicates whether to persist the changes. Changes are ignored when `dry=true`. |
+
+ **silent** | **optional.**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
+ **dry** | **optional.**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. |
### Return type
@@ -1067,29 +976,20 @@ Name | Type | Description | Notes
## UpdateAudienceCustomersAttributes
-> UpdateAudienceCustomersAttributes(ctx, audienceId).Body(body).Execute()
+> UpdateAudienceCustomersAttributes(ctx, audienceId, body)
Update profile attributes for all customers in audience
+Update the specified profile attributes to the provided values for all customers in the specified audience.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateAudienceCustomersAttributesRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | **map[string]interface{}** | body |
+**audienceId** | **int32**| The ID of the audience. |
+**body** | **map[string]interface{}**| body |
### Return type
@@ -1111,29 +1011,20 @@ Name | Type | Description | Notes
## UpdateAudienceV2
-> Audience UpdateAudienceV2(ctx, audienceId).Body(body).Execute()
+> Audience UpdateAudienceV2(ctx, audienceId, body)
Update audience name
+Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the Rule Engine. To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateAudienceV2Request struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**UpdateAudience**](UpdateAudience.md) | body |
+**audienceId** | **int32**| The ID of the audience. |
+**body** | [**UpdateAudience**](UpdateAudience.md)| body |
### Return type
@@ -1155,24 +1046,19 @@ Name | Type | Description | Notes
## UpdateCustomerProfileAudiences
-> UpdateCustomerProfileAudiences(ctx).Body(body).Execute()
+> UpdateCustomerProfileAudiences(ctx, body)
Update multiple customer profiles' audiences
+Add customer profiles to or remove them from an audience. The endpoint supports 1000 audience actions (`add` or `remove`) per request. **Note:** You can also do this using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateCustomerProfileAudiencesRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CustomerProfileAudienceRequest**](CustomerProfileAudienceRequest.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**CustomerProfileAudienceRequest**](CustomerProfileAudienceRequest.md)| body |
### Return type
@@ -1194,31 +1080,33 @@ Name | Type | Description | Notes
## UpdateCustomerProfileV2
-> CustomerProfileIntegrationResponseV2 UpdateCustomerProfileV2(ctx, integrationId).Body(body).RunRuleEngine(runRuleEngine).Dry(dry).Execute()
+> CustomerProfileIntegrationResponseV2 UpdateCustomerProfileV2(ctx, integrationId, body, optional)
Update customer profile
+Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. Performance tips
- Updating a customer profile returns a response with the requested integration state. - You can use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**integrationId** | **string** | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+**integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. |
+**body** | [**CustomerProfileIntegrationRequestV2**](CustomerProfileIntegrationRequestV2.md)| body |
+ **optional** | ***UpdateCustomerProfileV2Opts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiUpdateCustomerProfileV2Request struct via the builder pattern
+Optional parameters are passed through a pointer to a UpdateCustomerProfileV2Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CustomerProfileIntegrationRequestV2**](CustomerProfileIntegrationRequestV2.md) | body |
- **runRuleEngine** | **bool** | Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. | [default to false]
- **dry** | **bool** | (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. |
+
+ **runRuleEngine** | **optional.**| Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. | [default to false]
+ **dry** | **optional.**| (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. |
### Return type
@@ -1240,25 +1128,30 @@ Name | Type | Description | Notes
## UpdateCustomerProfilesV2
-> MultipleCustomerProfileIntegrationResponseV2 UpdateCustomerProfilesV2(ctx).Body(body).Silent(silent).Execute()
+> MultipleCustomerProfileIntegrationResponseV2 UpdateCustomerProfilesV2(ctx, body, optional)
Update multiple customer profiles
+Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](https://docs.talon.one/integration-api#tag/Customer-sessions). **Note:** This endpoint does not trigger the Rule Engine. To trigger the Rule Engine for customer profile updates, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**MultipleCustomerProfileIntegrationRequest**](MultipleCustomerProfileIntegrationRequest.md)| body |
+ **optional** | ***UpdateCustomerProfilesV2Opts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiUpdateCustomerProfilesV2Request struct via the builder pattern
+Optional parameters are passed through a pointer to a UpdateCustomerProfilesV2Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**MultipleCustomerProfileIntegrationRequest**](MultipleCustomerProfileIntegrationRequest.md) | body |
- **silent** | **string** | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
+
+ **silent** | **optional.**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
### Return type
@@ -1280,31 +1173,33 @@ Name | Type | Description | Notes
## UpdateCustomerSessionV2
-> IntegrationStateV2 UpdateCustomerSessionV2(ctx, customerSessionId).Body(body).Dry(dry).Now(now).Execute()
+> IntegrationStateV2 UpdateCustomerSessionV2(ctx, customerSessionId, body, optional)
Update customer session
+Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). Performance tips
- Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests).
For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**customerSessionId** | **string** | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
+**customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. |
+**body** | [**IntegrationRequest**](IntegrationRequest.md)| body |
+ **optional** | ***UpdateCustomerSessionV2Opts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiUpdateCustomerSessionV2Request struct via the builder pattern
+Optional parameters are passed through a pointer to a UpdateCustomerSessionV2Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**IntegrationRequest**](IntegrationRequest.md) | body |
- **dry** | **bool** | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). |
- **now** | **time.Time** | A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. |
+
+ **dry** | **optional.**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). |
+ **now** | **optional.**| A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. |
### Return type
diff --git a/docs/IntegrationCustomerSessionResponse.md b/docs/IntegrationCustomerSessionResponse.md
index 90fabba7..9a655b72 100644
--- a/docs/IntegrationCustomerSessionResponse.md
+++ b/docs/IntegrationCustomerSessionResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CustomerSession** | Pointer to [**CustomerSessionV2**](CustomerSessionV2.md) | | [optional]
-**Effects** | Pointer to [**[]Effect**](Effect.md) | | [optional]
+**Effects** | Pointer to [**[]Effect**](Effect.md) | The returned effects. **Note:** This endpoint returns only the effects that are valid after any rollback effects and their corresponding non-rollback effects are removed. | [optional]
## Methods
diff --git a/docs/LedgerInfo.md b/docs/LedgerInfo.md
index 115b77af..aaa86ec5 100644
--- a/docs/LedgerInfo.md
+++ b/docs/LedgerInfo.md
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
**PendingBalance** | Pointer to **float32** | Sum of pending points. |
**ExpiredBalance** | Pointer to **float32** | **DEPRECATED** Value is shown as 0. |
**SpentBalance** | Pointer to **float32** | **DEPRECATED** Value is shown as 0. |
-**TentativeCurrentBalance** | Pointer to **float32** | Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied. |
-**TentativePendingBalance** | Pointer to **float32** | Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied. | [optional]
+**TentativeCurrentBalance** | Pointer to **float32** | The tentative points balance, reflecting the `currentBalance` and all point additions and deductions within the current open customer session. When the session is closed, the effects are applied and the `currentBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. |
+**TentativePendingBalance** | Pointer to **float32** | The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. | [optional]
**CurrentTier** | Pointer to [**Tier**](Tier.md) | | [optional]
**PointsToNextTier** | Pointer to **float32** | Points required to move up a tier. | [optional]
diff --git a/docs/ListCampaignStoreBudgets.md b/docs/ListCampaignStoreBudgets.md
new file mode 100644
index 00000000..2c2d7258
--- /dev/null
+++ b/docs/ListCampaignStoreBudgets.md
@@ -0,0 +1,117 @@
+# ListCampaignStoreBudgets
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Store** | Pointer to [**ListCampaignStoreBudgetsStore**](ListCampaignStoreBudgetsStore.md) | |
+**Limit** | Pointer to **int32** | |
+**Action** | Pointer to **string** | |
+**Period** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetStore
+
+`func (o *ListCampaignStoreBudgets) GetStore() ListCampaignStoreBudgetsStore`
+
+GetStore returns the Store field if non-nil, zero value otherwise.
+
+### GetStoreOk
+
+`func (o *ListCampaignStoreBudgets) GetStoreOk() (ListCampaignStoreBudgetsStore, bool)`
+
+GetStoreOk returns a tuple with the Store field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStore
+
+`func (o *ListCampaignStoreBudgets) HasStore() bool`
+
+HasStore returns a boolean if a field has been set.
+
+### SetStore
+
+`func (o *ListCampaignStoreBudgets) SetStore(v ListCampaignStoreBudgetsStore)`
+
+SetStore gets a reference to the given ListCampaignStoreBudgetsStore and assigns it to the Store field.
+
+### GetLimit
+
+`func (o *ListCampaignStoreBudgets) GetLimit() int32`
+
+GetLimit returns the Limit field if non-nil, zero value otherwise.
+
+### GetLimitOk
+
+`func (o *ListCampaignStoreBudgets) GetLimitOk() (int32, bool)`
+
+GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasLimit
+
+`func (o *ListCampaignStoreBudgets) HasLimit() bool`
+
+HasLimit returns a boolean if a field has been set.
+
+### SetLimit
+
+`func (o *ListCampaignStoreBudgets) SetLimit(v int32)`
+
+SetLimit gets a reference to the given int32 and assigns it to the Limit field.
+
+### GetAction
+
+`func (o *ListCampaignStoreBudgets) GetAction() string`
+
+GetAction returns the Action field if non-nil, zero value otherwise.
+
+### GetActionOk
+
+`func (o *ListCampaignStoreBudgets) GetActionOk() (string, bool)`
+
+GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAction
+
+`func (o *ListCampaignStoreBudgets) HasAction() bool`
+
+HasAction returns a boolean if a field has been set.
+
+### SetAction
+
+`func (o *ListCampaignStoreBudgets) SetAction(v string)`
+
+SetAction gets a reference to the given string and assigns it to the Action field.
+
+### GetPeriod
+
+`func (o *ListCampaignStoreBudgets) GetPeriod() string`
+
+GetPeriod returns the Period field if non-nil, zero value otherwise.
+
+### GetPeriodOk
+
+`func (o *ListCampaignStoreBudgets) GetPeriodOk() (string, bool)`
+
+GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPeriod
+
+`func (o *ListCampaignStoreBudgets) HasPeriod() bool`
+
+HasPeriod returns a boolean if a field has been set.
+
+### SetPeriod
+
+`func (o *ListCampaignStoreBudgets) SetPeriod(v string)`
+
+SetPeriod gets a reference to the given string and assigns it to the Period field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ListCampaignStoreBudgetsStore.md b/docs/ListCampaignStoreBudgetsStore.md
new file mode 100644
index 00000000..d56eeafd
--- /dev/null
+++ b/docs/ListCampaignStoreBudgetsStore.md
@@ -0,0 +1,91 @@
+# ListCampaignStoreBudgetsStore
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | Pointer to **int32** | |
+**IntegrationId** | Pointer to **string** | |
+**Name** | Pointer to **string** | |
+
+## Methods
+
+### GetId
+
+`func (o *ListCampaignStoreBudgetsStore) GetId() int32`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *ListCampaignStoreBudgetsStore) GetIdOk() (int32, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *ListCampaignStoreBudgetsStore) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *ListCampaignStoreBudgetsStore) SetId(v int32)`
+
+SetId gets a reference to the given int32 and assigns it to the Id field.
+
+### GetIntegrationId
+
+`func (o *ListCampaignStoreBudgetsStore) GetIntegrationId() string`
+
+GetIntegrationId returns the IntegrationId field if non-nil, zero value otherwise.
+
+### GetIntegrationIdOk
+
+`func (o *ListCampaignStoreBudgetsStore) GetIntegrationIdOk() (string, bool)`
+
+GetIntegrationIdOk returns a tuple with the IntegrationId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasIntegrationId
+
+`func (o *ListCampaignStoreBudgetsStore) HasIntegrationId() bool`
+
+HasIntegrationId returns a boolean if a field has been set.
+
+### SetIntegrationId
+
+`func (o *ListCampaignStoreBudgetsStore) SetIntegrationId(v string)`
+
+SetIntegrationId gets a reference to the given string and assigns it to the IntegrationId field.
+
+### GetName
+
+`func (o *ListCampaignStoreBudgetsStore) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *ListCampaignStoreBudgetsStore) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *ListCampaignStoreBudgetsStore) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *ListCampaignStoreBudgetsStore) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LoyaltyCard.md b/docs/LoyaltyCard.md
index 0cff8eec..40dfa555 100644
--- a/docs/LoyaltyCard.md
+++ b/docs/LoyaltyCard.md
@@ -7,6 +7,8 @@ Name | Type | Description | Notes
**Id** | Pointer to **int32** | Internal ID of this entity. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**ProgramID** | Pointer to **int32** | The ID of the loyalty program that owns this entity. |
+**ProgramName** | Pointer to **string** | The integration name of the loyalty program that owns this entity. | [optional]
+**ProgramTitle** | Pointer to **string** | The Campaign Manager-displayed name of the loyalty program that owns this entity. | [optional]
**Status** | Pointer to **string** | Status of the loyalty card. Can be `active` or `inactive`. |
**BlockReason** | Pointer to **string** | Reason for transferring and blocking the loyalty card. | [optional]
**Identifier** | Pointer to **string** | The alphanumeric identifier of the loyalty card. |
@@ -96,6 +98,56 @@ HasProgramID returns a boolean if a field has been set.
SetProgramID gets a reference to the given int32 and assigns it to the ProgramID field.
+### GetProgramName
+
+`func (o *LoyaltyCard) GetProgramName() string`
+
+GetProgramName returns the ProgramName field if non-nil, zero value otherwise.
+
+### GetProgramNameOk
+
+`func (o *LoyaltyCard) GetProgramNameOk() (string, bool)`
+
+GetProgramNameOk returns a tuple with the ProgramName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProgramName
+
+`func (o *LoyaltyCard) HasProgramName() bool`
+
+HasProgramName returns a boolean if a field has been set.
+
+### SetProgramName
+
+`func (o *LoyaltyCard) SetProgramName(v string)`
+
+SetProgramName gets a reference to the given string and assigns it to the ProgramName field.
+
+### GetProgramTitle
+
+`func (o *LoyaltyCard) GetProgramTitle() string`
+
+GetProgramTitle returns the ProgramTitle field if non-nil, zero value otherwise.
+
+### GetProgramTitleOk
+
+`func (o *LoyaltyCard) GetProgramTitleOk() (string, bool)`
+
+GetProgramTitleOk returns a tuple with the ProgramTitle field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProgramTitle
+
+`func (o *LoyaltyCard) HasProgramTitle() bool`
+
+HasProgramTitle returns a boolean if a field has been set.
+
+### SetProgramTitle
+
+`func (o *LoyaltyCard) SetProgramTitle(v string)`
+
+SetProgramTitle gets a reference to the given string and assigns it to the ProgramTitle field.
+
### GetStatus
`func (o *LoyaltyCard) GetStatus() string`
diff --git a/docs/LoyaltyCardBatch.md b/docs/LoyaltyCardBatch.md
index 5c844da9..400b4138 100644
--- a/docs/LoyaltyCardBatch.md
+++ b/docs/LoyaltyCardBatch.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**NumberOfCards** | Pointer to **int32** | Number of loyalty cards in the batch. |
**BatchId** | Pointer to **string** | ID of the loyalty card batch. | [optional]
**Status** | Pointer to **string** | Status of the loyalty cards in the batch. | [optional] [default to STATUS_ACTIVE]
+**CardCodeSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
## Methods
@@ -85,6 +86,31 @@ HasStatus returns a boolean if a field has been set.
SetStatus gets a reference to the given string and assigns it to the Status field.
+### GetCardCodeSettings
+
+`func (o *LoyaltyCardBatch) GetCardCodeSettings() CodeGeneratorSettings`
+
+GetCardCodeSettings returns the CardCodeSettings field if non-nil, zero value otherwise.
+
+### GetCardCodeSettingsOk
+
+`func (o *LoyaltyCardBatch) GetCardCodeSettingsOk() (CodeGeneratorSettings, bool)`
+
+GetCardCodeSettingsOk returns a tuple with the CardCodeSettings field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCardCodeSettings
+
+`func (o *LoyaltyCardBatch) HasCardCodeSettings() bool`
+
+HasCardCodeSettings returns a boolean if a field has been set.
+
+### SetCardCodeSettings
+
+`func (o *LoyaltyCardBatch) SetCardCodeSettings(v CodeGeneratorSettings)`
+
+SetCardCodeSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CardCodeSettings field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltyProgram.md b/docs/LoyaltyProgram.md
index 9b83e641..67fc44d5 100644
--- a/docs/LoyaltyProgram.md
+++ b/docs/LoyaltyProgram.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | Pointer to **int32** | The ID of loyalty program. Internal ID of this entity. |
+**Id** | Pointer to **int32** | The ID of loyalty program. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**Title** | Pointer to **string** | The display title for the Loyalty Program. |
**Description** | Pointer to **string** | Description of our Loyalty Program. |
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires and is reevaluated. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional]
**TiersDowngradePolicy** | Pointer to **string** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional]
**CardCodeSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**ReturnPolicy** | Pointer to **string** | The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative. | [optional]
**AccountID** | Pointer to **int32** | The ID of the Talon.One account that owns this program. |
**Name** | Pointer to **string** | The internal name for the Loyalty Program. This is an immutable value. |
**Tiers** | Pointer to [**[]LoyaltyTier**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional]
@@ -433,6 +434,31 @@ HasCardCodeSettings returns a boolean if a field has been set.
SetCardCodeSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CardCodeSettings field.
+### GetReturnPolicy
+
+`func (o *LoyaltyProgram) GetReturnPolicy() string`
+
+GetReturnPolicy returns the ReturnPolicy field if non-nil, zero value otherwise.
+
+### GetReturnPolicyOk
+
+`func (o *LoyaltyProgram) GetReturnPolicyOk() (string, bool)`
+
+GetReturnPolicyOk returns a tuple with the ReturnPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasReturnPolicy
+
+`func (o *LoyaltyProgram) HasReturnPolicy() bool`
+
+HasReturnPolicy returns a boolean if a field has been set.
+
+### SetReturnPolicy
+
+`func (o *LoyaltyProgram) SetReturnPolicy(v string)`
+
+SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+
### GetAccountID
`func (o *LoyaltyProgram) GetAccountID() int32`
diff --git a/docs/LoyaltyProgramBalance.md b/docs/LoyaltyProgramBalance.md
index c8afac89..398ceff6 100644
--- a/docs/LoyaltyProgramBalance.md
+++ b/docs/LoyaltyProgramBalance.md
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
**PendingBalance** | Pointer to **float32** | Sum of pending points. |
**ExpiredBalance** | Pointer to **float32** | **DEPRECATED** Value is shown as 0. |
**SpentBalance** | Pointer to **float32** | **DEPRECATED** Value is shown as 0. |
-**TentativeCurrentBalance** | Pointer to **float32** | Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied. |
-**TentativePendingBalance** | Pointer to **float32** | Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied. | [optional]
+**TentativeCurrentBalance** | Pointer to **float32** | The tentative points balance, reflecting the `currentBalance` and all point additions and deductions within the current open customer session. When the session is closed, the effects are applied and the `currentBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. |
+**TentativePendingBalance** | Pointer to **float32** | The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. | [optional]
## Methods
diff --git a/docs/LoyaltyProgramEntity.md b/docs/LoyaltyProgramEntity.md
index 24ff37fc..76b5bb00 100644
--- a/docs/LoyaltyProgramEntity.md
+++ b/docs/LoyaltyProgramEntity.md
@@ -5,6 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ProgramID** | Pointer to **int32** | The ID of the loyalty program that owns this entity. |
+**ProgramName** | Pointer to **string** | The integration name of the loyalty program that owns this entity. | [optional]
+**ProgramTitle** | Pointer to **string** | The Campaign Manager-displayed name of the loyalty program that owns this entity. | [optional]
## Methods
@@ -33,6 +35,56 @@ HasProgramID returns a boolean if a field has been set.
SetProgramID gets a reference to the given int32 and assigns it to the ProgramID field.
+### GetProgramName
+
+`func (o *LoyaltyProgramEntity) GetProgramName() string`
+
+GetProgramName returns the ProgramName field if non-nil, zero value otherwise.
+
+### GetProgramNameOk
+
+`func (o *LoyaltyProgramEntity) GetProgramNameOk() (string, bool)`
+
+GetProgramNameOk returns a tuple with the ProgramName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProgramName
+
+`func (o *LoyaltyProgramEntity) HasProgramName() bool`
+
+HasProgramName returns a boolean if a field has been set.
+
+### SetProgramName
+
+`func (o *LoyaltyProgramEntity) SetProgramName(v string)`
+
+SetProgramName gets a reference to the given string and assigns it to the ProgramName field.
+
+### GetProgramTitle
+
+`func (o *LoyaltyProgramEntity) GetProgramTitle() string`
+
+GetProgramTitle returns the ProgramTitle field if non-nil, zero value otherwise.
+
+### GetProgramTitleOk
+
+`func (o *LoyaltyProgramEntity) GetProgramTitleOk() (string, bool)`
+
+GetProgramTitleOk returns a tuple with the ProgramTitle field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProgramTitle
+
+`func (o *LoyaltyProgramEntity) HasProgramTitle() bool`
+
+HasProgramTitle returns a boolean if a field has been set.
+
+### SetProgramTitle
+
+`func (o *LoyaltyProgramEntity) SetProgramTitle(v string)`
+
+SetProgramTitle gets a reference to the given string and assigns it to the ProgramTitle field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltyTier.md b/docs/LoyaltyTier.md
index 30a29890..2158939b 100644
--- a/docs/LoyaltyTier.md
+++ b/docs/LoyaltyTier.md
@@ -7,8 +7,10 @@ Name | Type | Description | Notes
**Id** | Pointer to **int32** | Internal ID of this entity. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**ProgramID** | Pointer to **int32** | The ID of the loyalty program that owns this entity. |
-**Name** | Pointer to **string** | The name of the tier |
-**MinPoints** | Pointer to **float32** | The minimum amount of points required to be eligible for the tier. |
+**ProgramName** | Pointer to **string** | The integration name of the loyalty program that owns this entity. | [optional]
+**ProgramTitle** | Pointer to **string** | The Campaign Manager-displayed name of the loyalty program that owns this entity. | [optional]
+**Name** | Pointer to **string** | The name of the tier. |
+**MinPoints** | Pointer to **float32** | The minimum amount of points required to enter the tier. |
## Methods
@@ -87,6 +89,56 @@ HasProgramID returns a boolean if a field has been set.
SetProgramID gets a reference to the given int32 and assigns it to the ProgramID field.
+### GetProgramName
+
+`func (o *LoyaltyTier) GetProgramName() string`
+
+GetProgramName returns the ProgramName field if non-nil, zero value otherwise.
+
+### GetProgramNameOk
+
+`func (o *LoyaltyTier) GetProgramNameOk() (string, bool)`
+
+GetProgramNameOk returns a tuple with the ProgramName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProgramName
+
+`func (o *LoyaltyTier) HasProgramName() bool`
+
+HasProgramName returns a boolean if a field has been set.
+
+### SetProgramName
+
+`func (o *LoyaltyTier) SetProgramName(v string)`
+
+SetProgramName gets a reference to the given string and assigns it to the ProgramName field.
+
+### GetProgramTitle
+
+`func (o *LoyaltyTier) GetProgramTitle() string`
+
+GetProgramTitle returns the ProgramTitle field if non-nil, zero value otherwise.
+
+### GetProgramTitleOk
+
+`func (o *LoyaltyTier) GetProgramTitleOk() (string, bool)`
+
+GetProgramTitleOk returns a tuple with the ProgramTitle field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProgramTitle
+
+`func (o *LoyaltyTier) HasProgramTitle() bool`
+
+HasProgramTitle returns a boolean if a field has been set.
+
+### SetProgramTitle
+
+`func (o *LoyaltyTier) SetProgramTitle(v string)`
+
+SetProgramTitle gets a reference to the given string and assigns it to the ProgramTitle field.
+
### GetName
`func (o *LoyaltyTier) GetName() string`
diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md
index 6d09b969..9d81d887 100644
--- a/docs/ManagementApi.md
+++ b/docs/ManagementApi.md
@@ -1,6 +1,6 @@
# \ManagementApi
-All URIs are relative to *https://yourbaseurl.talon.one*
+All URLs are relative to `https://yourbaseurl.talon.one`.
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -63,7 +63,6 @@ Method | HTTP request | Description
[**GetAchievement**](ManagementApi.md#GetAchievement) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Get achievement
[**GetAdditionalCost**](ManagementApi.md#GetAdditionalCost) | **Get** /v1/additional_costs/{additionalCostId} | Get additional cost
[**GetAdditionalCosts**](ManagementApi.md#GetAdditionalCosts) | **Get** /v1/additional_costs | List additional costs
-[**GetAllAccessLogs**](ManagementApi.md#GetAllAccessLogs) | **Get** /v1/access_logs | List access logs
[**GetApplication**](ManagementApi.md#GetApplication) | **Get** /v1/applications/{applicationId} | Get Application
[**GetApplicationApiHealth**](ManagementApi.md#GetApplicationApiHealth) | **Get** /v1/applications/{applicationId}/health_report | Get Application health
[**GetApplicationCustomer**](ManagementApi.md#GetApplicationCustomer) | **Get** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer
@@ -175,24 +174,19 @@ Method | HTTP request | Description
## ActivateUserByEmail
-> ActivateUserByEmail(ctx).Body(body).Execute()
+> ActivateUserByEmail(ctx, body)
Enable user by email address
+Enable a [disabled user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiActivateUserByEmailRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ActivateUserRequest**](ActivateUserRequest.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | **DeactivateUserRequest**| body |
### Return type
@@ -214,31 +208,21 @@ Name | Type | Description | Notes
## AddLoyaltyCardPoints
-> AddLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute()
+> AddLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId, body)
Add points to card
+Add points to the given loyalty card in the specified card-based loyalty program.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiAddLoyaltyCardPointsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**AddLoyaltyPoints**](AddLoyaltyPoints.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**body** | [**AddLoyaltyPoints**](AddLoyaltyPoints.md)| body |
### Return type
@@ -260,31 +244,21 @@ Name | Type | Description | Notes
## AddLoyaltyPoints
-> AddLoyaltyPoints(ctx, loyaltyProgramId, integrationId).Body(body).Execute()
+> AddLoyaltyPoints(ctx, loyaltyProgramId, integrationId, body)
Add points to customer profile
+Add points in the specified loyalty program for the given customer. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
-**integrationId** | **string** | The identifier of the profile. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiAddLoyaltyPointsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**AddLoyaltyPoints**](AddLoyaltyPoints.md) | body |
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+**integrationId** | **string**| The identifier of the profile. |
+**body** | [**AddLoyaltyPoints**](AddLoyaltyPoints.md)| body |
### Return type
@@ -306,35 +280,25 @@ Name | Type | Description | Notes
## CopyCampaignToApplications
-> InlineResponse2006 CopyCampaignToApplications(ctx, applicationId, campaignId).Body(body).Execute()
+> InlineResponse2006 CopyCampaignToApplications(ctx, applicationId, campaignId, body)
Copy the campaign into the specified Application
+Copy the campaign into all specified Applications.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCopyCampaignToApplicationsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**CampaignCopy**](CampaignCopy.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**CampaignCopy**](CampaignCopy.md)| body |
### Return type
-[**InlineResponse2006**](inline_response_200_6.md)
+[**InlineResponse2006**](InlineResponse2006.md)
### Authorization
@@ -352,24 +316,19 @@ Name | Type | Description | Notes
## CreateAccountCollection
-> Collection CreateAccountCollection(ctx).Body(body).Execute()
+> Collection CreateAccountCollection(ctx, body)
Create account-level collection
+Create an account-level collection.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateAccountCollectionRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewCollection**](NewCollection.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewCollection**](NewCollection.md)| body |
### Return type
@@ -391,31 +350,21 @@ Name | Type | Description | Notes
## CreateAchievement
-> Achievement CreateAchievement(ctx, applicationId, campaignId).Body(body).Execute()
+> Achievement CreateAchievement(ctx, applicationId, campaignId, body)
Create achievement
+Create a new achievement in a specific campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateAchievementRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**CreateAchievement**](CreateAchievement.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**CreateAchievement**](CreateAchievement.md)| body |
### Return type
@@ -437,24 +386,19 @@ Name | Type | Description | Notes
## CreateAdditionalCost
-> AccountAdditionalCost CreateAdditionalCost(ctx).Body(body).Execute()
+> AccountAdditionalCost CreateAdditionalCost(ctx, body)
Create additional cost
+Create an [additional cost](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). These additional costs are shared across all applications in your account, and are never required.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateAdditionalCostRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewAdditionalCost**](NewAdditionalCost.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewAdditionalCost**](NewAdditionalCost.md)| body |
### Return type
@@ -476,24 +420,19 @@ Name | Type | Description | Notes
## CreateAttribute
-> Attribute CreateAttribute(ctx).Body(body).Execute()
+> Attribute CreateAttribute(ctx, body)
Create custom attribute
+Create a _custom attribute_ in this account. [Custom attributes](https://docs.talon.one/docs/dev/concepts/attributes) allow you to add data to Talon.One domain entities like campaigns, coupons, customers and so on. These attributes can then be given values when creating/updating these entities, and these values can be used in your campaign rules. For example, you could define a `zipCode` field for customer sessions, and add a rule to your campaign that only allows certain ZIP codes. These attributes are shared across all Applications in your account and are never required.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateAttributeRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewAttribute**](NewAttribute.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewAttribute**](NewAttribute.md)| body |
### Return type
@@ -515,29 +454,20 @@ Name | Type | Description | Notes
## CreateBatchLoyaltyCards
-> LoyaltyCardBatchResponse CreateBatchLoyaltyCards(ctx, loyaltyProgramId).Body(body).Execute()
+> LoyaltyCardBatchResponse CreateBatchLoyaltyCards(ctx, loyaltyProgramId, body)
Create loyalty cards
+Create a batch of loyalty cards in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. **Important:** - The specified card-based loyalty program must have a defined card code format that is used to generate the loyalty card codes. - Trying to create more than 20,000 loyalty cards in a single request returns an error message with a `400` status code.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateBatchLoyaltyCardsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**LoyaltyCardBatch**](LoyaltyCardBatch.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**body** | [**LoyaltyCardBatch**](LoyaltyCardBatch.md)| body |
### Return type
@@ -559,29 +489,20 @@ Name | Type | Description | Notes
## CreateCampaignFromTemplate
-> CreateTemplateCampaignResponse CreateCampaignFromTemplate(ctx, applicationId).Body(body).Execute()
+> CreateTemplateCampaignResponse CreateCampaignFromTemplate(ctx, applicationId, body)
Create campaign from campaign template
+Use the campaign template referenced in the request body to create a new campaign in one of the connected Applications. If the template was created from a campaign with rules referencing [campaign collections](https://docs.talon.one/docs/product/campaigns/managing-collections), the corresponding collections for the new campaign are created automatically.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateCampaignFromTemplateRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**CreateTemplateCampaign**](CreateTemplateCampaign.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**body** | [**CreateTemplateCampaign**](CreateTemplateCampaign.md)| body |
### Return type
@@ -603,31 +524,21 @@ Name | Type | Description | Notes
## CreateCollection
-> Collection CreateCollection(ctx, applicationId, campaignId).Body(body).Execute()
+> Collection CreateCollection(ctx, applicationId, campaignId, body)
Create campaign-level collection
+Create a campaign-level collection in a given campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**NewCampaignCollection**](NewCampaignCollection.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewCampaignCollection**](NewCampaignCollection.md)| body |
### Return type
@@ -649,36 +560,38 @@ Name | Type | Description | Notes
## CreateCoupons
-> InlineResponse2008 CreateCoupons(ctx, applicationId, campaignId).Body(body).Silent(silent).Execute()
+> InlineResponse2008 CreateCoupons(ctx, applicationId, campaignId, body, optional)
Create coupons
+Create coupons according to some pattern. Up to 20.000 coupons can be created without a unique prefix. When a unique prefix is provided, up to 200.000 coupons can be created.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewCoupons**](NewCoupons.md)| body |
+ **optional** | ***CreateCouponsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiCreateCouponsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a CreateCouponsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewCoupons**](NewCoupons.md) | body |
- **silent** | **string** | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
+
+ **silent** | **optional.**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
### Return type
-[**InlineResponse2008**](inline_response_200_8.md)
+[**InlineResponse2008**](InlineResponse2008.md)
### Authorization
@@ -696,31 +609,21 @@ Name | Type | Description | Notes
## CreateCouponsAsync
-> AsyncCouponCreationResponse CreateCouponsAsync(ctx, applicationId, campaignId).Body(body).Execute()
+> AsyncCouponCreationResponse CreateCouponsAsync(ctx, applicationId, campaignId, body)
Create coupons asynchronously
+Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete. If you want to create less than 20,001 coupons, you can use the [Create coupons](https://docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateCouponsAsyncRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**NewCouponCreationJob**](NewCouponCreationJob.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewCouponCreationJob**](NewCouponCreationJob.md)| body |
### Return type
@@ -742,31 +645,21 @@ Name | Type | Description | Notes
## CreateCouponsDeletionJob
-> AsyncCouponDeletionJobResponse CreateCouponsDeletionJob(ctx, applicationId, campaignId).Body(body).Execute()
+> AsyncCouponDeletionJobResponse CreateCouponsDeletionJob(ctx, applicationId, campaignId, body)
Creates a coupon deletion job
+This endpoint handles creating a job to delete coupons asynchronously.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateCouponsDeletionJobRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**NewCouponDeletionJob**](NewCouponDeletionJob.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewCouponDeletionJob**](NewCouponDeletionJob.md)| body |
### Return type
@@ -788,36 +681,38 @@ Name | Type | Description | Notes
## CreateCouponsForMultipleRecipients
-> InlineResponse2008 CreateCouponsForMultipleRecipients(ctx, applicationId, campaignId).Body(body).Silent(silent).Execute()
+> InlineResponse2008 CreateCouponsForMultipleRecipients(ctx, applicationId, campaignId, body, optional)
Create coupons for multiple recipients
+Create coupons according to some pattern for up to 1000 recipients.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewCouponsForMultipleRecipients**](NewCouponsForMultipleRecipients.md)| body |
+ **optional** | ***CreateCouponsForMultipleRecipientsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiCreateCouponsForMultipleRecipientsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a CreateCouponsForMultipleRecipientsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewCouponsForMultipleRecipients**](NewCouponsForMultipleRecipients.md) | body |
- **silent** | **string** | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
+
+ **silent** | **optional.**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [default to yes]
### Return type
-[**InlineResponse2008**](inline_response_200_8.md)
+[**InlineResponse2008**](InlineResponse2008.md)
### Authorization
@@ -835,24 +730,19 @@ Name | Type | Description | Notes
## CreateInviteEmail
-> NewInviteEmail CreateInviteEmail(ctx).Body(body).Execute()
+> NewInviteEmail CreateInviteEmail(ctx, body)
Resend invitation email
+Resend an email invitation to an existing user. **Note:** The invitation token is valid for 24 hours after the email has been sent.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateInviteEmailRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewInviteEmail**](NewInviteEmail.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewInviteEmail**](NewInviteEmail.md)| body |
### Return type
@@ -874,24 +764,19 @@ Name | Type | Description | Notes
## CreateInviteV2
-> User CreateInviteV2(ctx).Body(body).Execute()
+> User CreateInviteV2(ctx, body)
Invite user
+Create a new user in the account and send an invitation to their email address. **Note**: The invitation token is valid for 24 hours after the email has been sent. You can resend an invitation to a user with the [Resend invitation email](https://docs.talon.one/management-api#tag/Accounts-and-users/operation/createInviteEmail) endpoint.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateInviteV2Request struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewInvitation**](NewInvitation.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewInvitation**](NewInvitation.md)| body |
### Return type
@@ -913,24 +798,19 @@ Name | Type | Description | Notes
## CreatePasswordRecoveryEmail
-> NewPasswordEmail CreatePasswordRecoveryEmail(ctx).Body(body).Execute()
+> NewPasswordEmail CreatePasswordRecoveryEmail(ctx, body)
Request a password reset
+Send an email with a password recovery link to the email address of an existing account. **Note:** The password recovery link expires 30 minutes after this endpoint is triggered.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreatePasswordRecoveryEmailRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewPasswordEmail**](NewPasswordEmail.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewPasswordEmail**](NewPasswordEmail.md)| body |
### Return type
@@ -952,24 +832,19 @@ Name | Type | Description | Notes
## CreateSession
-> Session CreateSession(ctx).Body(body).Execute()
+> Session CreateSession(ctx, body)
Create session
+Create a session to use the Management API endpoints. Use the value of the `token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do **not** regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup. Granular API key
Instead of using a session, you can also use the
Management API key feature in the Campaign Manager to decide which endpoints can be used with a given key.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateSessionRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**LoginParams**](LoginParams.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**LoginParams**](LoginParams.md)| body |
### Return type
@@ -991,29 +866,20 @@ Name | Type | Description | Notes
## CreateStore
-> Store CreateStore(ctx, applicationId).Body(body).Execute()
+> Store CreateStore(ctx, applicationId, body)
Create store
+Create a new store in a specific Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiCreateStoreRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NewStore**](NewStore.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewStore**](NewStore.md)| body |
### Return type
@@ -1035,24 +901,19 @@ Name | Type | Description | Notes
## DeactivateUserByEmail
-> DeactivateUserByEmail(ctx).Body(body).Execute()
+> DeactivateUserByEmail(ctx, body)
Disable user by email address
+[Disable a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeactivateUserByEmailRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**DeactivateUserRequest**](DeactivateUserRequest.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**DeactivateUserRequest**](DeactivateUserRequest.md)| body |
### Return type
@@ -1074,31 +935,21 @@ Name | Type | Description | Notes
## DeductLoyaltyCardPoints
-> DeductLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute()
+> DeductLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId, body)
Deduct points from card
+Deduct points from the given loyalty card in the specified card-based loyalty program.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeductLoyaltyCardPointsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**DeductLoyaltyPoints**](DeductLoyaltyPoints.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**body** | [**DeductLoyaltyPoints**](DeductLoyaltyPoints.md)| body |
### Return type
@@ -1120,28 +971,19 @@ Name | Type | Description | Notes
## DeleteAccountCollection
-> DeleteAccountCollection(ctx, collectionId).Execute()
+> DeleteAccountCollection(ctx, collectionId)
Delete account-level collection
+Delete a given account-level collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteAccountCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
### Return type
@@ -1163,32 +1005,21 @@ Name | Type | Description | Notes
## DeleteAchievement
-> DeleteAchievement(ctx, applicationId, campaignId, achievementId).Execute()
+> DeleteAchievement(ctx, applicationId, campaignId, achievementId)
Delete achievement
+Delete the specified achievement.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteAchievementRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**achievementId** | **int32**| The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
### Return type
@@ -1210,30 +1041,20 @@ Name | Type | Description | Notes
## DeleteCampaign
-> DeleteCampaign(ctx, applicationId, campaignId).Execute()
+> DeleteCampaign(ctx, applicationId, campaignId)
Delete campaign
+Delete the given campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteCampaignRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
### Return type
@@ -1255,32 +1076,21 @@ Name | Type | Description | Notes
## DeleteCollection
-> DeleteCollection(ctx, applicationId, campaignId, collectionId).Execute()
+> DeleteCollection(ctx, applicationId, campaignId, collectionId)
Delete campaign-level collection
+Delete a given campaign-level collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
### Return type
@@ -1302,32 +1112,21 @@ Name | Type | Description | Notes
## DeleteCoupon
-> DeleteCoupon(ctx, applicationId, campaignId, couponId).Execute()
+> DeleteCoupon(ctx, applicationId, campaignId, couponId)
Delete coupon
+Delete the specified coupon.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**couponId** | **string** | The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteCouponRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**couponId** | **string**| The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. |
### Return type
@@ -1349,43 +1148,44 @@ Name | Type | Description | Notes
## DeleteCoupons
-> DeleteCoupons(ctx, applicationId, campaignId).Value(value).CreatedBefore(createdBefore).CreatedAfter(createdAfter).StartsAfter(startsAfter).StartsBefore(startsBefore).ExpiresAfter(expiresAfter).ExpiresBefore(expiresBefore).Valid(valid).BatchId(batchId).Usable(usable).ReferralId(referralId).RecipientIntegrationId(recipientIntegrationId).ExactMatch(exactMatch).Execute()
+> DeleteCoupons(ctx, applicationId, campaignId, optional)
Delete coupons
+Deletes all the coupons matching the specified criteria.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***DeleteCouponsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiDeleteCouponsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a DeleteCouponsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **value** | **string** | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **startsAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **startsBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **expiresAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **expiresBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. |
- **batchId** | **string** | Filter results by batches of coupons |
- **usable** | **string** | - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. |
- **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
- **recipientIntegrationId** | **string** | Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. |
- **exactMatch** | **bool** | Filter results to an exact case-insensitive matching against the coupon code | [default to false]
+ **value** | **optional.**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **startsAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **startsBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **expiresAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **expiresBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. |
+ **batchId** | **optional.**| Filter results by batches of coupons |
+ **usable** | **optional.**| - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. |
+ **referralId** | **optional.**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
+ **recipientIntegrationId** | **optional.**| Filter results by match with a profile ID specified in the coupon's `RecipientIntegrationId` field. |
+ **exactMatch** | **optional.**| Filter results to an exact case-insensitive matching against the coupon code | [default to false]
### Return type
@@ -1407,30 +1207,20 @@ Name | Type | Description | Notes
## DeleteLoyaltyCard
-> DeleteLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId).Execute()
+> DeleteLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId)
Delete loyalty card
+Delete the given loyalty card.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteLoyaltyCardRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
### Return type
@@ -1452,32 +1242,21 @@ Name | Type | Description | Notes
## DeleteReferral
-> DeleteReferral(ctx, applicationId, campaignId, referralId).Execute()
+> DeleteReferral(ctx, applicationId, campaignId, referralId)
Delete referral
+Delete the specified referral.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**referralId** | **string** | The ID of the referral code. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteReferralRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**referralId** | **string**| The ID of the referral code. |
### Return type
@@ -1499,30 +1278,20 @@ Name | Type | Description | Notes
## DeleteStore
-> DeleteStore(ctx, applicationId, storeId).Execute()
+> DeleteStore(ctx, applicationId, storeId)
Delete store
+Delete the specified store.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**storeId** | **string** | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteStoreRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**storeId** | **string**| The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
### Return type
@@ -1544,28 +1313,19 @@ Name | Type | Description | Notes
## DeleteUser
-> DeleteUser(ctx, userId).Execute()
+> DeleteUser(ctx, userId)
Delete user
+Delete a specific user.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**userId** | **int32**| The ID of the user. |
### Return type
@@ -1587,24 +1347,19 @@ Name | Type | Description | Notes
## DeleteUserByEmail
-> DeleteUserByEmail(ctx).Body(body).Execute()
+> DeleteUserByEmail(ctx, body)
Delete user by email address
+[Delete a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDeleteUserByEmailRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**DeleteUserRequest**](DeleteUserRequest.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | **DeactivateUserRequest**| body |
### Return type
@@ -1626,21 +1381,16 @@ Name | Type | Description | Notes
## DestroySession
-> DestroySession(ctx).Execute()
+> DestroySession(ctx, )
Destroy session
+Destroys the session.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDestroySessionRequest struct via the builder pattern
-
-
### Return type
(empty response body)
@@ -1661,30 +1411,20 @@ Other parameters are passed through a pointer to a apiDestroySessionRequest stru
## DisconnectCampaignStores
-> DisconnectCampaignStores(ctx, applicationId, campaignId).Execute()
+> DisconnectCampaignStores(ctx, applicationId, campaignId)
Disconnect stores
+Disconnect the stores linked to a specific campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiDisconnectCampaignStoresRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
### Return type
@@ -1706,28 +1446,19 @@ Name | Type | Description | Notes
## ExportAccountCollectionItems
-> string ExportAccountCollectionItems(ctx, collectionId).Execute()
+> string ExportAccountCollectionItems(ctx, collectionId)
Export account-level collection's items
+Download a CSV file containing items from a given account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiExportAccountCollectionItemsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
### Return type
@@ -1749,32 +1480,21 @@ Name | Type | Description | Notes
## ExportAchievements
-> string ExportAchievements(ctx, applicationId, campaignId, achievementId).Execute()
+> string ExportAchievements(ctx, applicationId, campaignId, achievementId)
Export achievement customer data
+Download a CSV file containing a list of all the customers who have participated in and are currently participating in the given achievement. The CSV file contains the following columns: - `profileIntegrationID`: The integration ID of the customer profile participating in the achievement. - `title`: The display name of the achievement in the Campaign Manager. - `target`: The required number of actions or the transactional milestone to complete the achievement. - `progress`: The current progress of the customer in the achievement. - `status`: The status of the achievement. Can be one of: ['inprogress', 'completed', 'expired']. - `startDate`: The date on which the customer profile started the achievement in RFC3339. - `endDate`: The date on which the achievement ends and resets for the customer profile in RFC3339. - `completionDate`: The date on which the customer profile completed the achievement in RFC3339.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiExportAchievementsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**achievementId** | **int32**| The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
### Return type
@@ -1796,28 +1516,19 @@ Name | Type | Description | Notes
## ExportAudiencesMemberships
-> string ExportAudiencesMemberships(ctx, audienceId).Execute()
+> string ExportAudiencesMemberships(ctx, audienceId)
Export audience members
+Download a CSV file containing the integration IDs of the members of an audience. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The file contains the following column: - `profileintegrationid`: The integration ID of the customer profile.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiExportAudiencesMembershipsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**audienceId** | **int32**| The ID of the audience. |
### Return type
@@ -1839,30 +1550,20 @@ Name | Type | Description | Notes
## ExportCampaignStores
-> string ExportCampaignStores(ctx, applicationId, campaignId).Execute()
+> string ExportCampaignStores(ctx, applicationId, campaignId)
Export stores
+Download a CSV file containing the stores linked to a specific campaign. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following column: - `store_integration_id`: The identifier of the store.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiExportCampaignStoresRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
### Return type
@@ -1884,32 +1585,21 @@ Name | Type | Description | Notes
## ExportCollectionItems
-> string ExportCollectionItems(ctx, applicationId, campaignId, collectionId).Execute()
+> string ExportCollectionItems(ctx, applicationId, campaignId, collectionId)
Export campaign-level collection's items
+Download a CSV file containing items from a given campaign-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiExportCollectionItemsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
### Return type
@@ -1931,42 +1621,43 @@ Name | Type | Description | Notes
## ExportCoupons
-> string ExportCoupons(ctx, applicationId).CampaignId(campaignId).Sort(sort).Value(value).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Valid(valid).Usable(usable).ReferralId(referralId).RecipientIntegrationId(recipientIntegrationId).BatchId(batchId).ExactMatch(exactMatch).DateFormat(dateFormat).CampaignState(campaignState).ValuesOnly(valuesOnly).Execute()
+> string ExportCoupons(ctx, applicationId, optional)
Export coupons
+Download a CSV file containing the coupons that match the given properties. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file can contain the following columns: - `accountid`: The ID of your deployment. - `applicationid`: The ID of the Application this coupon is related to. - `attributes`: A json object describing _custom_ referral attribute names and their values. - `batchid`: The ID of the batch this coupon is part of. - `campaignid`: The ID of the campaign this coupon is related to. - `counter`: The number of times this coupon has been redeemed. - `created`: The creation date in RFC3339 of the coupon code. - `deleted`: Whether the coupon code is deleted. - `deleted_changelogid`: The ID of the delete event in the logs. - `discount_counter`: The amount of discount given by this coupon. - `discount_limitval`: The maximum discount amount that can be given be this coupon. - `expirydate`: The end date in RFC3339 of the code redemption period. - `id`: The internal ID of the coupon code. - `importid`: The ID of the import job that created this coupon. - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - `limits`: The limits set on this coupon. - `limitval`: The maximum number of redemptions of this code. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ExportCouponsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportCouponsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportCouponsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **campaignId** | **float32** | Filter results by campaign. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **value** | **string** | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
- **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
- **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
- **recipientIntegrationId** | **string** | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. |
- **batchId** | **string** | Filter results by batches of coupons |
- **exactMatch** | **bool** | Filter results to an exact case-insensitive matching against the coupon code. | [default to false]
- **dateFormat** | **string** | Determines the format of dates in the export document. |
- **campaignState** | **string** | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
- **valuesOnly** | **bool** | Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [default to false]
+ **campaignId** | **optional.**| Filter results by campaign ID. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **value** | **optional.**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
+ **usable** | **optional.**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
+ **referralId** | **optional.**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
+ **recipientIntegrationId** | **optional.**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. |
+ **batchId** | **optional.**| Filter results by batches of coupons |
+ **exactMatch** | **optional.**| Filter results to an exact case-insensitive matching against the coupon code. | [default to false]
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
+ **campaignState** | **optional.**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
+ **valuesOnly** | **optional.**| Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [default to false]
### Return type
@@ -1988,33 +1679,34 @@ Name | Type | Description | Notes
## ExportCustomerSessions
-> string ExportCustomerSessions(ctx, applicationId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).ProfileIntegrationId(profileIntegrationId).DateFormat(dateFormat).CustomerSessionState(customerSessionState).Execute()
+> string ExportCustomerSessions(ctx, applicationId, optional)
Export customer sessions
+Download a CSV file containing the customer sessions that match the request. **Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - `id`: The internal ID of the session. - `firstsession`: Whether this is a first session. - `integrationid`: The integration ID of the session. - `applicationid`: The ID of the Application. - `profileid`: The internal ID of the customer profile. - `profileintegrationid`: The integration ID of the customer profile. - `created`: The timestamp when the session was created. - `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session. - `cartitems`: The cart items in the session. - `discounts`: The discounts in the session. - `total`: The total value of cart items and additional costs in the session, before any discounts are applied. - `attributes`: The attributes set in the session. - `closedat`: Timestamp when the session was closed. - `cancelledat`: Timestamp when the session was cancelled. - `referral`: The referral code in the session. - `identifiers`: The identifiers in the session. - `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - `updated`: Timestamp of the last session update. - `store_integration_id`: The integration ID of the store. - `coupons`: Coupon codes in the session.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ExportCustomerSessionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportCustomerSessionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportCustomerSessionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. |
- **profileIntegrationId** | **string** | Only return sessions for the customer that matches this customer integration ID. |
- **dateFormat** | **string** | Determines the format of dates in the export document. |
- **customerSessionState** | **string** | Filter results by state. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. |
+ **profileIntegrationId** | **optional.**| Only return sessions for the customer that matches this customer integration ID. |
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
+ **customerSessionState** | **optional.**| Filter results by state. |
### Return type
@@ -2036,30 +1728,31 @@ Name | Type | Description | Notes
## ExportCustomersTiers
-> string ExportCustomersTiers(ctx, loyaltyProgramId).SubledgerIds(subledgerIds).TierNames(tierNames).Execute()
+> string ExportCustomersTiers(ctx, loyaltyProgramId, optional)
Export customers' tier data
+Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+ **optional** | ***ExportCustomersTiersOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportCustomersTiersRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportCustomersTiersOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **subledgerIds** | [**[]string**](string.md) | An array of subledgers IDs to filter the export by. |
- **tierNames** | [**[]string**](string.md) | An array of tier names to filter the export by. |
+ **subledgerIds** | [**optional.Interface of []string**](string.md)| An array of subledgers IDs to filter the export by. |
+ **tierNames** | [**optional.Interface of []string**](string.md)| An array of tier names to filter the export by. |
### Return type
@@ -2081,32 +1774,33 @@ Name | Type | Description | Notes
## ExportEffects
-> string ExportEffects(ctx, applicationId).CampaignId(campaignId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).DateFormat(dateFormat).Execute()
+> string ExportEffects(ctx, applicationId, optional)
Export triggered effects
+Download a CSV file containing the triggered effects that match the given attributes. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `applicationid`: The ID of the Application. - `campaignid`: The ID of the campaign. - `couponid`: The ID of the coupon, when applicable to the effect. - `created`: The timestamp of the effect. - `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/entities/events). - `eventid`: The internal ID of the effect. - `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). - `profileintegrationid`: The ID of the customer profile, when applicable. - `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - `ruleindex`: The index of the rule. - `rulesetid`: The ID of the rule set. - `sessionid`: The internal ID of the session that triggered the effect. - `profileid`: The internal ID of the customer profile. - `sessionintegrationid`: The integration ID of the session. - `total_revenue`: The total revenue. - `store_integration_id`: The integration ID of the store. You choose this ID when you create a store.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ExportEffectsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportEffectsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportEffectsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **campaignId** | **float32** | Filter results by campaign. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **dateFormat** | **string** | Determines the format of dates in the export document. |
+ **campaignId** | **optional.**| Filter results by campaign ID. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
### Return type
@@ -2128,29 +1822,30 @@ Name | Type | Description | Notes
## ExportLoyaltyBalance
-> string ExportLoyaltyBalance(ctx, loyaltyProgramId).EndDate(endDate).Execute()
+> string ExportLoyaltyBalance(ctx, loyaltyProgramId, optional)
Export customer loyalty balance to CSV
+⚠️ Deprecation notice: Support for requests to this endpoint will end soon. To export customer loyalty balances to CSV, use the [Export customer loyalty balances to CSV](/management-api#tag/Loyalty/operation/exportLoyaltyBalances) endpoint. Download a CSV file containing the balance of each customer in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+ **optional** | ***ExportLoyaltyBalanceOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportLoyaltyBalanceRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportLoyaltyBalanceOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
### Return type
@@ -2172,29 +1867,30 @@ Name | Type | Description | Notes
## ExportLoyaltyBalances
-> string ExportLoyaltyBalances(ctx, loyaltyProgramId).EndDate(endDate).Execute()
+> string ExportLoyaltyBalances(ctx, loyaltyProgramId, optional)
Export customer loyalty balances
+Download a CSV file containing the balance of each customer in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `profileIntegrationID`: The integration ID of the customer profile. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points. - `currentTier`: The tier that the customer is in at the time of the export.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+ **optional** | ***ExportLoyaltyBalancesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportLoyaltyBalancesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportLoyaltyBalancesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
### Return type
@@ -2216,29 +1912,30 @@ Name | Type | Description | Notes
## ExportLoyaltyCardBalances
-> string ExportLoyaltyCardBalances(ctx, loyaltyProgramId).EndDate(endDate).Execute()
+> string ExportLoyaltyCardBalances(ctx, loyaltyProgramId, optional)
Export all card transaction logs
+Download a CSV file containing the balances of all cards in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `cardIdentifier`: The alphanumeric identifier of the loyalty card. - `cardState`:The state of the loyalty card. It can be `active` or `inactive`. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***ExportLoyaltyCardBalancesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportLoyaltyCardBalancesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportLoyaltyCardBalancesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
### Return type
@@ -2260,33 +1957,36 @@ Name | Type | Description | Notes
## ExportLoyaltyCardLedger
-> string ExportLoyaltyCardLedger(ctx, loyaltyProgramId, loyaltyCardId).RangeStart(rangeStart).RangeEnd(rangeEnd).DateFormat(dateFormat).Execute()
+> string ExportLoyaltyCardLedger(ctx, loyaltyProgramId, loyaltyCardId, rangeStart, rangeEnd, optional)
Export card's ledger log
+Download a CSV file containing a loyalty card ledger log of the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**rangeStart** | **time.Time**| Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**rangeEnd** | **time.Time**| Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **optional** | ***ExportLoyaltyCardLedgerOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportLoyaltyCardLedgerRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportLoyaltyCardLedgerOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **dateFormat** | **string** | Determines the format of dates in the export document. |
+
+
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
### Return type
@@ -2308,29 +2008,31 @@ Name | Type | Description | Notes
## ExportLoyaltyCards
-> string ExportLoyaltyCards(ctx, loyaltyProgramId).BatchId(batchId).Execute()
+> string ExportLoyaltyCards(ctx, loyaltyProgramId, optional)
Export loyalty cards
+Download a CSV file containing the loyalty cards from a specified loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `identifier`: The unique identifier of the loyalty card. - `created`: The date and time the loyalty card was created. - `status`: The status of the loyalty card. - `userpercardlimit`: The maximum number of customer profiles that can be linked to the card. - `customerprofileids`: Integration IDs of the customer profiles linked to the card. - `blockreason`: The reason for transferring and blocking the loyalty card. - `generated`: An indicator of whether the loyalty card was generated. - `batchid`: The ID of the batch the loyalty card is in.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***ExportLoyaltyCardsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportLoyaltyCardsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportLoyaltyCardsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **batchId** | **string** | Filter results by loyalty card batch ID. |
+ **batchId** | **optional.**| Filter results by loyalty card batch ID. |
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
### Return type
@@ -2352,33 +2054,36 @@ Name | Type | Description | Notes
## ExportLoyaltyLedger
-> string ExportLoyaltyLedger(ctx, loyaltyProgramId, integrationId).RangeStart(rangeStart).RangeEnd(rangeEnd).DateFormat(dateFormat).Execute()
+> string ExportLoyaltyLedger(ctx, rangeStart, rangeEnd, loyaltyProgramId, integrationId, optional)
Export customer's transaction logs
+Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The transaction type, such as `addition` or `subtraction`. - `name`: The reason for the transaction. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
-**integrationId** | **string** | The identifier of the profile. |
+**rangeStart** | **time.Time**| Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**rangeEnd** | **time.Time**| Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+**integrationId** | **string**| The identifier of the profile. |
+ **optional** | ***ExportLoyaltyLedgerOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportLoyaltyLedgerRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportLoyaltyLedgerOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **dateFormat** | **string** | Determines the format of dates in the export document. |
+
+
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
### Return type
@@ -2400,30 +2105,31 @@ Name | Type | Description | Notes
## ExportPoolGiveaways
-> string ExportPoolGiveaways(ctx, poolId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute()
+> string ExportPoolGiveaways(ctx, poolId, optional)
Export giveaway codes of a giveaway pool
+Download a CSV file containing the giveaway codes of a specific giveaway pool. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `id`: The internal ID of the giveaway. - `poolid`: The internal ID of the giveaway pool. - `code`: The giveaway code. - `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). - `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). - `attributes`: Any custom attributes associated with the giveaway code (can be empty). - `used`: An indication of whether the giveaway is already awarded. - `importid`: The ID of the import which created the giveaway. - `created`: The creation time of the giveaway code. - `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. - `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**poolId** | **int32** | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. |
+**poolId** | **int32**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. |
+ **optional** | ***ExportPoolGiveawaysOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportPoolGiveawaysRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportPoolGiveawaysOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **createdBefore** | **time.Time** | Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. |
- **createdAfter** | **time.Time** | Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. |
+ **createdBefore** | **optional.**| Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. |
+ **createdAfter** | **optional.**| Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. |
### Return type
@@ -2445,35 +2151,36 @@ Name | Type | Description | Notes
## ExportReferrals
-> string ExportReferrals(ctx, applicationId).CampaignId(campaignId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Valid(valid).Usable(usable).BatchId(batchId).DateFormat(dateFormat).Execute()
+> string ExportReferrals(ctx, applicationId, optional)
Export referrals
+Download a CSV file containing the referrals that match the given parameters. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `code`: The referral code. - `advocateprofileintegrationid`: The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ExportReferralsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiExportReferralsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ExportReferralsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **campaignId** | **float32** | Filter results by campaign. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. |
- **usable** | **string** | - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. |
- **batchId** | **string** | Filter results by batches of referrals |
- **dateFormat** | **string** | Determines the format of dates in the export document. |
+ **campaignId** | **optional.**| Filter results by campaign ID. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. |
+ **usable** | **optional.**| - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. |
+ **batchId** | **optional.**| Filter results by batches of referrals |
+ **dateFormat** | **optional.**| Determines the format of dates in the export document. |
### Return type
@@ -2495,40 +2202,43 @@ Name | Type | Description | Notes
## GetAccessLogsWithoutTotalCount
-> InlineResponse20019 GetAccessLogsWithoutTotalCount(ctx, applicationId).RangeStart(rangeStart).RangeEnd(rangeEnd).Path(path).Method(method).Status(status).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse20019 GetAccessLogsWithoutTotalCount(ctx, applicationId, rangeStart, rangeEnd, optional)
Get access logs for Application
+Retrieve the list of API calls sent to the specified Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**rangeStart** | **time.Time**| Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**rangeEnd** | **time.Time**| Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **optional** | ***GetAccessLogsWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetAccessLogsWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetAccessLogsWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **path** | **string** | Only return results where the request path matches the given regular expression. |
- **method** | **string** | Only return results where the request method matches the given regular expression. |
- **status** | **string** | Filter results by HTTP status codes. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+
+
+ **path** | **optional.**| Only return results where the request path matches the given regular expression. |
+ **method** | **optional.**| Only return results where the request method matches the given regular expression. |
+ **status** | **optional.**| Filter results by HTTP status codes. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20019**](inline_response_200_19.md)
+[**InlineResponse20019**](InlineResponse20019.md)
### Authorization
@@ -2546,28 +2256,19 @@ Name | Type | Description | Notes
## GetAccount
-> Account GetAccount(ctx, accountId).Execute()
+> Account GetAccount(ctx, accountId)
Get account details
+Return the details of your companies Talon.One account.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**accountId** | **int32** | The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAccountRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**accountId** | **int32**| The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. |
### Return type
@@ -2589,28 +2290,19 @@ Name | Type | Description | Notes
## GetAccountAnalytics
-> AccountAnalytics GetAccountAnalytics(ctx, accountId).Execute()
+> AccountAnalytics GetAccountAnalytics(ctx, accountId)
Get account analytics
+Return the analytics of your Talon.One account.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**accountId** | **int32** | The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAccountAnalyticsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**accountId** | **int32**| The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. |
### Return type
@@ -2632,28 +2324,19 @@ Name | Type | Description | Notes
## GetAccountCollection
-> Collection GetAccountCollection(ctx, collectionId).Execute()
+> Collection GetAccountCollection(ctx, collectionId)
Get account-level collection
+Retrieve a given account-level collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAccountCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
### Return type
@@ -2675,32 +2358,21 @@ Name | Type | Description | Notes
## GetAchievement
-> Achievement GetAchievement(ctx, applicationId, campaignId, achievementId).Execute()
+> Achievement GetAchievement(ctx, applicationId, campaignId, achievementId)
Get achievement
+Get the details of a specific achievement.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAchievementRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**achievementId** | **int32**| The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
### Return type
@@ -2722,28 +2394,19 @@ Name | Type | Description | Notes
## GetAdditionalCost
-> AccountAdditionalCost GetAdditionalCost(ctx, additionalCostId).Execute()
+> AccountAdditionalCost GetAdditionalCost(ctx, additionalCostId)
Get additional cost
+Returns the additional cost.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**additionalCostId** | **int32** | The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAdditionalCostRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**additionalCostId** | **int32**| The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. |
### Return type
@@ -2765,76 +2428,34 @@ Name | Type | Description | Notes
## GetAdditionalCosts
-> InlineResponse20036 GetAdditionalCosts(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse20035 GetAdditionalCosts(ctx, optional)
List additional costs
+Returns all the defined additional costs for the account.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAdditionalCostsRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
-
-### Return type
-
-[**InlineResponse20036**](inline_response_200_36.md)
-
-### Authorization
-
-[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to README]](../README.md)
-
-
-## GetAllAccessLogs
-
-> InlineResponse20020 GetAllAccessLogs(ctx).RangeStart(rangeStart).RangeEnd(rangeEnd).Path(path).Method(method).Status(status).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
-
-List access logs
-
-
-
-### Path Parameters
-
-
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetAdditionalCostsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetAllAccessLogsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetAdditionalCostsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **path** | **string** | Only return results where the request path matches the given regular expression. |
- **method** | **string** | Only return results where the request method matches the given regular expression. |
- **status** | **string** | Filter results by HTTP status codes. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20020**](inline_response_200_20.md)
+[**InlineResponse20035**](InlineResponse20035.md)
### Authorization
@@ -2850,30 +2471,21 @@ Name | Type | Description | Notes
[[Back to README]](../README.md)
-## GetApplication
-
-> Application GetApplication(ctx, applicationId).Execute()
-
-Get Application
-
-
-
-### Path Parameters
+## GetApplication
+> Application GetApplication(ctx, applicationId)
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+Get Application
-### Other Parameters
+Get the application specified by the ID.
-Other parameters are passed through a pointer to a apiGetApplicationRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
### Return type
@@ -2895,28 +2507,19 @@ Name | Type | Description | Notes
## GetApplicationApiHealth
-> ApplicationApiHealth GetApplicationApiHealth(ctx, applicationId).Execute()
+> ApplicationApiHealth GetApplicationApiHealth(ctx, applicationId)
Get Application health
+Display the health of the Application and show the last time the Application was used. You can also find this information in the Campaign Manager. In your Application, click **Settings** > **Integration API Keys**. See the [docs](https://docs.talon.one/docs/dev/tutorials/monitoring-integration-status).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetApplicationApiHealthRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
### Return type
@@ -2938,30 +2541,20 @@ Name | Type | Description | Notes
## GetApplicationCustomer
-> ApplicationCustomer GetApplicationCustomer(ctx, applicationId, customerId).Execute()
+> ApplicationCustomer GetApplicationCustomer(ctx, applicationId, customerId)
Get application's customer
+Retrieve the customers of the specified application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**customerId** | **int32** | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetApplicationCustomerRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**customerId** | **int32**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
### Return type
@@ -2983,38 +2576,39 @@ Name | Type | Description | Notes
## GetApplicationCustomerFriends
-> InlineResponse20033 GetApplicationCustomerFriends(ctx, applicationId, integrationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Execute()
+> InlineResponse20032 GetApplicationCustomerFriends(ctx, applicationId, integrationId, optional)
List friends referred by customer profile
+List the friends referred by the specified customer profile in this Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**integrationId** | **string** | The Integration ID of the Advocate's Profile. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**integrationId** | **string**| The Integration ID of the Advocate's Profile. |
+ **optional** | ***GetApplicationCustomerFriendsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationCustomerFriendsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationCustomerFriendsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
### Return type
-[**InlineResponse20033**](inline_response_200_33.md)
+[**InlineResponse20032**](InlineResponse20032.md)
### Authorization
@@ -3032,36 +2626,37 @@ Name | Type | Description | Notes
## GetApplicationCustomers
-> InlineResponse20022 GetApplicationCustomers(ctx, applicationId).IntegrationId(integrationId).PageSize(pageSize).Skip(skip).WithTotalResultSize(withTotalResultSize).Execute()
+> InlineResponse20021 GetApplicationCustomers(ctx, applicationId, optional)
List application's customers
+List all the customers of the specified application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetApplicationCustomersOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationCustomersRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationCustomersOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **integrationId** | **string** | Filter results performing an exact matching against the profile integration identifier. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **integrationId** | **optional.**| Filter results performing an exact matching against the profile integration identifier. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
### Return type
-[**InlineResponse20022**](inline_response_200_22.md)
+[**InlineResponse20021**](InlineResponse20021.md)
### Authorization
@@ -3079,36 +2674,38 @@ Name | Type | Description | Notes
## GetApplicationCustomersByAttributes
-> InlineResponse20023 GetApplicationCustomersByAttributes(ctx, applicationId).Body(body).PageSize(pageSize).Skip(skip).WithTotalResultSize(withTotalResultSize).Execute()
+> InlineResponse20022 GetApplicationCustomersByAttributes(ctx, applicationId, body, optional)
List application customers matching the given attributes
+Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**body** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md)| body |
+ **optional** | ***GetApplicationCustomersByAttributesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationCustomersByAttributesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationCustomersByAttributesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md) | body |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
### Return type
-[**InlineResponse20023**](inline_response_200_23.md)
+[**InlineResponse20022**](InlineResponse20022.md)
### Authorization
@@ -3126,35 +2723,36 @@ Name | Type | Description | Notes
## GetApplicationEventTypes
-> InlineResponse20029 GetApplicationEventTypes(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse20028 GetApplicationEventTypes(ctx, applicationId, optional)
List Applications event types
+Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2)
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetApplicationEventTypesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationEventTypesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationEventTypesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20029**](inline_response_200_29.md)
+[**InlineResponse20028**](InlineResponse20028.md)
### Authorization
@@ -3172,46 +2770,47 @@ Name | Type | Description | Notes
## GetApplicationEventsWithoutTotalCount
-> InlineResponse20028 GetApplicationEventsWithoutTotalCount(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).Type_(type_).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Session(session).Profile(profile).CustomerName(customerName).CustomerEmail(customerEmail).CouponCode(couponCode).ReferralCode(referralCode).RuleQuery(ruleQuery).CampaignQuery(campaignQuery).Execute()
+> InlineResponse20027 GetApplicationEventsWithoutTotalCount(ctx, applicationId, optional)
List Applications events
+Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetApplicationEventsWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationEventsWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationEventsWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **type_** | **string** | Comma-separated list of types by which to filter events. Must be exact match(es). |
- **createdBefore** | **time.Time** | Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **session** | **string** | Session integration ID filter for events. Must be exact match. |
- **profile** | **string** | Profile integration ID filter for events. Must be exact match. |
- **customerName** | **string** | Customer name filter for events. Will match substrings case-insensitively. |
- **customerEmail** | **string** | Customer e-mail address filter for events. Will match substrings case-insensitively. |
- **couponCode** | **string** | Coupon code |
- **referralCode** | **string** | Referral code |
- **ruleQuery** | **string** | Rule name filter for events |
- **campaignQuery** | **string** | Campaign name filter for events |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **type_** | **optional.**| Comma-separated list of types by which to filter events. Must be exact match(es). |
+ **createdBefore** | **optional.**| Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **session** | **optional.**| Session integration ID filter for events. Must be exact match. |
+ **profile** | **optional.**| Profile integration ID filter for events. Must be exact match. |
+ **customerName** | **optional.**| Customer name filter for events. Will match substrings case-insensitively. |
+ **customerEmail** | **optional.**| Customer e-mail address filter for events. Will match substrings case-insensitively. |
+ **couponCode** | **optional.**| Coupon code |
+ **referralCode** | **optional.**| Referral code |
+ **ruleQuery** | **optional.**| Rule name filter for events |
+ **campaignQuery** | **optional.**| Campaign name filter for events |
### Return type
-[**InlineResponse20028**](inline_response_200_28.md)
+[**InlineResponse20027**](InlineResponse20027.md)
### Authorization
@@ -3229,30 +2828,20 @@ Name | Type | Description | Notes
## GetApplicationSession
-> ApplicationSession GetApplicationSession(ctx, applicationId, sessionId).Execute()
+> ApplicationSession GetApplicationSession(ctx, applicationId, sessionId)
Get Application session
+Get the details of the given session. You can list the sessions with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**sessionId** | **int32** | The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetApplicationSessionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**sessionId** | **int32**| The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. |
### Return type
@@ -3274,43 +2863,44 @@ Name | Type | Description | Notes
## GetApplicationSessions
-> InlineResponse20027 GetApplicationSessions(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).Profile(profile).State(state).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Coupon(coupon).Referral(referral).IntegrationId(integrationId).StoreIntegrationId(storeIntegrationId).Execute()
+> InlineResponse20026 GetApplicationSessions(ctx, applicationId, optional)
List Application sessions
+List all the sessions of the specified Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetApplicationSessionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationSessionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationSessionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **profile** | **string** | Profile integration ID filter for sessions. Must be exact match. |
- **state** | **string** | Filter by sessions with this state. Must be exact match. |
- **createdBefore** | **time.Time** | Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **coupon** | **string** | Filter by sessions with this coupon. Must be exact match. |
- **referral** | **string** | Filter by sessions with this referral. Must be exact match. |
- **integrationId** | **string** | Filter by sessions with this integrationId. Must be exact match. |
- **storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **profile** | **optional.**| Profile integration ID filter for sessions. Must be exact match. |
+ **state** | **optional.**| Filter by sessions with this state. Must be exact match. |
+ **createdBefore** | **optional.**| Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **coupon** | **optional.**| Filter by sessions with this coupon. Must be exact match. |
+ **referral** | **optional.**| Filter by sessions with this referral. Must be exact match. |
+ **integrationId** | **optional.**| Filter by sessions with this integration ID. Must be exact match. |
+ **storeIntegrationId** | **optional.**| The integration ID of the store. You choose this ID when you create a store. |
### Return type
-[**InlineResponse20027**](inline_response_200_27.md)
+[**InlineResponse20026**](InlineResponse20026.md)
### Authorization
@@ -3328,30 +2918,34 @@ Name | Type | Description | Notes
## GetApplications
-> InlineResponse2005 GetApplications(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse2005 GetApplications(ctx, optional)
List Applications
+List all applications in the current account.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetApplicationsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetApplicationsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetApplicationsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse2005**](inline_response_200_5.md)
+[**InlineResponse2005**](InlineResponse2005.md)
### Authorization
@@ -3369,28 +2963,19 @@ Name | Type | Description | Notes
## GetAttribute
-> Attribute GetAttribute(ctx, attributeId).Execute()
+> Attribute GetAttribute(ctx, attributeId)
Get custom attribute
+Retrieve the specified custom attribute.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**attributeId** | **int32** | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetAttributeRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**attributeId** | **int32**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. |
### Return type
@@ -3412,31 +2997,35 @@ Name | Type | Description | Notes
## GetAttributes
-> InlineResponse20034 GetAttributes(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Entity(entity).Execute()
+> InlineResponse20033 GetAttributes(ctx, optional)
List custom attributes
+Return all the custom attributes for the account.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetAttributesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetAttributesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetAttributesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **entity** | **string** | Returned attributes will be filtered by supplied entity. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **entity** | **optional.**| Returned attributes will be filtered by supplied entity. |
### Return type
-[**InlineResponse20034**](inline_response_200_34.md)
+[**InlineResponse20033**](InlineResponse20033.md)
### Authorization
@@ -3454,36 +3043,37 @@ Name | Type | Description | Notes
## GetAudienceMemberships
-> InlineResponse20032 GetAudienceMemberships(ctx, audienceId).PageSize(pageSize).Skip(skip).Sort(sort).ProfileQuery(profileQuery).Execute()
+> InlineResponse20031 GetAudienceMemberships(ctx, audienceId, optional)
List audience members
+Get a paginated list of the customer profiles in a given audience. A maximum of 1000 customer profiles per page is allowed.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
+**audienceId** | **int32**| The ID of the audience. |
+ **optional** | ***GetAudienceMembershipsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetAudienceMembershipsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetAudienceMembershipsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **profileQuery** | **string** | The filter to select a profile. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **profileQuery** | **optional.**| The filter to select a profile. |
### Return type
-[**InlineResponse20032**](inline_response_200_32.md)
+[**InlineResponse20031**](InlineResponse20031.md)
### Authorization
@@ -3501,31 +3091,35 @@ Name | Type | Description | Notes
## GetAudiences
-> InlineResponse20030 GetAudiences(ctx).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Execute()
+> InlineResponse20029 GetAudiences(ctx, optional)
List audiences
+Get all audiences created in the account. To create an audience, use [Create audience](https://docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2).
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetAudiencesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetAudiencesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetAudiencesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
### Return type
-[**InlineResponse20030**](inline_response_200_30.md)
+[**InlineResponse20029**](InlineResponse20029.md)
### Authorization
@@ -3543,29 +3137,34 @@ Name | Type | Description | Notes
## GetAudiencesAnalytics
-> InlineResponse20031 GetAudiencesAnalytics(ctx).AudienceIds(audienceIds).Sort(sort).Execute()
+> InlineResponse20030 GetAudiencesAnalytics(ctx, audienceIds, optional)
List audience analytics
+Get a list of audience IDs and their member count.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**audienceIds** | **string**| The IDs of one or more audiences, separated by commas, by which to filter results. |
+ **optional** | ***GetAudiencesAnalyticsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetAudiencesAnalyticsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetAudiencesAnalyticsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **audienceIds** | **string** | The IDs of one or more audiences, separated by commas, by which to filter results. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20031**](inline_response_200_31.md)
+[**InlineResponse20030**](InlineResponse20030.md)
### Authorization
@@ -3583,30 +3182,20 @@ Name | Type | Description | Notes
## GetCampaign
-> Campaign GetCampaign(ctx, applicationId, campaignId).Execute()
+> Campaign GetCampaign(ctx, applicationId, campaignId)
Get campaign
+Retrieve the given campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetCampaignRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
### Return type
@@ -3628,37 +3217,40 @@ Name | Type | Description | Notes
## GetCampaignAnalytics
-> InlineResponse20021 GetCampaignAnalytics(ctx, applicationId, campaignId).RangeStart(rangeStart).RangeEnd(rangeEnd).Granularity(granularity).Execute()
+> InlineResponse20020 GetCampaignAnalytics(ctx, applicationId, campaignId, rangeStart, rangeEnd, optional)
Get analytics of campaigns
+Retrieve statistical data about the performance of the given campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**rangeStart** | **time.Time**| Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**rangeEnd** | **time.Time**| Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **optional** | ***GetCampaignAnalyticsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCampaignAnalyticsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCampaignAnalyticsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **granularity** | **string** | The time interval between the results in the returned time-series. |
+
+
+ **granularity** | **optional.**| The time interval between the results in the returned time-series. |
### Return type
-[**InlineResponse20021**](inline_response_200_21.md)
+[**InlineResponse20020**](InlineResponse20020.md)
### Authorization
@@ -3676,37 +3268,39 @@ Name | Type | Description | Notes
## GetCampaignByAttributes
-> InlineResponse2006 GetCampaignByAttributes(ctx, applicationId).Body(body).PageSize(pageSize).Skip(skip).Sort(sort).CampaignState(campaignState).Execute()
+> InlineResponse2006 GetCampaignByAttributes(ctx, applicationId, body, optional)
List campaigns that match the given attributes
+Get a list of all the campaigns that match a set of attributes.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**body** | [**CampaignSearch**](CampaignSearch.md)| body |
+ **optional** | ***GetCampaignByAttributesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCampaignByAttributesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCampaignByAttributesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CampaignSearch**](CampaignSearch.md) | body |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **campaignState** | **string** | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **campaignState** | **optional.**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
### Return type
-[**InlineResponse2006**](inline_response_200_6.md)
+[**InlineResponse2006**](InlineResponse2006.md)
### Authorization
@@ -3724,28 +3318,19 @@ Name | Type | Description | Notes
## GetCampaignGroup
-> CampaignGroup GetCampaignGroup(ctx, campaignGroupId).Execute()
+> CampaignGroup GetCampaignGroup(ctx, campaignGroupId)
Get campaign access group
+Get a campaign access group specified by its ID.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**campaignGroupId** | **int32** | The ID of the campaign access group. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetCampaignGroupRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**campaignGroupId** | **int32**| The ID of the campaign access group. |
### Return type
@@ -3767,30 +3352,34 @@ Name | Type | Description | Notes
## GetCampaignGroups
-> InlineResponse20011 GetCampaignGroups(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse20011 GetCampaignGroups(ctx, optional)
List campaign access groups
+List the campaign access groups in the current account.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetCampaignGroupsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCampaignGroupsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCampaignGroupsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20011**](inline_response_200_11.md)
+[**InlineResponse20011**](InlineResponse20011.md)
### Authorization
@@ -3808,34 +3397,38 @@ Name | Type | Description | Notes
## GetCampaignTemplates
-> InlineResponse20012 GetCampaignTemplates(ctx).PageSize(pageSize).Skip(skip).Sort(sort).State(state).Name(name).Tags(tags).UserId(userId).Execute()
+> InlineResponse20012 GetCampaignTemplates(ctx, optional)
List campaign templates
+Retrieve a list of campaign templates.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetCampaignTemplatesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCampaignTemplatesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCampaignTemplatesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **state** | **string** | Filter results by the state of the campaign template. |
- **name** | **string** | Filter results performing case-insensitive matching against the name of the campaign template. |
- **tags** | **string** | Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. |
- **userId** | **int32** | Filter results by user ID. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **state** | **optional.**| Filter results by the state of the campaign template. |
+ **name** | **optional.**| Filter results performing case-insensitive matching against the name of the campaign template. |
+ **tags** | **optional.**| Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. |
+ **userId** | **optional.**| Filter results by user ID. |
### Return type
-[**InlineResponse20012**](inline_response_200_12.md)
+[**InlineResponse20012**](InlineResponse20012.md)
### Authorization
@@ -3853,43 +3446,44 @@ Name | Type | Description | Notes
## GetCampaigns
-> InlineResponse2006 GetCampaigns(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).CampaignState(campaignState).Name(name).Tags(tags).CreatedBefore(createdBefore).CreatedAfter(createdAfter).CampaignGroupId(campaignGroupId).TemplateId(templateId).StoreId(storeId).Execute()
+> InlineResponse2006 GetCampaigns(ctx, applicationId, optional)
List campaigns
+List the campaigns of the specified application that match your filter criteria.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetCampaignsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCampaignsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCampaignsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **campaignState** | **string** | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
- **name** | **string** | Filter results performing case-insensitive matching against the name of the campaign. |
- **tags** | **string** | Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **campaignGroupId** | **int32** | Filter results to campaigns owned by the specified campaign access group ID. |
- **templateId** | **int32** | The ID of the Campaign Template this Campaign was created from. |
- **storeId** | **int32** | Filter results to campaigns linked to the specified store ID. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **campaignState** | **optional.**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
+ **name** | **optional.**| Filter results performing case-insensitive matching against the name of the campaign. |
+ **tags** | **optional.**| Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **campaignGroupId** | **optional.**| Filter results to campaigns owned by the specified campaign access group ID. |
+ **templateId** | **optional.**| The ID of the campaign template this campaign was created from. |
+ **storeId** | **optional.**| Filter results to campaigns linked to the specified store ID. |
### Return type
-[**InlineResponse2006**](inline_response_200_6.md)
+[**InlineResponse2006**](InlineResponse2006.md)
### Authorization
@@ -3907,38 +3501,42 @@ Name | Type | Description | Notes
## GetChanges
-> InlineResponse20042 GetChanges(ctx).PageSize(pageSize).Skip(skip).Sort(sort).ApplicationId(applicationId).EntityPath(entityPath).UserId(userId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).WithTotalResultSize(withTotalResultSize).ManagementKeyId(managementKeyId).IncludeOld(includeOld).Execute()
+> InlineResponse20041 GetChanges(ctx, optional)
Get audit logs for an account
+Retrieve the audit logs displayed in **Accounts > Audit logs**.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetChangesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetChangesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetChangesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **applicationId** | **float32** | Filter results by Application ID. |
- **entityPath** | **string** | Filter results on a case insensitive matching of the url path of the entity |
- **userId** | **int32** | Filter results by user ID. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
- **managementKeyId** | **int32** | Filter results that match the given management key ID. |
- **includeOld** | **bool** | When this flag is set to false, the state without the change will not be returned. The default value is true. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **applicationId** | **optional.**| Filter results by Application ID. |
+ **entityPath** | **optional.**| Filter results on a case insensitive matching of the url path of the entity |
+ **userId** | **optional.**| Filter results by user ID. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **managementKeyId** | **optional.**| Filter results that match the given management key ID. |
+ **includeOld** | **optional.**| When this flag is set to false, the state without the change will not be returned. The default value is true. |
### Return type
-[**InlineResponse20042**](inline_response_200_42.md)
+[**InlineResponse20041**](InlineResponse20041.md)
### Authorization
@@ -3956,32 +3554,21 @@ Name | Type | Description | Notes
## GetCollection
-> Collection GetCollection(ctx, applicationId, campaignId, collectionId).Execute()
+> Collection GetCollection(ctx, applicationId, campaignId, collectionId)
Get campaign-level collection
+Retrieve a given campaign-level collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
### Return type
@@ -4003,34 +3590,35 @@ Name | Type | Description | Notes
## GetCollectionItems
-> InlineResponse20018 GetCollectionItems(ctx, collectionId).PageSize(pageSize).Skip(skip).Execute()
+> InlineResponse20018 GetCollectionItems(ctx, collectionId, optional)
Get collection items
+Retrieve items from a given collection. You can retrieve items from both account-level collections and campaign-level collections using this endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
+ **optional** | ***GetCollectionItemsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCollectionItemsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCollectionItemsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
-[**InlineResponse20018**](inline_response_200_18.md)
+[**InlineResponse20018**](InlineResponse20018.md)
### Authorization
@@ -4048,52 +3636,53 @@ Name | Type | Description | Notes
## GetCouponsWithoutTotalCount
-> InlineResponse2009 GetCouponsWithoutTotalCount(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Sort(sort).Value(value).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Valid(valid).Usable(usable).Redeemed(redeemed).ReferralId(referralId).RecipientIntegrationId(recipientIntegrationId).BatchId(batchId).ExactMatch(exactMatch).ExpiresBefore(expiresBefore).ExpiresAfter(expiresAfter).StartsBefore(startsBefore).StartsAfter(startsAfter).ValuesOnly(valuesOnly).Execute()
+> InlineResponse2009 GetCouponsWithoutTotalCount(ctx, applicationId, campaignId, optional)
List coupons
+List all the coupons matching the specified criteria.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetCouponsWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCouponsWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCouponsWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **value** | **string** | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
- **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
- **redeemed** | **string** | - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. |
- **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
- **recipientIntegrationId** | **string** | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field |
- **batchId** | **string** | Filter results by batches of coupons |
- **exactMatch** | **bool** | Filter results to an exact case-insensitive matching against the coupon code | [default to false]
- **expiresBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **expiresAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **startsBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **startsAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valuesOnly** | **bool** | Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [default to false]
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **value** | **optional.**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
+ **usable** | **optional.**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
+ **redeemed** | **optional.**| - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. |
+ **referralId** | **optional.**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
+ **recipientIntegrationId** | **optional.**| Filter results by match with a profile ID specified in the coupon's RecipientIntegrationId field. |
+ **batchId** | **optional.**| Filter results by batches of coupons |
+ **exactMatch** | **optional.**| Filter results to an exact case-insensitive matching against the coupon code. | [default to false]
+ **expiresBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **expiresAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **startsBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **startsAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valuesOnly** | **optional.**| Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [default to false]
### Return type
-[**InlineResponse2009**](inline_response_200_9.md)
+[**InlineResponse2009**](InlineResponse2009.md)
### Authorization
@@ -4111,34 +3700,37 @@ Name | Type | Description | Notes
## GetCustomerActivityReport
-> CustomerActivityReport GetCustomerActivityReport(ctx, applicationId, customerId).RangeStart(rangeStart).RangeEnd(rangeEnd).PageSize(pageSize).Skip(skip).Execute()
+> CustomerActivityReport GetCustomerActivityReport(ctx, rangeStart, rangeEnd, applicationId, customerId, optional)
Get customer's activity report
+Fetch the summary report of a given customer in the given application, in a time range.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**customerId** | **int32** | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
+**rangeStart** | **time.Time**| Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**rangeEnd** | **time.Time**| Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**customerId** | **int32**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
+ **optional** | ***GetCustomerActivityReportOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomerActivityReportRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomerActivityReportOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
@@ -4160,41 +3752,44 @@ Name | Type | Description | Notes
## GetCustomerActivityReportsWithoutTotalCount
-> InlineResponse20026 GetCustomerActivityReportsWithoutTotalCount(ctx, applicationId).RangeStart(rangeStart).RangeEnd(rangeEnd).PageSize(pageSize).Skip(skip).Sort(sort).Name(name).IntegrationId(integrationId).CampaignName(campaignName).AdvocateName(advocateName).Execute()
+> InlineResponse20025 GetCustomerActivityReportsWithoutTotalCount(ctx, rangeStart, rangeEnd, applicationId, optional)
Get Activity Reports for Application Customers
+Fetch summary reports for all application customers based on a time range. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**rangeStart** | **time.Time**| Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**rangeEnd** | **time.Time**| Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetCustomerActivityReportsWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomerActivityReportsWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomerActivityReportsWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **name** | **string** | Only return reports matching the customer name |
- **integrationId** | **string** | Filter results performing an exact matching against the profile integration identifier. |
- **campaignName** | **string** | Only return reports matching the campaignName |
- **advocateName** | **string** | Only return reports matching the current customer referrer name |
+
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **name** | **optional.**| Only return reports matching the customer name. |
+ **integrationId** | **optional.**| Filter results performing an exact matching against the profile integration identifier. |
+ **campaignName** | **optional.**| Only return reports matching the campaign name. |
+ **advocateName** | **optional.**| Only return reports matching the current customer referrer name. |
### Return type
-[**InlineResponse20026**](inline_response_200_26.md)
+[**InlineResponse20025**](InlineResponse20025.md)
### Authorization
@@ -4212,33 +3807,34 @@ Name | Type | Description | Notes
## GetCustomerAnalytics
-> CustomerAnalytics GetCustomerAnalytics(ctx, applicationId, customerId).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> CustomerAnalytics GetCustomerAnalytics(ctx, applicationId, customerId, optional)
Get customer's analytics report
+Fetch analytics for a given customer in the given application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**customerId** | **int32** | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**customerId** | **int32**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
+ **optional** | ***GetCustomerAnalyticsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomerAnalyticsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomerAnalyticsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
@@ -4260,28 +3856,19 @@ Name | Type | Description | Notes
## GetCustomerProfile
-> CustomerProfile GetCustomerProfile(ctx, customerId).Execute()
+> CustomerProfile GetCustomerProfile(ctx, customerId)
Get customer profile
+Return the details of the specified customer profile. Performance tips
You can retrieve the same information via the Integration API, which can save you extra API requests. consider these options: - Request the customer profile to be part of the response content using [Update Customer Session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2). - Send an empty update with the [Update Customer Profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with `runRuleEngine=false`.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**customerId** | **int32** | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetCustomerProfileRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**customerId** | **int32**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. |
### Return type
@@ -4303,38 +3890,39 @@ Name | Type | Description | Notes
## GetCustomerProfileAchievementProgress
-> InlineResponse20047 GetCustomerProfileAchievementProgress(ctx, applicationId, integrationId).PageSize(pageSize).Skip(skip).AchievementId(achievementId).Title(title).Execute()
+> InlineResponse20046 GetCustomerProfileAchievementProgress(ctx, applicationId, integrationId, optional)
List customer achievements
+For the given customer profile, list all the achievements that match your filter criteria.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**integrationId** | **string** | The identifier of the profile. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**integrationId** | **string**| The identifier of the profile. |
+ **optional** | ***GetCustomerProfileAchievementProgressOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomerProfileAchievementProgressRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomerProfileAchievementProgressOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 50]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
- **title** | **string** | Filter results by the `title` of an achievement. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 50]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **achievementId** | **optional.**| The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
+ **title** | **optional.**| Filter results by the `title` of an achievement. |
### Return type
-[**InlineResponse20047**](inline_response_200_47.md)
+[**InlineResponse20046**](InlineResponse20046.md)
### Authorization
@@ -4352,30 +3940,34 @@ Name | Type | Description | Notes
## GetCustomerProfiles
-> InlineResponse20025 GetCustomerProfiles(ctx).PageSize(pageSize).Skip(skip).Sandbox(sandbox).Execute()
+> InlineResponse20024 GetCustomerProfiles(ctx, optional)
List customer profiles
+List all customer profiles.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetCustomerProfilesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomerProfilesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomerProfilesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sandbox** | **bool** | Indicates whether you are pointing to a sandbox or Live customer. | [default to false]
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sandbox** | **optional.**| Indicates whether you are pointing to a sandbox or live customer. | [default to false]
### Return type
-[**InlineResponse20025**](inline_response_200_25.md)
+[**InlineResponse20024**](InlineResponse20024.md)
### Authorization
@@ -4393,31 +3985,36 @@ Name | Type | Description | Notes
## GetCustomersByAttributes
-> InlineResponse20024 GetCustomersByAttributes(ctx).Body(body).PageSize(pageSize).Skip(skip).Sandbox(sandbox).Execute()
+> InlineResponse20023 GetCustomersByAttributes(ctx, body, optional)
List customer profiles matching the given attributes
+Get a list of the customer profiles matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md)| body |
+ **optional** | ***GetCustomersByAttributesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetCustomersByAttributesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetCustomersByAttributesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md) | body |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sandbox** | **bool** | Indicates whether you are pointing to a sandbox or Live customer. | [default to false]
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sandbox** | **optional.**| Indicates whether you are pointing to a sandbox or live customer. | [default to false]
### Return type
-[**InlineResponse20024**](inline_response_200_24.md)
+[**InlineResponse20023**](InlineResponse20023.md)
### Authorization
@@ -4435,32 +4032,36 @@ Name | Type | Description | Notes
## GetEventTypes
-> InlineResponse20040 GetEventTypes(ctx).Name(name).IncludeOldVersions(includeOldVersions).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse20039 GetEventTypes(ctx, optional)
List event types
+Fetch all event type definitions for your account.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetEventTypesOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetEventTypesRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetEventTypesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **name** | **string** | Filter results to event types with the given name. This parameter implies `includeOldVersions`. |
- **includeOldVersions** | **bool** | Include all versions of every event type. | [default to false]
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **name** | **optional.**| Filter results to event types with the given name. This parameter implies `includeOldVersions`. |
+ **includeOldVersions** | **optional.**| Include all versions of every event type. | [default to false]
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20040**](inline_response_200_40.md)
+[**InlineResponse20039**](InlineResponse20039.md)
### Authorization
@@ -4478,32 +4079,36 @@ Name | Type | Description | Notes
## GetExports
-> InlineResponse20043 GetExports(ctx).PageSize(pageSize).Skip(skip).ApplicationId(applicationId).CampaignId(campaignId).Entity(entity).Execute()
+> InlineResponse20042 GetExports(ctx, optional)
Get exports
+List all past exports
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetExportsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetExportsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetExportsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **applicationId** | **float32** | Filter results by Application ID. |
- **campaignId** | **int32** | Filter by the campaign ID on which the limit counters are used. |
- **entity** | **string** | The name of the entity type that was exported. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **applicationId** | **optional.**| Filter results by Application ID. |
+ **campaignId** | **optional.**| Filter by the campaign ID on which the limit counters are used. |
+ **entity** | **optional.**| The name of the entity type that was exported. |
### Return type
-[**InlineResponse20043**](inline_response_200_43.md)
+[**InlineResponse20042**](InlineResponse20042.md)
### Authorization
@@ -4521,30 +4126,20 @@ Name | Type | Description | Notes
## GetLoyaltyCard
-> LoyaltyCard GetLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId).Execute()
+> LoyaltyCard GetLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId)
Get loyalty card
+Get the given loyalty card.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetLoyaltyCardRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
### Return type
@@ -4566,39 +4161,40 @@ Name | Type | Description | Notes
## GetLoyaltyCardTransactionLogs
-> InlineResponse20016 GetLoyaltyCardTransactionLogs(ctx, loyaltyProgramId, loyaltyCardId).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).SubledgerId(subledgerId).Execute()
+> InlineResponse20016 GetLoyaltyCardTransactionLogs(ctx, loyaltyProgramId, loyaltyCardId, optional)
List card's transactions
+Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+ **optional** | ***GetLoyaltyCardTransactionLogsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyCardTransactionLogsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyCardTransactionLogsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **subledgerId** | **string** | The ID of the subledger by which we filter the data. |
+ **startDate** | **optional.**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **subledgerId** | **optional.**| The ID of the subledger by which we filter the data. |
### Return type
-[**InlineResponse20016**](inline_response_200_16.md)
+[**InlineResponse20016**](InlineResponse20016.md)
### Authorization
@@ -4616,38 +4212,39 @@ Name | Type | Description | Notes
## GetLoyaltyCards
-> InlineResponse20015 GetLoyaltyCards(ctx, loyaltyProgramId).PageSize(pageSize).Skip(skip).Sort(sort).Identifier(identifier).ProfileId(profileId).BatchId(batchId).Execute()
+> InlineResponse20015 GetLoyaltyCards(ctx, loyaltyProgramId, optional)
List loyalty cards
+For the given card-based loyalty program, list the loyalty cards that match your filter criteria.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***GetLoyaltyCardsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyCardsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyCardsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **identifier** | **string** | The card code by which to filter loyalty cards in the response. |
- **profileId** | **int32** | Filter results by customer profile ID. |
- **batchId** | **string** | Filter results by loyalty card batch ID. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **identifier** | **optional.**| The card code by which to filter loyalty cards in the response. |
+ **profileId** | **optional.**| Filter results by customer profile ID. |
+ **batchId** | **optional.**| Filter results by loyalty card batch ID. |
### Return type
-[**InlineResponse20015**](inline_response_200_15.md)
+[**InlineResponse20015**](InlineResponse20015.md)
### Authorization
@@ -4665,30 +4262,20 @@ Name | Type | Description | Notes
## GetLoyaltyPoints
-> LoyaltyLedger GetLoyaltyPoints(ctx, loyaltyProgramId, integrationId).Execute()
+> LoyaltyLedger GetLoyaltyPoints(ctx, loyaltyProgramId, integrationId)
Get customer's full loyalty ledger
+Get the loyalty ledger for this profile integration ID. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. **Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
-**integrationId** | **string** | The identifier of the profile. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetLoyaltyPointsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+**integrationId** | **string**| The identifier of the profile. |
### Return type
@@ -4710,28 +4297,19 @@ Name | Type | Description | Notes
## GetLoyaltyProgram
-> LoyaltyProgram GetLoyaltyProgram(ctx, loyaltyProgramId).Execute()
+> LoyaltyProgram GetLoyaltyProgram(ctx, loyaltyProgramId)
Get loyalty program
+Get the specified [loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview). To list all loyalty programs in your Application, use [List loyalty programs](#operation/getLoyaltyPrograms). To list the loyalty programs that a customer profile is part of, use the [List customer data](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory)
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetLoyaltyProgramRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**loyaltyProgramId** | **int32**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
### Return type
@@ -4753,38 +4331,39 @@ Name | Type | Description | Notes
## GetLoyaltyProgramTransactions
-> InlineResponse20014 GetLoyaltyProgramTransactions(ctx, loyaltyProgramId).LoyaltyTransactionType(loyaltyTransactionType).SubledgerId(subledgerId).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).Execute()
+> InlineResponse20014 GetLoyaltyProgramTransactions(ctx, loyaltyProgramId, optional)
List loyalty program transactions
+Retrieve loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. **Note:** If no filters are applied, the last 50 loyalty transactions for the given loyalty program are returned. **Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***GetLoyaltyProgramTransactionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetLoyaltyProgramTransactionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetLoyaltyProgramTransactionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **loyaltyTransactionType** | **string** | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. |
- **subledgerId** | **string** | The ID of the subledger by which we filter the data. |
- **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
- **pageSize** | **int32** | The number of items in the response. | [default to 50]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
+ **loyaltyTransactionType** | **optional.**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. |
+ **subledgerId** | **optional.**| The ID of the subledger by which we filter the data. |
+ **startDate** | **optional.**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **endDate** | **optional.**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 50]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
### Return type
-[**InlineResponse20014**](inline_response_200_14.md)
+[**InlineResponse20014**](InlineResponse20014.md)
### Authorization
@@ -4802,24 +4381,19 @@ Name | Type | Description | Notes
## GetLoyaltyPrograms
-> InlineResponse20013 GetLoyaltyPrograms(ctx).Execute()
+> InlineResponse20013 GetLoyaltyPrograms(ctx, )
List loyalty programs
+List the loyalty programs of the account.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetLoyaltyProgramsRequest struct via the builder pattern
-
-
### Return type
-[**InlineResponse20013**](inline_response_200_13.md)
+[**InlineResponse20013**](InlineResponse20013.md)
### Authorization
@@ -4837,28 +4411,19 @@ Other parameters are passed through a pointer to a apiGetLoyaltyProgramsRequest
## GetLoyaltyStatistics
-> LoyaltyDashboardData GetLoyaltyStatistics(ctx, loyaltyProgramId).Execute()
+> LoyaltyDashboardData GetLoyaltyStatistics(ctx, loyaltyProgramId)
Get loyalty program statistics
+Retrieve the statistics of the specified loyalty program such as the total active points, pending points, spent points, and expired points. **Important:** The returned data does not include the current day. All statistics are updated daily at 11:59 PM in the loyalty program time zone.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetLoyaltyStatisticsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**loyaltyProgramId** | **int32**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
### Return type
@@ -4880,43 +4445,44 @@ Name | Type | Description | Notes
## GetReferralsWithoutTotalCount
-> InlineResponse20010 GetReferralsWithoutTotalCount(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Sort(sort).Code(code).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Valid(valid).Usable(usable).Advocate(advocate).Execute()
+> InlineResponse20010 GetReferralsWithoutTotalCount(ctx, applicationId, campaignId, optional)
List referrals
+List all referrals of the specified campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetReferralsWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetReferralsWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetReferralsWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **code** | **string** | Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. |
- **usable** | **string** | Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. |
- **advocate** | **string** | Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **code** | **optional.**| Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. |
+ **usable** | **optional.**| Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. |
+ **advocate** | **optional.**| Filter results by match with a profile ID specified in the referral's AdvocateProfileIntegrationId field. |
### Return type
-[**InlineResponse20010**](inline_response_200_10.md)
+[**InlineResponse20010**](InlineResponse20010.md)
### Authorization
@@ -4934,28 +4500,19 @@ Name | Type | Description | Notes
## GetRoleV2
-> RoleV2 GetRoleV2(ctx, roleId).Execute()
+> RoleV2 GetRoleV2(ctx, roleId)
Get role
+Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**roleId** | **int32** | The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetRoleV2Request struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**roleId** | **int32**| The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. |
### Return type
@@ -4977,32 +4534,21 @@ Name | Type | Description | Notes
## GetRuleset
-> Ruleset GetRuleset(ctx, applicationId, campaignId, rulesetId).Execute()
+> Ruleset GetRuleset(ctx, applicationId, campaignId, rulesetId)
Get ruleset
+Retrieve the specified ruleset.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**rulesetId** | **int32** | The ID of the ruleset. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetRulesetRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**rulesetId** | **int32**| The ID of the ruleset. |
### Return type
@@ -5024,37 +4570,38 @@ Name | Type | Description | Notes
## GetRulesets
-> InlineResponse2007 GetRulesets(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse2007 GetRulesets(ctx, applicationId, campaignId, optional)
List campaign rulesets
+List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. **Important:** The response also includes deleted rules. You should only consider the latest revision of the returned rulesets.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***GetRulesetsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetRulesetsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetRulesetsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse2007**](inline_response_200_7.md)
+[**InlineResponse2007**](InlineResponse2007.md)
### Authorization
@@ -5072,30 +4619,20 @@ Name | Type | Description | Notes
## GetStore
-> Store GetStore(ctx, applicationId, storeId).Execute()
+> Store GetStore(ctx, applicationId, storeId)
Get store
+Get store details for a specific store ID.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**storeId** | **string** | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetStoreRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**storeId** | **string**| The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
### Return type
@@ -5117,28 +4654,19 @@ Name | Type | Description | Notes
## GetUser
-> User GetUser(ctx, userId).Execute()
+> User GetUser(ctx, userId)
Get user
+Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetUserRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**userId** | **int32**| The ID of the user. |
### Return type
@@ -5160,30 +4688,34 @@ Name | Type | Description | Notes
## GetUsers
-> InlineResponse20041 GetUsers(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute()
+> InlineResponse20040 GetUsers(ctx, optional)
List users in account
+Retrieve all users in your account.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetUsersOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetUsersRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetUsersOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
### Return type
-[**InlineResponse20041**](inline_response_200_41.md)
+[**InlineResponse20040**](InlineResponse20040.md)
### Authorization
@@ -5201,28 +4733,19 @@ Name | Type | Description | Notes
## GetWebhook
-> Webhook GetWebhook(ctx, webhookId).Execute()
+> Webhook GetWebhook(ctx, webhookId)
Get webhook
+Returns a webhook by its id.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**webhookId** | **int32** | The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiGetWebhookRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**webhookId** | **int32**| The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. |
### Return type
@@ -5244,36 +4767,40 @@ Name | Type | Description | Notes
## GetWebhookActivationLogs
-> InlineResponse20038 GetWebhookActivationLogs(ctx).PageSize(pageSize).Skip(skip).Sort(sort).IntegrationRequestUuid(integrationRequestUuid).WebhookId(webhookId).ApplicationId(applicationId).CampaignId(campaignId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute()
+> InlineResponse20037 GetWebhookActivationLogs(ctx, optional)
List webhook activation log entries
+Webhook activation log entries are created as soon as an integration request triggers a webhook effect. See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks).
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetWebhookActivationLogsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetWebhookActivationLogsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetWebhookActivationLogsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **integrationRequestUuid** | **string** | Filter results by integration request UUID. |
- **webhookId** | **float32** | Filter results by Webhook. |
- **applicationId** | **float32** | Filter results by Application ID. |
- **campaignId** | **float32** | Filter results by campaign. |
- **createdBefore** | **time.Time** | Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **integrationRequestUuid** | **optional.**| Filter results by integration request UUID. |
+ **webhookId** | **optional.**| Filter results by webhook id. |
+ **applicationId** | **optional.**| Filter results by Application ID. |
+ **campaignId** | **optional.**| Filter results by campaign ID. |
+ **createdBefore** | **optional.**| Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. |
### Return type
-[**InlineResponse20038**](inline_response_200_38.md)
+[**InlineResponse20037**](InlineResponse20037.md)
### Authorization
@@ -5291,37 +4818,41 @@ Name | Type | Description | Notes
## GetWebhookLogs
-> InlineResponse20039 GetWebhookLogs(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Status(status).WebhookId(webhookId).ApplicationId(applicationId).CampaignId(campaignId).RequestUuid(requestUuid).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute()
+> InlineResponse20038 GetWebhookLogs(ctx, optional)
List webhook log entries
+Retrieve all webhook log entries.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetWebhookLogsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetWebhookLogsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetWebhookLogsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **status** | **string** | Filter results by HTTP status codes. |
- **webhookId** | **float32** | Filter results by Webhook. |
- **applicationId** | **float32** | Filter results by Application ID. |
- **campaignId** | **float32** | Filter results by campaign. |
- **requestUuid** | **string** | Filter results by request UUID. |
- **createdBefore** | **time.Time** | Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **status** | **optional.**| Filter results by HTTP status codes. |
+ **webhookId** | **optional.**| Filter results by webhook id. |
+ **applicationId** | **optional.**| Filter results by Application ID. |
+ **campaignId** | **optional.**| Filter results by campaign ID. |
+ **requestUuid** | **optional.**| Filter results by request UUID. |
+ **createdBefore** | **optional.**| Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. |
### Return type
-[**InlineResponse20039**](inline_response_200_39.md)
+[**InlineResponse20038**](InlineResponse20038.md)
### Authorization
@@ -5339,35 +4870,39 @@ Name | Type | Description | Notes
## GetWebhooks
-> InlineResponse20037 GetWebhooks(ctx).ApplicationIds(applicationIds).Sort(sort).PageSize(pageSize).Skip(skip).CreationType(creationType).Visibility(visibility).OutgoingIntegrationsTypeId(outgoingIntegrationsTypeId).Title(title).Execute()
+> InlineResponse20036 GetWebhooks(ctx, optional)
List webhooks
+List all webhooks.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***GetWebhooksOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiGetWebhooksRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a GetWebhooksOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **applicationIds** | **string** | Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **creationType** | **string** | Filter results by creation type. |
- **visibility** | **string** | Filter results by visibility. |
- **outgoingIntegrationsTypeId** | **int32** | Filter results by outgoing integration type ID. |
- **title** | **string** | Filter results performing case-insensitive matching against the webhook title. |
+ **applicationIds** | **optional.**| Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **creationType** | **optional.**| Filter results by creation type. |
+ **visibility** | **optional.**| Filter results by visibility. |
+ **outgoingIntegrationsTypeId** | **optional.**| Filter results by outgoing integration type ID. |
+ **title** | **optional.**| Filter results performing case-insensitive matching against the webhook title. |
### Return type
-[**InlineResponse20037**](inline_response_200_37.md)
+[**InlineResponse20036**](InlineResponse20036.md)
### Authorization
@@ -5385,29 +4920,30 @@ Name | Type | Description | Notes
## ImportAccountCollection
-> Import ImportAccountCollection(ctx, collectionId).UpFile(upFile).Execute()
+> Import ImportAccountCollection(ctx, collectionId, optional)
Import data into existing account-level collection
+Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
+ **optional** | ***ImportAccountCollectionOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportAccountCollectionRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportAccountCollectionOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5429,29 +4965,30 @@ Name | Type | Description | Notes
## ImportAllowedList
-> Import ImportAllowedList(ctx, attributeId).UpFile(upFile).Execute()
+> Import ImportAllowedList(ctx, attributeId, optional)
Import allowed values for attribute
+Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item` (required): the values in your allowed list, for example a list of SKU's. An allowed list is limited to 500,000 items. Example: ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**attributeId** | **int32** | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. |
+**attributeId** | **int32**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. |
+ **optional** | ***ImportAllowedListOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportAllowedListRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportAllowedListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5473,29 +5010,30 @@ Name | Type | Description | Notes
## ImportAudiencesMemberships
-> Import ImportAudiencesMemberships(ctx, audienceId).UpFile(upFile).Execute()
+> Import ImportAudiencesMemberships(ctx, audienceId, optional)
Import audience members
+Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. **Note:** We recommend limiting your file size to 500MB. Example: ```text profileintegrationid charles alexa ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**audienceId** | **int32** | The ID of the audience. |
+**audienceId** | **int32**| The ID of the audience. |
+ **optional** | ***ImportAudiencesMembershipsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportAudiencesMembershipsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportAudiencesMembershipsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5517,31 +5055,32 @@ Name | Type | Description | Notes
## ImportCampaignStores
-> Import ImportCampaignStores(ctx, applicationId, campaignId).UpFile(upFile).Execute()
+> Import ImportCampaignStores(ctx, applicationId, campaignId, optional)
Import stores
+Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ImportCampaignStoresOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportCampaignStoresRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportCampaignStoresOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5563,25 +5102,26 @@ Name | Type | Description | Notes
## ImportCollection
-> Import ImportCollection(ctx, applicationId, campaignId, collectionId).UpFile(upFile).Execute()
+> Import ImportCollection(ctx, applicationId, campaignId, collectionId, optional)
Import data into existing campaign-level collection
+Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
+ **optional** | ***ImportCollectionOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportCollectionRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportCollectionOpts struct
Name | Type | Description | Notes
@@ -5589,7 +5129,7 @@ Name | Type | Description | Notes
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5611,32 +5151,33 @@ Name | Type | Description | Notes
## ImportCoupons
-> Import ImportCoupons(ctx, applicationId, campaignId).SkipDuplicates(skipDuplicates).UpFile(upFile).Execute()
+> Import ImportCoupons(ctx, applicationId, campaignId, optional)
Import coupons
+Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ImportCouponsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportCouponsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportCouponsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **skipDuplicates** | **bool** | An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. |
- **upFile** | **string** | The file containing the data that is being imported. |
+ **skipDuplicates** | **optional.**| An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5658,29 +5199,30 @@ Name | Type | Description | Notes
## ImportLoyaltyCards
-> Import ImportLoyaltyCards(ctx, loyaltyProgramId).UpFile(upFile).Execute()
+> Import ImportLoyaltyCards(ctx, loyaltyProgramId, optional)
Import loyalty cards
+Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***ImportLoyaltyCardsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportLoyaltyCardsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportLoyaltyCardsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5702,29 +5244,30 @@ Name | Type | Description | Notes
## ImportLoyaltyCustomersTiers
-> Import ImportLoyaltyCustomersTiers(ctx, loyaltyProgramId).UpFile(upFile).Execute()
+> Import ImportLoyaltyCustomersTiers(ctx, loyaltyProgramId, optional)
Import customers into loyalty tiers
+Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. **Important:** This endpoint only works with loyalty programs with advanced tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. **Note:** We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***ImportLoyaltyCustomersTiersOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportLoyaltyCustomersTiersRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportLoyaltyCustomersTiersOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5746,29 +5289,30 @@ Name | Type | Description | Notes
## ImportLoyaltyPoints
-> Import ImportLoyaltyPoints(ctx, loyaltyProgramId).UpFile(upFile).Execute()
+> Import ImportLoyaltyPoints(ctx, loyaltyProgramId, optional)
Import loyalty points
+Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. **Note**: It must be an RFC3339 timestamp string or string `immediate`. Empty or missing values are considered `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until the date provided for `startdate` is reached. **Note:** We recommend limiting your file size to 500MB. **Example for profile-based programs:** ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` **Example for card-based programs:** ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyProgramId** | **int32**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+ **optional** | ***ImportLoyaltyPointsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportLoyaltyPointsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportLoyaltyPointsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5790,29 +5334,30 @@ Name | Type | Description | Notes
## ImportPoolGiveaways
-> Import ImportPoolGiveaways(ctx, poolId).UpFile(upFile).Execute()
+> Import ImportPoolGiveaways(ctx, poolId, optional)
Import giveaway codes into a giveaway pool
+Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. **Note:** - We recommend limiting your file size to 500MB. - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. **Example:** ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**poolId** | **int32** | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. |
+**poolId** | **int32**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. |
+ **optional** | ***ImportPoolGiveawaysOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportPoolGiveawaysRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportPoolGiveawaysOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5834,31 +5379,32 @@ Name | Type | Description | Notes
## ImportReferrals
-> Import ImportReferrals(ctx, applicationId, campaignId).UpFile(upFile).Execute()
+> Import ImportReferrals(ctx, applicationId, campaignId, optional)
Import referrals
+Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ```
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ImportReferralsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiImportReferralsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ImportReferralsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **upFile** | **string** | The file containing the data that is being imported. |
+ **upFile** | **optional.**| The file containing the data that is being imported. |
### Return type
@@ -5880,24 +5426,19 @@ Name | Type | Description | Notes
## InviteUserExternal
-> InviteUserExternal(ctx).Body(body).Execute()
+> InviteUserExternal(ctx, body)
Invite user from identity provider
+[Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiInviteUserExternalRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewExternalInvitation**](NewExternalInvitation.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewExternalInvitation**](NewExternalInvitation.md)| body |
### Return type
@@ -5919,32 +5460,36 @@ Name | Type | Description | Notes
## ListAccountCollections
-> InlineResponse20017 ListAccountCollections(ctx).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute()
+> InlineResponse20017 ListAccountCollections(ctx, optional)
List collections in account
+List account-level collections in the account.
-
-### Path Parameters
+### Required Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***ListAccountCollectionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiListAccountCollectionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ListAccountCollectionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
- **name** | **string** | Filter by collection name. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **name** | **optional.**| Filter by collection name. |
### Return type
-[**InlineResponse20017**](inline_response_200_17.md)
+[**InlineResponse20017**](InlineResponse20017.md)
### Authorization
@@ -5962,37 +5507,38 @@ Name | Type | Description | Notes
## ListAchievements
-> InlineResponse20046 ListAchievements(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Title(title).Execute()
+> InlineResponse20045 ListAchievements(ctx, applicationId, campaignId, optional)
List achievements
+List all the achievements for a specific campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ListAchievementsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiListAchievementsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ListAchievementsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 50]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **title** | **string** | Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 50]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **title** | **optional.**| Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. |
### Return type
-[**InlineResponse20046**](inline_response_200_46.md)
+[**InlineResponse20045**](InlineResponse20045.md)
### Authorization
@@ -6010,24 +5556,19 @@ Name | Type | Description | Notes
## ListAllRolesV2
-> InlineResponse20044 ListAllRolesV2(ctx).Execute()
+> InlineResponse20043 ListAllRolesV2(ctx, )
List roles
+List all roles.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiListAllRolesV2Request struct via the builder pattern
-
-
### Return type
-[**InlineResponse20044**](inline_response_200_44.md)
+[**InlineResponse20043**](InlineResponse20043.md)
### Authorization
@@ -6045,37 +5586,38 @@ Other parameters are passed through a pointer to a apiListAllRolesV2Request stru
## ListCatalogItems
-> InlineResponse20035 ListCatalogItems(ctx, catalogId).PageSize(pageSize).Skip(skip).WithTotalResultSize(withTotalResultSize).Sku(sku).ProductNames(productNames).Execute()
+> InlineResponse20034 ListCatalogItems(ctx, catalogId, optional)
List items in a catalog
+Return a paginated list of cart items in the given catalog.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**catalogId** | **int32** | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. |
+**catalogId** | **int32**| The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. |
+ **optional** | ***ListCatalogItemsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiListCatalogItemsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ListCatalogItemsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
- **sku** | [**[]string**](string.md) | Filter results by one or more SKUs. Must be exact match. |
- **productNames** | [**[]string**](string.md) | Filter results by one or more product names. Must be exact match. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **sku** | [**optional.Interface of []string**](string.md)| Filter results by one or more SKUs. Must be exact match. |
+ **productNames** | [**optional.Interface of []string**](string.md)| Filter results by one or more product names. Must be exact match. |
### Return type
-[**InlineResponse20035**](inline_response_200_35.md)
+[**InlineResponse20034**](InlineResponse20034.md)
### Authorization
@@ -6093,39 +5635,40 @@ Name | Type | Description | Notes
## ListCollections
-> InlineResponse20017 ListCollections(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute()
+> InlineResponse20017 ListCollections(ctx, applicationId, campaignId, optional)
List collections in campaign
+List collections in a given campaign.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ListCollectionsOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiListCollectionsRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ListCollectionsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
- **name** | **string** | Filter by collection name. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **name** | **optional.**| Filter by collection name. |
### Return type
-[**InlineResponse20017**](inline_response_200_17.md)
+[**InlineResponse20017**](InlineResponse20017.md)
### Authorization
@@ -6143,37 +5686,38 @@ Name | Type | Description | Notes
## ListCollectionsInApplication
-> InlineResponse20017 ListCollectionsInApplication(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute()
+> InlineResponse20017 ListCollectionsInApplication(ctx, applicationId, optional)
List collections in Application
+List campaign-level collections from all campaigns in a given Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ListCollectionsInApplicationOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiListCollectionsInApplicationRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ListCollectionsInApplicationOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
- **name** | **string** | Filter by collection name. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **name** | **optional.**| Filter by collection name. |
### Return type
-[**InlineResponse20017**](inline_response_200_17.md)
+[**InlineResponse20017**](InlineResponse20017.md)
### Authorization
@@ -6191,40 +5735,41 @@ Name | Type | Description | Notes
## ListStores
-> InlineResponse20045 ListStores(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).CampaignId(campaignId).Name(name).IntegrationId(integrationId).Query(query).Execute()
+> InlineResponse20044 ListStores(ctx, applicationId, optional)
List stores
+List all stores for a specific Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+ **optional** | ***ListStoresOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiListStoresRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a ListStoresOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **withTotalResultSize** | **bool** | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
- **campaignId** | **float32** | Filter results by campaign. |
- **name** | **string** | The name of the store. |
- **integrationId** | **string** | The integration ID of the store. |
- **query** | **string** | Filter results by `name` or `integrationId`. |
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **withTotalResultSize** | **optional.**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. |
+ **campaignId** | **optional.**| Filter results by campaign ID. |
+ **name** | **optional.**| The name of the store. |
+ **integrationId** | **optional.**| The integration ID of the store. |
+ **query** | **optional.**| Filter results by `name` or `integrationId`. |
### Return type
-[**InlineResponse20045**](inline_response_200_45.md)
+[**InlineResponse20044**](InlineResponse20044.md)
### Authorization
@@ -6242,29 +5787,20 @@ Name | Type | Description | Notes
## NotificationActivation
-> NotificationActivation(ctx, notificationId).Body(body).Execute()
+> NotificationActivation(ctx, notificationId, body)
Activate or deactivate notification
+Activate or deactivate the given notification. When `enabled` is false, updates will no longer be sent for the given notification.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**notificationId** | **int32** | The ID of the notification. Get it with the appropriate _List notifications_ endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiNotificationActivationRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NotificationActivation**](NotificationActivation.md) | body |
+**notificationId** | **int32**| The ID of the notification. Get it with the appropriate _List notifications_ endpoint. |
+**body** | [**NotificationActivation**](NotificationActivation.md)| body |
### Return type
@@ -6286,21 +5822,16 @@ Name | Type | Description | Notes
## OktaEventHandlerChallenge
-> OktaEventHandlerChallenge(ctx).Execute()
+> OktaEventHandlerChallenge(ctx, )
Validate Okta API ownership
+Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiOktaEventHandlerChallengeRequest struct via the builder pattern
-
-
### Return type
(empty response body)
@@ -6321,29 +5852,20 @@ Other parameters are passed through a pointer to a apiOktaEventHandlerChallengeR
## PostAddedDeductedPointsNotification
-> BaseNotification PostAddedDeductedPointsNotification(ctx, loyaltyProgramId).Body(body).Execute()
+> BaseNotification PostAddedDeductedPointsNotification(ctx, loyaltyProgramId, body)
Create notification about added or deducted loyalty points
+Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiPostAddedDeductedPointsNotificationRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NewBaseNotification**](NewBaseNotification.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**body** | [**NewBaseNotification**](NewBaseNotification.md)| body |
### Return type
@@ -6365,29 +5887,20 @@ Name | Type | Description | Notes
## PostCatalogsStrikethroughNotification
-> BaseNotification PostCatalogsStrikethroughNotification(ctx, applicationId).Body(body).Execute()
+> BaseNotification PostCatalogsStrikethroughNotification(ctx, applicationId, body)
Create strikethrough notification
+Create a notification for the in the given Application. For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). See the [payload](https://docs.talon.one/outbound-notifications) you will receive.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiPostCatalogsStrikethroughNotificationRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NewBaseNotification**](NewBaseNotification.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**body** | [**NewBaseNotification**](NewBaseNotification.md)| body |
### Return type
@@ -6409,29 +5922,20 @@ Name | Type | Description | Notes
## PostPendingPointsNotification
-> BaseNotification PostPendingPointsNotification(ctx, loyaltyProgramId).Body(body).Execute()
+> BaseNotification PostPendingPointsNotification(ctx, loyaltyProgramId, body)
Create notification about pending loyalty points
+Create a notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiPostPendingPointsNotificationRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NewBaseNotification**](NewBaseNotification.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**body** | [**NewBaseNotification**](NewBaseNotification.md)| body |
### Return type
@@ -6453,31 +5957,21 @@ Name | Type | Description | Notes
## RemoveLoyaltyPoints
-> RemoveLoyaltyPoints(ctx, loyaltyProgramId, integrationId).Body(body).Execute()
+> RemoveLoyaltyPoints(ctx, loyaltyProgramId, integrationId, body)
Deduct points from customer profile
+Deduct points from the specified loyalty program and specified customer profile. **Important:** - Only active points can be deducted. - Only pending points are rolled back when a session is cancelled or reopened. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **string** | The identifier for the loyalty program. |
-**integrationId** | **string** | The identifier of the profile. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiRemoveLoyaltyPointsRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**DeductLoyaltyPoints**](DeductLoyaltyPoints.md) | body |
+**loyaltyProgramId** | **string**| The identifier for the loyalty program. |
+**integrationId** | **string**| The identifier of the profile. |
+**body** | [**DeductLoyaltyPoints**](DeductLoyaltyPoints.md)| body |
### Return type
@@ -6499,24 +5993,19 @@ Name | Type | Description | Notes
## ResetPassword
-> NewPassword ResetPassword(ctx).Body(body).Execute()
+> NewPassword ResetPassword(ctx, body)
Reset password
+Consumes the supplied password reset token and updates the password for the associated account.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiResetPasswordRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**NewPassword**](NewPassword.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**NewPassword**](NewPassword.md)| body |
### Return type
@@ -6538,24 +6027,19 @@ Name | Type | Description | Notes
## ScimCreateUser
-> ScimUser ScimCreateUser(ctx).Body(body).Execute()
+> ScimUser ScimCreateUser(ctx, body)
Create SCIM user
+Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
-
-### Path Parameters
-
-
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimCreateUserRequest struct via the builder pattern
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ScimNewUser**](ScimNewUser.md) | body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**ScimNewUser**](ScimNewUser.md)| body |
### Return type
@@ -6577,28 +6061,19 @@ Name | Type | Description | Notes
## ScimDeleteUser
-> ScimDeleteUser(ctx, userId).Execute()
+> ScimDeleteUser(ctx, userId)
Delete SCIM user
+Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimDeleteUserRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**userId** | **int32**| The ID of the user. |
### Return type
@@ -6620,21 +6095,16 @@ Name | Type | Description | Notes
## ScimGetResourceTypes
-> ScimResourceTypesListResponse ScimGetResourceTypes(ctx).Execute()
+> ScimResourceTypesListResponse ScimGetResourceTypes(ctx, )
List supported SCIM resource types
+Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimGetResourceTypesRequest struct via the builder pattern
-
-
### Return type
[**ScimResourceTypesListResponse**](ScimResourceTypesListResponse.md)
@@ -6655,21 +6125,16 @@ Other parameters are passed through a pointer to a apiScimGetResourceTypesReques
## ScimGetSchemas
-> ScimSchemasListResponse ScimGetSchemas(ctx).Execute()
+> ScimSchemasListResponse ScimGetSchemas(ctx, )
List supported SCIM schemas
+Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimGetSchemasRequest struct via the builder pattern
-
-
### Return type
[**ScimSchemasListResponse**](ScimSchemasListResponse.md)
@@ -6690,21 +6155,16 @@ Other parameters are passed through a pointer to a apiScimGetSchemasRequest stru
## ScimGetServiceProviderConfig
-> ScimServiceProviderConfigResponse ScimGetServiceProviderConfig(ctx).Execute()
+> ScimServiceProviderConfigResponse ScimGetServiceProviderConfig(ctx, )
Get SCIM service provider configuration
+Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimGetServiceProviderConfigRequest struct via the builder pattern
-
-
### Return type
[**ScimServiceProviderConfigResponse**](ScimServiceProviderConfigResponse.md)
@@ -6725,28 +6185,19 @@ Other parameters are passed through a pointer to a apiScimGetServiceProviderConf
## ScimGetUser
-> ScimUser ScimGetUser(ctx, userId).Execute()
+> ScimUser ScimGetUser(ctx, userId)
Get SCIM user
+Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimGetUserRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
+**userId** | **int32**| The ID of the user. |
### Return type
@@ -6768,21 +6219,16 @@ Name | Type | Description | Notes
## ScimGetUsers
-> ScimUsersListResponse ScimGetUsers(ctx).Execute()
+> ScimUsersListResponse ScimGetUsers(ctx, )
List SCIM users
+Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID.
-
-### Path Parameters
+### Required Parameters
This endpoint does not need any parameter.
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimGetUsersRequest struct via the builder pattern
-
-
### Return type
[**ScimUsersListResponse**](ScimUsersListResponse.md)
@@ -6803,29 +6249,20 @@ Other parameters are passed through a pointer to a apiScimGetUsersRequest struct
## ScimPatchUser
-> ScimUser ScimPatchUser(ctx, userId).Body(body).Execute()
+> ScimUser ScimPatchUser(ctx, userId, body)
Update SCIM user attributes
+Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimPatchUserRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**ScimPatchRequest**](ScimPatchRequest.md) | body |
+**userId** | **int32**| The ID of the user. |
+**body** | [**ScimPatchRequest**](ScimPatchRequest.md)| body |
### Return type
@@ -6847,29 +6284,20 @@ Name | Type | Description | Notes
## ScimReplaceUserAttributes
-> ScimUser ScimReplaceUserAttributes(ctx, userId).Body(body).Execute()
+> ScimUser ScimReplaceUserAttributes(ctx, userId, body)
Update SCIM user
+Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiScimReplaceUserAttributesRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**ScimNewUser**](ScimNewUser.md) | body |
+**userId** | **int32**| The ID of the user. |
+**body** | [**ScimNewUser**](ScimNewUser.md)| body |
### Return type
@@ -6891,46 +6319,48 @@ Name | Type | Description | Notes
## SearchCouponsAdvancedApplicationWideWithoutTotalCount
-> InlineResponse2009 SearchCouponsAdvancedApplicationWideWithoutTotalCount(ctx, applicationId).Body(body).PageSize(pageSize).Skip(skip).Sort(sort).Value(value).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Valid(valid).Usable(usable).ReferralId(referralId).RecipientIntegrationId(recipientIntegrationId).BatchId(batchId).ExactMatch(exactMatch).CampaignState(campaignState).Execute()
+> InlineResponse2009 SearchCouponsAdvancedApplicationWideWithoutTotalCount(ctx, applicationId, body, optional)
List coupons that match the given attributes (without total count)
+List the coupons whose attributes match the query criteria in all the campaigns of the given Application. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**body** | **map[string]interface{}**| body |
+ **optional** | ***SearchCouponsAdvancedApplicationWideWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a SearchCouponsAdvancedApplicationWideWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **map[string]interface{}** | body |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **value** | **string** | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
- **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
- **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
- **recipientIntegrationId** | **string** | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field |
- **batchId** | **string** | Filter results by batches of coupons |
- **exactMatch** | **bool** | Filter results to an exact case-insensitive matching against the coupon code | [default to false]
- **campaignState** | **string** | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **value** | **optional.**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
+ **usable** | **optional.**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
+ **referralId** | **optional.**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
+ **recipientIntegrationId** | **optional.**| Filter results by match with a profile ID specified in the coupon's RecipientIntegrationId field. |
+ **batchId** | **optional.**| Filter results by batches of coupons |
+ **exactMatch** | **optional.**| Filter results to an exact case-insensitive matching against the coupon code. | [default to false]
+ **campaignState** | **optional.**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. |
### Return type
-[**InlineResponse2009**](inline_response_200_9.md)
+[**InlineResponse2009**](InlineResponse2009.md)
### Authorization
@@ -6948,47 +6378,49 @@ Name | Type | Description | Notes
## SearchCouponsAdvancedWithoutTotalCount
-> InlineResponse2009 SearchCouponsAdvancedWithoutTotalCount(ctx, applicationId, campaignId).Body(body).PageSize(pageSize).Skip(skip).Sort(sort).Value(value).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Valid(valid).Usable(usable).ReferralId(referralId).RecipientIntegrationId(recipientIntegrationId).ExactMatch(exactMatch).BatchId(batchId).Execute()
+> InlineResponse2009 SearchCouponsAdvancedWithoutTotalCount(ctx, applicationId, campaignId, body, optional)
List coupons that match the given attributes in campaign (without total count)
+List the coupons whose attributes match the query criteria in the given campaign. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | **map[string]interface{}**| body |
+ **optional** | ***SearchCouponsAdvancedWithoutTotalCountOpts** | optional parameters | nil if no parameters
-### Other Parameters
+### Optional Parameters
-Other parameters are passed through a pointer to a apiSearchCouponsAdvancedWithoutTotalCountRequest struct via the builder pattern
+Optional parameters are passed through a pointer to a SearchCouponsAdvancedWithoutTotalCountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **map[string]interface{}** | body |
- **pageSize** | **int32** | The number of items in the response. | [default to 1000]
- **skip** | **int32** | The number of items to skip when paging through large result sets. |
- **sort** | **string** | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
- **value** | **string** | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
- **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
- **valid** | **string** | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
- **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
- **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
- **recipientIntegrationId** | **string** | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field |
- **exactMatch** | **bool** | Filter results to an exact case-insensitive matching against the coupon code | [default to false]
- **batchId** | **string** | Filter results by batches of coupons |
+
+ **pageSize** | **optional.**| The number of items in the response. | [default to 1000]
+ **skip** | **optional.**| The number of items to skip when paging through large result sets. |
+ **sort** | **optional.**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. |
+ **value** | **optional.**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. |
+ **createdBefore** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **createdAfter** | **optional.**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. |
+ **valid** | **optional.**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. |
+ **usable** | **optional.**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. |
+ **referralId** | **optional.**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. |
+ **recipientIntegrationId** | **optional.**| Filter results by match with a profile ID specified in the coupon's RecipientIntegrationId field. |
+ **exactMatch** | **optional.**| Filter results to an exact case-insensitive matching against the coupon code. | [default to false]
+ **batchId** | **optional.**| Filter results by batches of coupons |
### Return type
-[**InlineResponse2009**](inline_response_200_9.md)
+[**InlineResponse2009**](InlineResponse2009.md)
### Authorization
@@ -7006,31 +6438,21 @@ Name | Type | Description | Notes
## TransferLoyaltyCard
-> TransferLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute()
+> TransferLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId, body)
Transfer card data
+Transfer loyalty card data, such as linked customers, loyalty balances and transactions, from a given loyalty card to a new, automatically created loyalty card. **Important:** - The original card is automatically blocked once the new card is created, and it cannot be activated again. - The default status of the new card is _active_.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiTransferLoyaltyCardRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**TransferLoyaltyCard**](TransferLoyaltyCard.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**body** | [**TransferLoyaltyCard**](TransferLoyaltyCard.md)| body |
### Return type
@@ -7052,29 +6474,20 @@ Name | Type | Description | Notes
## UpdateAccountCollection
-> Collection UpdateAccountCollection(ctx, collectionId).Body(body).Execute()
+> Collection UpdateAccountCollection(ctx, collectionId, body)
Update account-level collection
+Edit the description of a given account-level collection and enable or disable the collection in the specified Applications.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateAccountCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**UpdateCollection**](UpdateCollection.md) | body |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. |
+**body** | [**UpdateCollection**](UpdateCollection.md)| body |
### Return type
@@ -7096,33 +6509,22 @@ Name | Type | Description | Notes
## UpdateAchievement
-> Achievement UpdateAchievement(ctx, applicationId, campaignId, achievementId).Body(body).Execute()
+> Achievement UpdateAchievement(ctx, applicationId, campaignId, achievementId, body)
Update achievement
+Update the details of a specific achievement.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateAchievementRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
- **body** | [**UpdateAchievement**](UpdateAchievement.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**achievementId** | **int32**| The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. |
+**body** | [**UpdateAchievement**](UpdateAchievement.md)| body |
### Return type
@@ -7144,29 +6546,20 @@ Name | Type | Description | Notes
## UpdateAdditionalCost
-> AccountAdditionalCost UpdateAdditionalCost(ctx, additionalCostId).Body(body).Execute()
+> AccountAdditionalCost UpdateAdditionalCost(ctx, additionalCostId, body)
Update additional cost
+Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the `name` property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**additionalCostId** | **int32** | The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateAdditionalCostRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NewAdditionalCost**](NewAdditionalCost.md) | body |
+**additionalCostId** | **int32**| The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. |
+**body** | [**NewAdditionalCost**](NewAdditionalCost.md)| body |
### Return type
@@ -7188,29 +6581,20 @@ Name | Type | Description | Notes
## UpdateAttribute
-> Attribute UpdateAttribute(ctx, attributeId).Body(body).Execute()
+> Attribute UpdateAttribute(ctx, attributeId, body)
Update custom attribute
+Update an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the description. To change the `type` or `name` property of a custom attribute, create a new attribute and update any relevant integrations and rules to use the new attribute.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**attributeId** | **int32** | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateAttributeRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**NewAttribute**](NewAttribute.md) | body |
+**attributeId** | **int32**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. |
+**body** | [**NewAttribute**](NewAttribute.md)| body |
### Return type
@@ -7232,31 +6616,21 @@ Name | Type | Description | Notes
## UpdateCampaign
-> Campaign UpdateCampaign(ctx, applicationId, campaignId).Body(body).Execute()
+> Campaign UpdateCampaign(ctx, applicationId, campaignId, body)
Update campaign
+Update the given campaign. **Important:** You cannot use this endpoint to update campaigns if [campaign staging and revisions](https://docs.talon.one/docs/product/applications/managing-general-settings#campaign-staging-and-revisions) is enabled for your Application.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateCampaignRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**UpdateCampaign**](UpdateCampaign.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**UpdateCampaign**](UpdateCampaign.md)| body |
### Return type
@@ -7278,33 +6652,22 @@ Name | Type | Description | Notes
## UpdateCollection
-> Collection UpdateCollection(ctx, applicationId, campaignId, collectionId).Body(body).Execute()
+> Collection UpdateCollection(ctx, applicationId, campaignId, collectionId, body)
Update campaign-level collection's description
+Edit the description of a given campaign-level collection.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateCollectionRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
- **body** | [**UpdateCampaignCollection**](UpdateCampaignCollection.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**collectionId** | **int32**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. |
+**body** | [**UpdateCampaignCollection**](UpdateCampaignCollection.md)| body |
### Return type
@@ -7326,33 +6689,22 @@ Name | Type | Description | Notes
## UpdateCoupon
-> Coupon UpdateCoupon(ctx, applicationId, campaignId, couponId).Body(body).Execute()
+> Coupon UpdateCoupon(ctx, applicationId, campaignId, couponId, body)
Update coupon
+Update the specified coupon. Important
With this PUT
endpoint, if you do not explicitly set a value for the startDate
, expiryDate
, and recipientIntegrationId
properties in your request, it is automatically set to null
.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**couponId** | **string** | The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateCouponRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
- **body** | [**UpdateCoupon**](UpdateCoupon.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**couponId** | **string**| The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. |
+**body** | [**UpdateCoupon**](UpdateCoupon.md)| body |
### Return type
@@ -7374,31 +6726,21 @@ Name | Type | Description | Notes
## UpdateCouponBatch
-> UpdateCouponBatch(ctx, applicationId, campaignId).Body(body).Execute()
+> UpdateCouponBatch(ctx, applicationId, campaignId, body)
Update coupons
+Update all coupons or a specific batch of coupons in the given campaign. You can find the `batchId` on the **Coupons** page of your campaign in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount). Important
- Only send sequential requests to this endpoint.
- Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team.
- With this
PUT
endpoint, if you do not explicitly set a value for the startDate
and expiryDate
properties in your request, it is automatically set to null
.
To update a specific coupon, use [Update coupon](#operation/updateCoupon).
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateCouponBatchRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**UpdateCouponBatch**](UpdateCouponBatch.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**body** | [**UpdateCouponBatch**](UpdateCouponBatch.md)| body |
### Return type
@@ -7420,31 +6762,21 @@ Name | Type | Description | Notes
## UpdateLoyaltyCard
-> LoyaltyCard UpdateLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute()
+> LoyaltyCard UpdateLoyaltyCard(ctx, loyaltyProgramId, loyaltyCardId, body)
Update loyalty card status
+Update the status of the given loyalty card. A card can be _active_ or _inactive_.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
-**loyaltyCardId** | **string** | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateLoyaltyCardRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**UpdateLoyaltyCard**](UpdateLoyaltyCard.md) | body |
+**loyaltyProgramId** | **int32**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. |
+**loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. |
+**body** | [**UpdateLoyaltyCard**](UpdateLoyaltyCard.md)| body |
### Return type
@@ -7466,33 +6798,22 @@ Name | Type | Description | Notes
## UpdateReferral
-> Referral UpdateReferral(ctx, applicationId, campaignId, referralId).Body(body).Execute()
+> Referral UpdateReferral(ctx, applicationId, campaignId, referralId, body)
Update referral
+Update the specified referral.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. |
-**referralId** | **string** | The ID of the referral code. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateReferralRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
-
- **body** | [**UpdateReferral**](UpdateReferral.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**campaignId** | **int32**| The ID of the campaign. It is displayed in your Talon.One deployment URL. |
+**referralId** | **string**| The ID of the referral code. |
+**body** | [**UpdateReferral**](UpdateReferral.md)| body |
### Return type
@@ -7514,29 +6835,20 @@ Name | Type | Description | Notes
## UpdateRoleV2
-> RoleV2 UpdateRoleV2(ctx, roleId).Body(body).Execute()
+> RoleV2 UpdateRoleV2(ctx, roleId, body)
Update role
+Update a specific role.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**roleId** | **int32** | The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateRoleV2Request struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | **RoleV2Base** | body |
+**roleId** | **int32**| The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. |
+**body** | **RoleV2Base**| body |
### Return type
@@ -7558,31 +6870,21 @@ Name | Type | Description | Notes
## UpdateStore
-> Store UpdateStore(ctx, applicationId, storeId).Body(body).Execute()
+> Store UpdateStore(ctx, applicationId, storeId, body)
Update store
+Update store details for a specific store ID.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. |
-**storeId** | **string** | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateStoreRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
-
- **body** | [**NewStore**](NewStore.md) | body |
+**applicationId** | **int32**| The ID of the Application. It is displayed in your Talon.One deployment URL. |
+**storeId** | **string**| The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
+**body** | [**NewStore**](NewStore.md)| body |
### Return type
@@ -7604,29 +6906,20 @@ Name | Type | Description | Notes
## UpdateUser
-> User UpdateUser(ctx, userId).Body(body).Execute()
+> User UpdateUser(ctx, userId, body)
Update user
+Update the details of a specific user.
-
-### Path Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**userId** | **int32** | The ID of the user. |
-
-### Other Parameters
-
-Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-
- **body** | [**UpdateUser**](UpdateUser.md) | body |
+**userId** | **int32**| The ID of the user. |
+**body** | [**UpdateUser**](UpdateUser.md)| body |
### Return type
diff --git a/docs/MessageLogEntry.md b/docs/MessageLogEntry.md
index 69891304..381e174b 100644
--- a/docs/MessageLogEntry.md
+++ b/docs/MessageLogEntry.md
@@ -9,12 +9,16 @@ Name | Type | Description | Notes
**ChangeType** | Pointer to **string** | Type of change that triggered the notification. | [optional]
**NotificationId** | Pointer to **int32** | ID of the notification. | [optional]
**NotificationName** | Pointer to **string** | The name of the notification. | [optional]
+**WebhookId** | Pointer to **int32** | ID of the webhook. | [optional]
+**WebhookName** | Pointer to **string** | The name of the webhook. | [optional]
**Request** | Pointer to [**MessageLogRequest**](MessageLogRequest.md) | | [optional]
**Response** | Pointer to [**MessageLogResponse**](MessageLogResponse.md) | | [optional]
**CreatedAt** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the log entry was created. |
-**EntityType** | Pointer to **string** | The entity type the notification is related to. | [optional]
+**EntityType** | Pointer to **string** | The entity type the log is related to. |
+**Url** | Pointer to **string** | The target URL of the request. | [optional]
**ApplicationId** | Pointer to **int32** | Identifier of the Application. | [optional]
**LoyaltyProgramId** | Pointer to **int32** | Identifier of the loyalty program. | [optional]
+**CampaignId** | Pointer to **int32** | Identifier of the campaign. | [optional]
## Methods
@@ -143,6 +147,56 @@ HasNotificationName returns a boolean if a field has been set.
SetNotificationName gets a reference to the given string and assigns it to the NotificationName field.
+### GetWebhookId
+
+`func (o *MessageLogEntry) GetWebhookId() int32`
+
+GetWebhookId returns the WebhookId field if non-nil, zero value otherwise.
+
+### GetWebhookIdOk
+
+`func (o *MessageLogEntry) GetWebhookIdOk() (int32, bool)`
+
+GetWebhookIdOk returns a tuple with the WebhookId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasWebhookId
+
+`func (o *MessageLogEntry) HasWebhookId() bool`
+
+HasWebhookId returns a boolean if a field has been set.
+
+### SetWebhookId
+
+`func (o *MessageLogEntry) SetWebhookId(v int32)`
+
+SetWebhookId gets a reference to the given int32 and assigns it to the WebhookId field.
+
+### GetWebhookName
+
+`func (o *MessageLogEntry) GetWebhookName() string`
+
+GetWebhookName returns the WebhookName field if non-nil, zero value otherwise.
+
+### GetWebhookNameOk
+
+`func (o *MessageLogEntry) GetWebhookNameOk() (string, bool)`
+
+GetWebhookNameOk returns a tuple with the WebhookName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasWebhookName
+
+`func (o *MessageLogEntry) HasWebhookName() bool`
+
+HasWebhookName returns a boolean if a field has been set.
+
+### SetWebhookName
+
+`func (o *MessageLogEntry) SetWebhookName(v string)`
+
+SetWebhookName gets a reference to the given string and assigns it to the WebhookName field.
+
### GetRequest
`func (o *MessageLogEntry) GetRequest() MessageLogRequest`
@@ -243,6 +297,31 @@ HasEntityType returns a boolean if a field has been set.
SetEntityType gets a reference to the given string and assigns it to the EntityType field.
+### GetUrl
+
+`func (o *MessageLogEntry) GetUrl() string`
+
+GetUrl returns the Url field if non-nil, zero value otherwise.
+
+### GetUrlOk
+
+`func (o *MessageLogEntry) GetUrlOk() (string, bool)`
+
+GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasUrl
+
+`func (o *MessageLogEntry) HasUrl() bool`
+
+HasUrl returns a boolean if a field has been set.
+
+### SetUrl
+
+`func (o *MessageLogEntry) SetUrl(v string)`
+
+SetUrl gets a reference to the given string and assigns it to the Url field.
+
### GetApplicationId
`func (o *MessageLogEntry) GetApplicationId() int32`
@@ -293,6 +372,31 @@ HasLoyaltyProgramId returns a boolean if a field has been set.
SetLoyaltyProgramId gets a reference to the given int32 and assigns it to the LoyaltyProgramId field.
+### GetCampaignId
+
+`func (o *MessageLogEntry) GetCampaignId() int32`
+
+GetCampaignId returns the CampaignId field if non-nil, zero value otherwise.
+
+### GetCampaignIdOk
+
+`func (o *MessageLogEntry) GetCampaignIdOk() (int32, bool)`
+
+GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCampaignId
+
+`func (o *MessageLogEntry) HasCampaignId() bool`
+
+HasCampaignId returns a boolean if a field has been set.
+
+### SetCampaignId
+
+`func (o *MessageLogEntry) SetCampaignId(v int32)`
+
+SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/NewApplicationCifExpression.md b/docs/NewApplicationCifExpression.md
index feb0d7a8..46c295e7 100644
--- a/docs/NewApplicationCifExpression.md
+++ b/docs/NewApplicationCifExpression.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CartItemFilterId** | Pointer to **int32** | The ID of the Application cart item filter. | [optional]
**CreatedBy** | Pointer to **int32** | The ID of the user who created the Application cart item filter. | [optional]
-**Expression** | Pointer to [**[]interface{}**]([]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
+**Expression** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
## Methods
@@ -62,13 +62,13 @@ SetCreatedBy gets a reference to the given int32 and assigns it to the CreatedBy
### GetExpression
-`func (o *NewApplicationCifExpression) GetExpression() []interface{}`
+`func (o *NewApplicationCifExpression) GetExpression() []map[string]interface{}`
GetExpression returns the Expression field if non-nil, zero value otherwise.
### GetExpressionOk
-`func (o *NewApplicationCifExpression) GetExpressionOk() ([]interface{}, bool)`
+`func (o *NewApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool)`
GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +81,9 @@ HasExpression returns a boolean if a field has been set.
### SetExpression
-`func (o *NewApplicationCifExpression) SetExpression(v []interface{})`
+`func (o *NewApplicationCifExpression) SetExpression(v []map[string]interface{})`
-SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
+SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/NewCampaignStoreBudget.md b/docs/NewCampaignStoreBudget.md
new file mode 100644
index 00000000..9d46d2f1
--- /dev/null
+++ b/docs/NewCampaignStoreBudget.md
@@ -0,0 +1,91 @@
+# NewCampaignStoreBudget
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Action** | Pointer to **string** | |
+**StoreLimits** | Pointer to [**[]NewCampaignStoreBudgetStoreLimit**](NewCampaignStoreBudgetStoreLimit.md) | The set of budget limits for stores linked to the campaign. |
+**Period** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetAction
+
+`func (o *NewCampaignStoreBudget) GetAction() string`
+
+GetAction returns the Action field if non-nil, zero value otherwise.
+
+### GetActionOk
+
+`func (o *NewCampaignStoreBudget) GetActionOk() (string, bool)`
+
+GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAction
+
+`func (o *NewCampaignStoreBudget) HasAction() bool`
+
+HasAction returns a boolean if a field has been set.
+
+### SetAction
+
+`func (o *NewCampaignStoreBudget) SetAction(v string)`
+
+SetAction gets a reference to the given string and assigns it to the Action field.
+
+### GetStoreLimits
+
+`func (o *NewCampaignStoreBudget) GetStoreLimits() []NewCampaignStoreBudgetStoreLimit`
+
+GetStoreLimits returns the StoreLimits field if non-nil, zero value otherwise.
+
+### GetStoreLimitsOk
+
+`func (o *NewCampaignStoreBudget) GetStoreLimitsOk() ([]NewCampaignStoreBudgetStoreLimit, bool)`
+
+GetStoreLimitsOk returns a tuple with the StoreLimits field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStoreLimits
+
+`func (o *NewCampaignStoreBudget) HasStoreLimits() bool`
+
+HasStoreLimits returns a boolean if a field has been set.
+
+### SetStoreLimits
+
+`func (o *NewCampaignStoreBudget) SetStoreLimits(v []NewCampaignStoreBudgetStoreLimit)`
+
+SetStoreLimits gets a reference to the given []NewCampaignStoreBudgetStoreLimit and assigns it to the StoreLimits field.
+
+### GetPeriod
+
+`func (o *NewCampaignStoreBudget) GetPeriod() string`
+
+GetPeriod returns the Period field if non-nil, zero value otherwise.
+
+### GetPeriodOk
+
+`func (o *NewCampaignStoreBudget) GetPeriodOk() (string, bool)`
+
+GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPeriod
+
+`func (o *NewCampaignStoreBudget) HasPeriod() bool`
+
+HasPeriod returns a boolean if a field has been set.
+
+### SetPeriod
+
+`func (o *NewCampaignStoreBudget) SetPeriod(v string)`
+
+SetPeriod gets a reference to the given string and assigns it to the Period field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/NewCampaignStoreBudgetStoreLimit.md b/docs/NewCampaignStoreBudgetStoreLimit.md
new file mode 100644
index 00000000..e6c71f29
--- /dev/null
+++ b/docs/NewCampaignStoreBudgetStoreLimit.md
@@ -0,0 +1,65 @@
+# NewCampaignStoreBudgetStoreLimit
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**StoreId** | Pointer to **int32** | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. |
+**Limit** | Pointer to **float32** | The value to set for the limit. |
+
+## Methods
+
+### GetStoreId
+
+`func (o *NewCampaignStoreBudgetStoreLimit) GetStoreId() int32`
+
+GetStoreId returns the StoreId field if non-nil, zero value otherwise.
+
+### GetStoreIdOk
+
+`func (o *NewCampaignStoreBudgetStoreLimit) GetStoreIdOk() (int32, bool)`
+
+GetStoreIdOk returns a tuple with the StoreId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStoreId
+
+`func (o *NewCampaignStoreBudgetStoreLimit) HasStoreId() bool`
+
+HasStoreId returns a boolean if a field has been set.
+
+### SetStoreId
+
+`func (o *NewCampaignStoreBudgetStoreLimit) SetStoreId(v int32)`
+
+SetStoreId gets a reference to the given int32 and assigns it to the StoreId field.
+
+### GetLimit
+
+`func (o *NewCampaignStoreBudgetStoreLimit) GetLimit() float32`
+
+GetLimit returns the Limit field if non-nil, zero value otherwise.
+
+### GetLimitOk
+
+`func (o *NewCampaignStoreBudgetStoreLimit) GetLimitOk() (float32, bool)`
+
+GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasLimit
+
+`func (o *NewCampaignStoreBudgetStoreLimit) HasLimit() bool`
+
+HasLimit returns a boolean if a field has been set.
+
+### SetLimit
+
+`func (o *NewCampaignStoreBudgetStoreLimit) SetLimit(v float32)`
+
+SetLimit gets a reference to the given float32 and assigns it to the Limit field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/NewCampaignTemplate.md b/docs/NewCampaignTemplate.md
index 866af025..e9d19cbe 100644
--- a/docs/NewCampaignTemplate.md
+++ b/docs/NewCampaignTemplate.md
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
**Tags** | Pointer to **[]string** | A list of tags for the campaign template. | [optional]
**Features** | Pointer to **[]string** | A list of features for the campaign template. | [optional]
**CouponSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**CouponReservationSettings** | Pointer to [**CampaignTemplateCouponReservationSettings**](CampaignTemplateCouponReservationSettings.md) | | [optional]
**ReferralSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
**Limits** | Pointer to [**[]TemplateLimitConfig**](TemplateLimitConfig.md) | The set of limits that will operate for this campaign template. | [optional]
**TemplateParams** | Pointer to [**[]CampaignTemplateParams**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional]
@@ -247,6 +248,31 @@ HasCouponSettings returns a boolean if a field has been set.
SetCouponSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CouponSettings field.
+### GetCouponReservationSettings
+
+`func (o *NewCampaignTemplate) GetCouponReservationSettings() CampaignTemplateCouponReservationSettings`
+
+GetCouponReservationSettings returns the CouponReservationSettings field if non-nil, zero value otherwise.
+
+### GetCouponReservationSettingsOk
+
+`func (o *NewCampaignTemplate) GetCouponReservationSettingsOk() (CampaignTemplateCouponReservationSettings, bool)`
+
+GetCouponReservationSettingsOk returns a tuple with the CouponReservationSettings field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCouponReservationSettings
+
+`func (o *NewCampaignTemplate) HasCouponReservationSettings() bool`
+
+HasCouponReservationSettings returns a boolean if a field has been set.
+
+### SetCouponReservationSettings
+
+`func (o *NewCampaignTemplate) SetCouponReservationSettings(v CampaignTemplateCouponReservationSettings)`
+
+SetCouponReservationSettings gets a reference to the given CampaignTemplateCouponReservationSettings and assigns it to the CouponReservationSettings field.
+
### GetReferralSettings
`func (o *NewCampaignTemplate) GetReferralSettings() CodeGeneratorSettings`
diff --git a/docs/NewCustomerSessionV2.md b/docs/NewCustomerSessionV2.md
index 6e838003..dc2d6e0b 100644
--- a/docs/NewCustomerSessionV2.md
+++ b/docs/NewCustomerSessionV2.md
@@ -7,13 +7,13 @@ Name | Type | Description | Notes
**ProfileId** | Pointer to **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional]
**StoreIntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. | [optional]
**EvaluableCampaignIds** | Pointer to **[]int32** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional]
-**CouponCodes** | Pointer to **[]string** | Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely. | [optional]
-**ReferralCode** | Pointer to **string** | Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely. | [optional]
+**CouponCodes** | Pointer to **[]string** | Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, omit the parameter entirely. | [optional]
+**ReferralCode** | Pointer to **string** | Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, omit the parameter entirely. | [optional]
**LoyaltyCards** | Pointer to **[]string** | Identifier of a loyalty card. | [optional]
**State** | Pointer to **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [optional] [default to STATE_OPEN]
**CartItems** | Pointer to [**[]CartItem**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | [optional]
**AdditionalCosts** | Pointer to [**map[string]AdditionalCost**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional]
-**Identifiers** | Pointer to **[]string** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). | [optional]
+**Identifiers** | Pointer to **[]string** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). - We recommend passing an anonymized (hashed) version of the identifier value. | [optional]
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property. | [optional]
## Methods
diff --git a/docs/NewLoyaltyProgram.md b/docs/NewLoyaltyProgram.md
index 6ceba5cf..881c0dce 100644
--- a/docs/NewLoyaltyProgram.md
+++ b/docs/NewLoyaltyProgram.md
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires and is reevaluated. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional]
**TiersDowngradePolicy** | Pointer to **string** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional]
**CardCodeSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**ReturnPolicy** | Pointer to **string** | The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative. | [optional]
**Name** | Pointer to **string** | The internal name for the Loyalty Program. This is an immutable value. |
**Tiers** | Pointer to [**[]NewLoyaltyTier**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional]
**Timezone** | Pointer to **string** | A string containing an IANA timezone descriptor. |
@@ -375,6 +376,31 @@ HasCardCodeSettings returns a boolean if a field has been set.
SetCardCodeSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CardCodeSettings field.
+### GetReturnPolicy
+
+`func (o *NewLoyaltyProgram) GetReturnPolicy() string`
+
+GetReturnPolicy returns the ReturnPolicy field if non-nil, zero value otherwise.
+
+### GetReturnPolicyOk
+
+`func (o *NewLoyaltyProgram) GetReturnPolicyOk() (string, bool)`
+
+GetReturnPolicyOk returns a tuple with the ReturnPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasReturnPolicy
+
+`func (o *NewLoyaltyProgram) HasReturnPolicy() bool`
+
+HasReturnPolicy returns a boolean if a field has been set.
+
+### SetReturnPolicy
+
+`func (o *NewLoyaltyProgram) SetReturnPolicy(v string)`
+
+SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+
### GetName
`func (o *NewLoyaltyProgram) GetName() string`
diff --git a/docs/NewLoyaltyTier.md b/docs/NewLoyaltyTier.md
index da302d23..2c8d5e78 100644
--- a/docs/NewLoyaltyTier.md
+++ b/docs/NewLoyaltyTier.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | Pointer to **string** | The name of the tier |
-**MinPoints** | Pointer to **float32** | The minimum amount of points required to be eligible for the tier. |
+**Name** | Pointer to **string** | The name of the tier. |
+**MinPoints** | Pointer to **float32** | The minimum amount of points required to enter the tier. |
## Methods
diff --git a/docs/NewTemplateDef.md b/docs/NewTemplateDef.md
index 5e5f65e8..5f6634bf 100644
--- a/docs/NewTemplateDef.md
+++ b/docs/NewTemplateDef.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**Description** | Pointer to **string** | A short description of the template that will be shown in the rule editor. | [optional]
**Help** | Pointer to **string** | Extended help text for the template. | [optional]
**Category** | Pointer to **string** | Used for grouping templates in the rule editor sidebar. |
-**Expr** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
+**Expr** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
**Args** | Pointer to [**[]TemplateArgDef**](TemplateArgDef.md) | An array of argument definitions. |
**Expose** | Pointer to **bool** | A flag to control exposure in Rule Builder. | [optional] [default to false]
@@ -116,13 +116,13 @@ SetCategory gets a reference to the given string and assigns it to the Category
### GetExpr
-`func (o *NewTemplateDef) GetExpr() []interface{}`
+`func (o *NewTemplateDef) GetExpr() []map[string]interface{}`
GetExpr returns the Expr field if non-nil, zero value otherwise.
### GetExprOk
-`func (o *NewTemplateDef) GetExprOk() ([]interface{}, bool)`
+`func (o *NewTemplateDef) GetExprOk() ([]map[string]interface{}, bool)`
GetExprOk returns a tuple with the Expr field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -135,9 +135,9 @@ HasExpr returns a boolean if a field has been set.
### SetExpr
-`func (o *NewTemplateDef) SetExpr(v []interface{})`
+`func (o *NewTemplateDef) SetExpr(v []map[string]interface{})`
-SetExpr gets a reference to the given []interface{} and assigns it to the Expr field.
+SetExpr gets a reference to the given []map[string]interface{} and assigns it to the Expr field.
### GetArgs
diff --git a/docs/NewWebhook.md b/docs/NewWebhook.md
index d942ba09..224e10fd 100644
--- a/docs/NewWebhook.md
+++ b/docs/NewWebhook.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications that are related to this entity. |
+**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications in which this webhook is available. An empty array means the webhook is available in `All Applications`. |
**Title** | Pointer to **string** | Name or title for this webhook. |
**Description** | Pointer to **string** | A description of the webhook. | [optional]
**Verb** | Pointer to **string** | API method for this webhook. |
diff --git a/docs/Product.md b/docs/Product.md
index 10bdb9c6..8622d95b 100644
--- a/docs/Product.md
+++ b/docs/Product.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | Pointer to **string** | The name of the product. |
+**Name** | Pointer to **string** | The product the item belongs to. |
## Methods
diff --git a/docs/ProductSearchMatch.md b/docs/ProductSearchMatch.md
new file mode 100644
index 00000000..cc0d11b2
--- /dev/null
+++ b/docs/ProductSearchMatch.md
@@ -0,0 +1,91 @@
+# ProductSearchMatch
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ProductId** | Pointer to **int32** | The ID of the product. |
+**Value** | Pointer to **string** | The string matching the given value. Either a product name or SKU. |
+**ProductSkuId** | Pointer to **int32** | The ID of the SKU linked to a product. If empty, this is an analytics-level product. | [optional]
+
+## Methods
+
+### GetProductId
+
+`func (o *ProductSearchMatch) GetProductId() int32`
+
+GetProductId returns the ProductId field if non-nil, zero value otherwise.
+
+### GetProductIdOk
+
+`func (o *ProductSearchMatch) GetProductIdOk() (int32, bool)`
+
+GetProductIdOk returns a tuple with the ProductId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProductId
+
+`func (o *ProductSearchMatch) HasProductId() bool`
+
+HasProductId returns a boolean if a field has been set.
+
+### SetProductId
+
+`func (o *ProductSearchMatch) SetProductId(v int32)`
+
+SetProductId gets a reference to the given int32 and assigns it to the ProductId field.
+
+### GetValue
+
+`func (o *ProductSearchMatch) GetValue() string`
+
+GetValue returns the Value field if non-nil, zero value otherwise.
+
+### GetValueOk
+
+`func (o *ProductSearchMatch) GetValueOk() (string, bool)`
+
+GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasValue
+
+`func (o *ProductSearchMatch) HasValue() bool`
+
+HasValue returns a boolean if a field has been set.
+
+### SetValue
+
+`func (o *ProductSearchMatch) SetValue(v string)`
+
+SetValue gets a reference to the given string and assigns it to the Value field.
+
+### GetProductSkuId
+
+`func (o *ProductSearchMatch) GetProductSkuId() int32`
+
+GetProductSkuId returns the ProductSkuId field if non-nil, zero value otherwise.
+
+### GetProductSkuIdOk
+
+`func (o *ProductSearchMatch) GetProductSkuIdOk() (int32, bool)`
+
+GetProductSkuIdOk returns a tuple with the ProductSkuId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProductSkuId
+
+`func (o *ProductSearchMatch) HasProductSkuId() bool`
+
+HasProductSkuId returns a boolean if a field has been set.
+
+### SetProductSkuId
+
+`func (o *ProductSearchMatch) SetProductSkuId(v int32)`
+
+SetProductSkuId gets a reference to the given int32 and assigns it to the ProductSkuId field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ProductSkuUnitAnalytics.md b/docs/ProductSkuUnitAnalytics.md
new file mode 100644
index 00000000..e4ac9b37
--- /dev/null
+++ b/docs/ProductSkuUnitAnalytics.md
@@ -0,0 +1,117 @@
+# ProductSkuUnitAnalytics
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**StartTime** | Pointer to [**time.Time**](time.Time.md) | The start of the aggregation time frame in UTC. |
+**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the aggregation time frame in UTC. |
+**PurchasedUnits** | Pointer to [**AnalyticsDataPointWithTrend**](AnalyticsDataPointWithTrend.md) | |
+**Sku** | Pointer to **string** | The SKU linked to the analytics-level product. |
+
+## Methods
+
+### GetStartTime
+
+`func (o *ProductSkuUnitAnalytics) GetStartTime() time.Time`
+
+GetStartTime returns the StartTime field if non-nil, zero value otherwise.
+
+### GetStartTimeOk
+
+`func (o *ProductSkuUnitAnalytics) GetStartTimeOk() (time.Time, bool)`
+
+GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStartTime
+
+`func (o *ProductSkuUnitAnalytics) HasStartTime() bool`
+
+HasStartTime returns a boolean if a field has been set.
+
+### SetStartTime
+
+`func (o *ProductSkuUnitAnalytics) SetStartTime(v time.Time)`
+
+SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field.
+
+### GetEndTime
+
+`func (o *ProductSkuUnitAnalytics) GetEndTime() time.Time`
+
+GetEndTime returns the EndTime field if non-nil, zero value otherwise.
+
+### GetEndTimeOk
+
+`func (o *ProductSkuUnitAnalytics) GetEndTimeOk() (time.Time, bool)`
+
+GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEndTime
+
+`func (o *ProductSkuUnitAnalytics) HasEndTime() bool`
+
+HasEndTime returns a boolean if a field has been set.
+
+### SetEndTime
+
+`func (o *ProductSkuUnitAnalytics) SetEndTime(v time.Time)`
+
+SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field.
+
+### GetPurchasedUnits
+
+`func (o *ProductSkuUnitAnalytics) GetPurchasedUnits() AnalyticsDataPointWithTrend`
+
+GetPurchasedUnits returns the PurchasedUnits field if non-nil, zero value otherwise.
+
+### GetPurchasedUnitsOk
+
+`func (o *ProductSkuUnitAnalytics) GetPurchasedUnitsOk() (AnalyticsDataPointWithTrend, bool)`
+
+GetPurchasedUnitsOk returns a tuple with the PurchasedUnits field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPurchasedUnits
+
+`func (o *ProductSkuUnitAnalytics) HasPurchasedUnits() bool`
+
+HasPurchasedUnits returns a boolean if a field has been set.
+
+### SetPurchasedUnits
+
+`func (o *ProductSkuUnitAnalytics) SetPurchasedUnits(v AnalyticsDataPointWithTrend)`
+
+SetPurchasedUnits gets a reference to the given AnalyticsDataPointWithTrend and assigns it to the PurchasedUnits field.
+
+### GetSku
+
+`func (o *ProductSkuUnitAnalytics) GetSku() string`
+
+GetSku returns the Sku field if non-nil, zero value otherwise.
+
+### GetSkuOk
+
+`func (o *ProductSkuUnitAnalytics) GetSkuOk() (string, bool)`
+
+GetSkuOk returns a tuple with the Sku field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSku
+
+`func (o *ProductSkuUnitAnalytics) HasSku() bool`
+
+HasSku returns a boolean if a field has been set.
+
+### SetSku
+
+`func (o *ProductSkuUnitAnalytics) SetSku(v string)`
+
+SetSku gets a reference to the given string and assigns it to the Sku field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ProductUnitAnalytics.md b/docs/ProductUnitAnalytics.md
new file mode 100644
index 00000000..67076d1b
--- /dev/null
+++ b/docs/ProductUnitAnalytics.md
@@ -0,0 +1,143 @@
+# ProductUnitAnalytics
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**StartTime** | Pointer to [**time.Time**](time.Time.md) | The start of the aggregation time frame in UTC. |
+**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the aggregation time frame in UTC. |
+**PurchasedUnits** | Pointer to [**AnalyticsDataPointWithTrend**](AnalyticsDataPointWithTrend.md) | |
+**ProductId** | Pointer to **int32** | The ID of the analytics-level product. |
+**ProductName** | Pointer to **string** | The name of the analytics-level product. |
+
+## Methods
+
+### GetStartTime
+
+`func (o *ProductUnitAnalytics) GetStartTime() time.Time`
+
+GetStartTime returns the StartTime field if non-nil, zero value otherwise.
+
+### GetStartTimeOk
+
+`func (o *ProductUnitAnalytics) GetStartTimeOk() (time.Time, bool)`
+
+GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStartTime
+
+`func (o *ProductUnitAnalytics) HasStartTime() bool`
+
+HasStartTime returns a boolean if a field has been set.
+
+### SetStartTime
+
+`func (o *ProductUnitAnalytics) SetStartTime(v time.Time)`
+
+SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field.
+
+### GetEndTime
+
+`func (o *ProductUnitAnalytics) GetEndTime() time.Time`
+
+GetEndTime returns the EndTime field if non-nil, zero value otherwise.
+
+### GetEndTimeOk
+
+`func (o *ProductUnitAnalytics) GetEndTimeOk() (time.Time, bool)`
+
+GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEndTime
+
+`func (o *ProductUnitAnalytics) HasEndTime() bool`
+
+HasEndTime returns a boolean if a field has been set.
+
+### SetEndTime
+
+`func (o *ProductUnitAnalytics) SetEndTime(v time.Time)`
+
+SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field.
+
+### GetPurchasedUnits
+
+`func (o *ProductUnitAnalytics) GetPurchasedUnits() AnalyticsDataPointWithTrend`
+
+GetPurchasedUnits returns the PurchasedUnits field if non-nil, zero value otherwise.
+
+### GetPurchasedUnitsOk
+
+`func (o *ProductUnitAnalytics) GetPurchasedUnitsOk() (AnalyticsDataPointWithTrend, bool)`
+
+GetPurchasedUnitsOk returns a tuple with the PurchasedUnits field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPurchasedUnits
+
+`func (o *ProductUnitAnalytics) HasPurchasedUnits() bool`
+
+HasPurchasedUnits returns a boolean if a field has been set.
+
+### SetPurchasedUnits
+
+`func (o *ProductUnitAnalytics) SetPurchasedUnits(v AnalyticsDataPointWithTrend)`
+
+SetPurchasedUnits gets a reference to the given AnalyticsDataPointWithTrend and assigns it to the PurchasedUnits field.
+
+### GetProductId
+
+`func (o *ProductUnitAnalytics) GetProductId() int32`
+
+GetProductId returns the ProductId field if non-nil, zero value otherwise.
+
+### GetProductIdOk
+
+`func (o *ProductUnitAnalytics) GetProductIdOk() (int32, bool)`
+
+GetProductIdOk returns a tuple with the ProductId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProductId
+
+`func (o *ProductUnitAnalytics) HasProductId() bool`
+
+HasProductId returns a boolean if a field has been set.
+
+### SetProductId
+
+`func (o *ProductUnitAnalytics) SetProductId(v int32)`
+
+SetProductId gets a reference to the given int32 and assigns it to the ProductId field.
+
+### GetProductName
+
+`func (o *ProductUnitAnalytics) GetProductName() string`
+
+GetProductName returns the ProductName field if non-nil, zero value otherwise.
+
+### GetProductNameOk
+
+`func (o *ProductUnitAnalytics) GetProductNameOk() (string, bool)`
+
+GetProductNameOk returns a tuple with the ProductName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProductName
+
+`func (o *ProductUnitAnalytics) HasProductName() bool`
+
+HasProductName returns a boolean if a field has been set.
+
+### SetProductName
+
+`func (o *ProductUnitAnalytics) SetProductName(v string)`
+
+SetProductName gets a reference to the given string and assigns it to the ProductName field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Rule.md b/docs/Rule.md
index 94af45c1..8452f645 100644
--- a/docs/Rule.md
+++ b/docs/Rule.md
@@ -9,8 +9,8 @@ Name | Type | Description | Notes
**Title** | Pointer to **string** | A short description of the rule. |
**Description** | Pointer to **string** | A longer, more detailed description of the rule. | [optional]
**Bindings** | Pointer to [**[]Binding**](Binding.md) | An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array. | [optional]
-**Condition** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. |
-**Effects** | Pointer to [**[][]interface{}**]([][]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. |
+**Condition** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. |
+**Effects** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. |
## Methods
@@ -141,13 +141,13 @@ SetBindings gets a reference to the given []Binding and assigns it to the Bindin
### GetCondition
-`func (o *Rule) GetCondition() []interface{}`
+`func (o *Rule) GetCondition() []map[string]interface{}`
GetCondition returns the Condition field if non-nil, zero value otherwise.
### GetConditionOk
-`func (o *Rule) GetConditionOk() ([]interface{}, bool)`
+`func (o *Rule) GetConditionOk() ([]map[string]interface{}, bool)`
GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -160,19 +160,19 @@ HasCondition returns a boolean if a field has been set.
### SetCondition
-`func (o *Rule) SetCondition(v []interface{})`
+`func (o *Rule) SetCondition(v []map[string]interface{})`
-SetCondition gets a reference to the given []interface{} and assigns it to the Condition field.
+SetCondition gets a reference to the given []map[string]interface{} and assigns it to the Condition field.
### GetEffects
-`func (o *Rule) GetEffects() [][]interface{}`
+`func (o *Rule) GetEffects() []map[string]interface{}`
GetEffects returns the Effects field if non-nil, zero value otherwise.
### GetEffectsOk
-`func (o *Rule) GetEffectsOk() ([][]interface{}, bool)`
+`func (o *Rule) GetEffectsOk() ([]map[string]interface{}, bool)`
GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -185,9 +185,9 @@ HasEffects returns a boolean if a field has been set.
### SetEffects
-`func (o *Rule) SetEffects(v [][]interface{})`
+`func (o *Rule) SetEffects(v []map[string]interface{})`
-SetEffects gets a reference to the given [][]interface{} and assigns it to the Effects field.
+SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ScimNewUser.md b/docs/ScimNewUser.md
index 136a2d0a..9b139ac8 100644
--- a/docs/ScimNewUser.md
+++ b/docs/ScimNewUser.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Active** | Pointer to **bool** | Status of the user. | [optional]
**DisplayName** | Pointer to **string** | Display name of the user. | [optional]
-**UserName** | Pointer to **string** | Unique identifier of the user. This is usually an email address. | [optional]
+**UserName** | Pointer to **string** | Unique identifier of the user. This is usually an email address. |
**Name** | Pointer to [**ScimBaseUserName**](ScimBaseUser_name.md) | | [optional]
## Methods
diff --git a/docs/ScimServiceProviderConfigResponse.md b/docs/ScimServiceProviderConfigResponse.md
index 60e4b06a..3e4c8de5 100644
--- a/docs/ScimServiceProviderConfigResponse.md
+++ b/docs/ScimServiceProviderConfigResponse.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**Filter** | Pointer to [**ScimServiceProviderConfigResponseFilter**](ScimServiceProviderConfigResponse_filter.md) | | [optional]
**Patch** | Pointer to [**ScimServiceProviderConfigResponsePatch**](ScimServiceProviderConfigResponse_patch.md) | | [optional]
**Schemas** | Pointer to **[]string** | A list of SCIM schemas that define the structure and data types supported by the service provider. | [optional]
+**Sort** | Pointer to [**ScimServiceProviderConfigResponseSort**](ScimServiceProviderConfigResponse_sort.md) | | [optional]
## Methods
@@ -163,6 +164,31 @@ HasSchemas returns a boolean if a field has been set.
SetSchemas gets a reference to the given []string and assigns it to the Schemas field.
+### GetSort
+
+`func (o *ScimServiceProviderConfigResponse) GetSort() ScimServiceProviderConfigResponseSort`
+
+GetSort returns the Sort field if non-nil, zero value otherwise.
+
+### GetSortOk
+
+`func (o *ScimServiceProviderConfigResponse) GetSortOk() (ScimServiceProviderConfigResponseSort, bool)`
+
+GetSortOk returns a tuple with the Sort field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSort
+
+`func (o *ScimServiceProviderConfigResponse) HasSort() bool`
+
+HasSort returns a boolean if a field has been set.
+
+### SetSort
+
+`func (o *ScimServiceProviderConfigResponse) SetSort(v ScimServiceProviderConfigResponseSort)`
+
+SetSort gets a reference to the given ScimServiceProviderConfigResponseSort and assigns it to the Sort field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ScimServiceProviderConfigResponseSort.md b/docs/ScimServiceProviderConfigResponseSort.md
new file mode 100644
index 00000000..992fe49a
--- /dev/null
+++ b/docs/ScimServiceProviderConfigResponseSort.md
@@ -0,0 +1,39 @@
+# ScimServiceProviderConfigResponseSort
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Supported** | Pointer to **bool** | Indicates whether the service provider supports sorting operations for ordered query results. | [optional]
+
+## Methods
+
+### GetSupported
+
+`func (o *ScimServiceProviderConfigResponseSort) GetSupported() bool`
+
+GetSupported returns the Supported field if non-nil, zero value otherwise.
+
+### GetSupportedOk
+
+`func (o *ScimServiceProviderConfigResponseSort) GetSupportedOk() (bool, bool)`
+
+GetSupportedOk returns a tuple with the Supported field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSupported
+
+`func (o *ScimServiceProviderConfigResponseSort) HasSupported() bool`
+
+HasSupported returns a boolean if a field has been set.
+
+### SetSupported
+
+`func (o *ScimServiceProviderConfigResponseSort) SetSupported(v bool)`
+
+SetSupported gets a reference to the given bool and assigns it to the Supported field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ScimUser.md b/docs/ScimUser.md
index ec40f850..0e27555b 100644
--- a/docs/ScimUser.md
+++ b/docs/ScimUser.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Active** | Pointer to **bool** | Status of the user. | [optional]
**DisplayName** | Pointer to **string** | Display name of the user. | [optional]
-**UserName** | Pointer to **string** | Unique identifier of the user. This is usually an email address. | [optional]
+**UserName** | Pointer to **string** | Unique identifier of the user. This is usually an email address. |
**Name** | Pointer to [**ScimBaseUserName**](ScimBaseUser_name.md) | | [optional]
**Id** | Pointer to **string** | ID of the user. |
diff --git a/docs/Store.md b/docs/Store.md
index d912e8fc..2e273430 100644
--- a/docs/Store.md
+++ b/docs/Store.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Internal ID of this entity. |
-**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. The time this entity was created. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**Name** | Pointer to **string** | The name of the store. |
**Description** | Pointer to **string** | The description of the store. |
**Attributes** | Pointer to [**map[string]interface{}**](.md) | The attributes of the store. | [optional]
diff --git a/docs/StrikethroughDebugResponse.md b/docs/StrikethroughDebugResponse.md
new file mode 100644
index 00000000..1cf59d99
--- /dev/null
+++ b/docs/StrikethroughDebugResponse.md
@@ -0,0 +1,65 @@
+# StrikethroughDebugResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**CampaignsIDs** | Pointer to **[]int32** | The campaign IDs that got fetched for the evaluation process. | [optional]
+**Effects** | Pointer to [**[]StrikethroughEffect**](StrikethroughEffect.md) | The strikethrough effects that are returned from the evaluation process. | [optional]
+
+## Methods
+
+### GetCampaignsIDs
+
+`func (o *StrikethroughDebugResponse) GetCampaignsIDs() []int32`
+
+GetCampaignsIDs returns the CampaignsIDs field if non-nil, zero value otherwise.
+
+### GetCampaignsIDsOk
+
+`func (o *StrikethroughDebugResponse) GetCampaignsIDsOk() ([]int32, bool)`
+
+GetCampaignsIDsOk returns a tuple with the CampaignsIDs field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCampaignsIDs
+
+`func (o *StrikethroughDebugResponse) HasCampaignsIDs() bool`
+
+HasCampaignsIDs returns a boolean if a field has been set.
+
+### SetCampaignsIDs
+
+`func (o *StrikethroughDebugResponse) SetCampaignsIDs(v []int32)`
+
+SetCampaignsIDs gets a reference to the given []int32 and assigns it to the CampaignsIDs field.
+
+### GetEffects
+
+`func (o *StrikethroughDebugResponse) GetEffects() []StrikethroughEffect`
+
+GetEffects returns the Effects field if non-nil, zero value otherwise.
+
+### GetEffectsOk
+
+`func (o *StrikethroughDebugResponse) GetEffectsOk() ([]StrikethroughEffect, bool)`
+
+GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEffects
+
+`func (o *StrikethroughDebugResponse) HasEffects() bool`
+
+HasEffects returns a boolean if a field has been set.
+
+### SetEffects
+
+`func (o *StrikethroughDebugResponse) SetEffects(v []StrikethroughEffect)`
+
+SetEffects gets a reference to the given []StrikethroughEffect and assigns it to the Effects field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SummaryCampaignStoreBudget.md b/docs/SummaryCampaignStoreBudget.md
new file mode 100644
index 00000000..a2cb41da
--- /dev/null
+++ b/docs/SummaryCampaignStoreBudget.md
@@ -0,0 +1,91 @@
+# SummaryCampaignStoreBudget
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Action** | Pointer to **string** | |
+**Period** | Pointer to **string** | | [optional]
+**StoreCount** | Pointer to **int32** | |
+
+## Methods
+
+### GetAction
+
+`func (o *SummaryCampaignStoreBudget) GetAction() string`
+
+GetAction returns the Action field if non-nil, zero value otherwise.
+
+### GetActionOk
+
+`func (o *SummaryCampaignStoreBudget) GetActionOk() (string, bool)`
+
+GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAction
+
+`func (o *SummaryCampaignStoreBudget) HasAction() bool`
+
+HasAction returns a boolean if a field has been set.
+
+### SetAction
+
+`func (o *SummaryCampaignStoreBudget) SetAction(v string)`
+
+SetAction gets a reference to the given string and assigns it to the Action field.
+
+### GetPeriod
+
+`func (o *SummaryCampaignStoreBudget) GetPeriod() string`
+
+GetPeriod returns the Period field if non-nil, zero value otherwise.
+
+### GetPeriodOk
+
+`func (o *SummaryCampaignStoreBudget) GetPeriodOk() (string, bool)`
+
+GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPeriod
+
+`func (o *SummaryCampaignStoreBudget) HasPeriod() bool`
+
+HasPeriod returns a boolean if a field has been set.
+
+### SetPeriod
+
+`func (o *SummaryCampaignStoreBudget) SetPeriod(v string)`
+
+SetPeriod gets a reference to the given string and assigns it to the Period field.
+
+### GetStoreCount
+
+`func (o *SummaryCampaignStoreBudget) GetStoreCount() int32`
+
+GetStoreCount returns the StoreCount field if non-nil, zero value otherwise.
+
+### GetStoreCountOk
+
+`func (o *SummaryCampaignStoreBudget) GetStoreCountOk() (int32, bool)`
+
+GetStoreCountOk returns a tuple with the StoreCount field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStoreCount
+
+`func (o *SummaryCampaignStoreBudget) HasStoreCount() bool`
+
+HasStoreCount returns a boolean if a field has been set.
+
+### SetStoreCount
+
+`func (o *SummaryCampaignStoreBudget) SetStoreCount(v int32)`
+
+SetStoreCount gets a reference to the given int32 and assigns it to the StoreCount field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplateArgDef.md b/docs/TemplateArgDef.md
index fdd2f5c8..b936a507 100644
--- a/docs/TemplateArgDef.md
+++ b/docs/TemplateArgDef.md
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Description** | Pointer to **string** | A campaigner-friendly description of the argument, this will also be shown in the rule editor. | [optional]
**Title** | Pointer to **string** | A campaigner friendly name for the argument, this will be shown in the rule editor. |
**Ui** | Pointer to [**map[string]interface{}**](.md) | Arbitrary metadata that may be used to render an input for this argument. |
+**Key** | Pointer to **string** | The identifier for the associated value within the JSON object. | [optional]
**PicklistID** | Pointer to **int32** | ID of the picklist linked to a template. | [optional]
**RestrictedByPicklist** | Pointer to **bool** | Whether or not this attribute's value is restricted by picklist (`picklist` property) | [optional]
@@ -113,6 +114,31 @@ HasUi returns a boolean if a field has been set.
SetUi gets a reference to the given map[string]interface{} and assigns it to the Ui field.
+### GetKey
+
+`func (o *TemplateArgDef) GetKey() string`
+
+GetKey returns the Key field if non-nil, zero value otherwise.
+
+### GetKeyOk
+
+`func (o *TemplateArgDef) GetKeyOk() (string, bool)`
+
+GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasKey
+
+`func (o *TemplateArgDef) HasKey() bool`
+
+HasKey returns a boolean if a field has been set.
+
+### SetKey
+
+`func (o *TemplateArgDef) SetKey(v string)`
+
+SetKey gets a reference to the given string and assigns it to the Key field.
+
### GetPicklistID
`func (o *TemplateArgDef) GetPicklistID() int32`
diff --git a/docs/TemplateDef.md b/docs/TemplateDef.md
index b8504154..8a592852 100644
--- a/docs/TemplateDef.md
+++ b/docs/TemplateDef.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**Description** | Pointer to **string** | A short description of the template that will be shown in the rule editor. |
**Help** | Pointer to **string** | Extended help text for the template. |
**Category** | Pointer to **string** | Used for grouping templates in the rule editor sidebar. |
-**Expr** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
+**Expr** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
**Args** | Pointer to [**[]TemplateArgDef**](TemplateArgDef.md) | An array of argument definitions. |
**Expose** | Pointer to **bool** | A flag to control exposure in Rule Builder. | [optional] [default to false]
**Name** | Pointer to **string** | The template name used in Talang. |
@@ -195,13 +195,13 @@ SetCategory gets a reference to the given string and assigns it to the Category
### GetExpr
-`func (o *TemplateDef) GetExpr() []interface{}`
+`func (o *TemplateDef) GetExpr() []map[string]interface{}`
GetExpr returns the Expr field if non-nil, zero value otherwise.
### GetExprOk
-`func (o *TemplateDef) GetExprOk() ([]interface{}, bool)`
+`func (o *TemplateDef) GetExprOk() ([]map[string]interface{}, bool)`
GetExprOk returns a tuple with the Expr field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -214,9 +214,9 @@ HasExpr returns a boolean if a field has been set.
### SetExpr
-`func (o *TemplateDef) SetExpr(v []interface{})`
+`func (o *TemplateDef) SetExpr(v []map[string]interface{})`
-SetExpr gets a reference to the given []interface{} and assigns it to the Expr field.
+SetExpr gets a reference to the given []map[string]interface{} and assigns it to the Expr field.
### GetArgs
diff --git a/docs/UpdateAchievement.md b/docs/UpdateAchievement.md
index a9b65f0e..4c3c2965 100644
--- a/docs/UpdateAchievement.md
+++ b/docs/UpdateAchievement.md
@@ -10,6 +10,10 @@ Name | Type | Description | Notes
**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. | [optional]
**Period** | Pointer to **string** | The relative duration after which the achievement ends and resets for a particular customer profile. | [optional]
**PeriodEndOverride** | Pointer to [**TimePoint**](TimePoint.md) | | [optional]
+**RecurrencePolicy** | Pointer to **string** | The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. | [optional]
+**ActivationPolicy** | Pointer to **string** | The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. | [optional]
+**FixedStartDate** | Pointer to [**time.Time**](time.Time.md) | The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string. | [optional]
+**EndDate** | Pointer to [**time.Time**](time.Time.md) | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. | [optional]
## Methods
@@ -163,6 +167,106 @@ HasPeriodEndOverride returns a boolean if a field has been set.
SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field.
+### GetRecurrencePolicy
+
+`func (o *UpdateAchievement) GetRecurrencePolicy() string`
+
+GetRecurrencePolicy returns the RecurrencePolicy field if non-nil, zero value otherwise.
+
+### GetRecurrencePolicyOk
+
+`func (o *UpdateAchievement) GetRecurrencePolicyOk() (string, bool)`
+
+GetRecurrencePolicyOk returns a tuple with the RecurrencePolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasRecurrencePolicy
+
+`func (o *UpdateAchievement) HasRecurrencePolicy() bool`
+
+HasRecurrencePolicy returns a boolean if a field has been set.
+
+### SetRecurrencePolicy
+
+`func (o *UpdateAchievement) SetRecurrencePolicy(v string)`
+
+SetRecurrencePolicy gets a reference to the given string and assigns it to the RecurrencePolicy field.
+
+### GetActivationPolicy
+
+`func (o *UpdateAchievement) GetActivationPolicy() string`
+
+GetActivationPolicy returns the ActivationPolicy field if non-nil, zero value otherwise.
+
+### GetActivationPolicyOk
+
+`func (o *UpdateAchievement) GetActivationPolicyOk() (string, bool)`
+
+GetActivationPolicyOk returns a tuple with the ActivationPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasActivationPolicy
+
+`func (o *UpdateAchievement) HasActivationPolicy() bool`
+
+HasActivationPolicy returns a boolean if a field has been set.
+
+### SetActivationPolicy
+
+`func (o *UpdateAchievement) SetActivationPolicy(v string)`
+
+SetActivationPolicy gets a reference to the given string and assigns it to the ActivationPolicy field.
+
+### GetFixedStartDate
+
+`func (o *UpdateAchievement) GetFixedStartDate() time.Time`
+
+GetFixedStartDate returns the FixedStartDate field if non-nil, zero value otherwise.
+
+### GetFixedStartDateOk
+
+`func (o *UpdateAchievement) GetFixedStartDateOk() (time.Time, bool)`
+
+GetFixedStartDateOk returns a tuple with the FixedStartDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFixedStartDate
+
+`func (o *UpdateAchievement) HasFixedStartDate() bool`
+
+HasFixedStartDate returns a boolean if a field has been set.
+
+### SetFixedStartDate
+
+`func (o *UpdateAchievement) SetFixedStartDate(v time.Time)`
+
+SetFixedStartDate gets a reference to the given time.Time and assigns it to the FixedStartDate field.
+
+### GetEndDate
+
+`func (o *UpdateAchievement) GetEndDate() time.Time`
+
+GetEndDate returns the EndDate field if non-nil, zero value otherwise.
+
+### GetEndDateOk
+
+`func (o *UpdateAchievement) GetEndDateOk() (time.Time, bool)`
+
+GetEndDateOk returns a tuple with the EndDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEndDate
+
+`func (o *UpdateAchievement) HasEndDate() bool`
+
+HasEndDate returns a boolean if a field has been set.
+
+### SetEndDate
+
+`func (o *UpdateAchievement) SetEndDate(v time.Time)`
+
+SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UpdateCampaignTemplate.md b/docs/UpdateCampaignTemplate.md
index 66b874c7..37ada89e 100644
--- a/docs/UpdateCampaignTemplate.md
+++ b/docs/UpdateCampaignTemplate.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**Tags** | Pointer to **[]string** | A list of tags for the campaign template. | [optional]
**Features** | Pointer to **[]string** | A list of features for the campaign template. | [optional]
**CouponSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**CouponReservationSettings** | Pointer to [**CampaignTemplateCouponReservationSettings**](CampaignTemplateCouponReservationSettings.md) | | [optional]
**ReferralSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
**Limits** | Pointer to [**[]TemplateLimitConfig**](TemplateLimitConfig.md) | The set of limits that operate for this campaign template. | [optional]
**TemplateParams** | Pointer to [**[]CampaignTemplateParams**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional]
@@ -274,6 +275,31 @@ HasCouponSettings returns a boolean if a field has been set.
SetCouponSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CouponSettings field.
+### GetCouponReservationSettings
+
+`func (o *UpdateCampaignTemplate) GetCouponReservationSettings() CampaignTemplateCouponReservationSettings`
+
+GetCouponReservationSettings returns the CouponReservationSettings field if non-nil, zero value otherwise.
+
+### GetCouponReservationSettingsOk
+
+`func (o *UpdateCampaignTemplate) GetCouponReservationSettingsOk() (CampaignTemplateCouponReservationSettings, bool)`
+
+GetCouponReservationSettingsOk returns a tuple with the CouponReservationSettings field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCouponReservationSettings
+
+`func (o *UpdateCampaignTemplate) HasCouponReservationSettings() bool`
+
+HasCouponReservationSettings returns a boolean if a field has been set.
+
+### SetCouponReservationSettings
+
+`func (o *UpdateCampaignTemplate) SetCouponReservationSettings(v CampaignTemplateCouponReservationSettings)`
+
+SetCouponReservationSettings gets a reference to the given CampaignTemplateCouponReservationSettings and assigns it to the CouponReservationSettings field.
+
### GetReferralSettings
`func (o *UpdateCampaignTemplate) GetReferralSettings() CodeGeneratorSettings`
diff --git a/docs/UpdateCustomEffect.md b/docs/UpdateCustomEffect.md
index 2b46ddd3..0219e3b1 100644
--- a/docs/UpdateCustomEffect.md
+++ b/docs/UpdateCustomEffect.md
@@ -4,217 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications that are related to this entity. |
-**IsPerItem** | Pointer to **bool** | Indicates if this effect is per item or not. | [optional]
-**Name** | Pointer to **string** | The name of this effect. |
-**Title** | Pointer to **string** | The title of this effect. |
-**Payload** | Pointer to **string** | The JSON payload of this effect. |
-**Description** | Pointer to **string** | The description of this effect. | [optional]
-**Enabled** | Pointer to **bool** | Determines if this effect is active. |
-**Params** | Pointer to [**[]TemplateArgDef**](TemplateArgDef.md) | Array of template argument definitions. | [optional]
## Methods
-### GetApplicationIds
-
-`func (o *UpdateCustomEffect) GetApplicationIds() []int32`
-
-GetApplicationIds returns the ApplicationIds field if non-nil, zero value otherwise.
-
-### GetApplicationIdsOk
-
-`func (o *UpdateCustomEffect) GetApplicationIdsOk() ([]int32, bool)`
-
-GetApplicationIdsOk returns a tuple with the ApplicationIds field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasApplicationIds
-
-`func (o *UpdateCustomEffect) HasApplicationIds() bool`
-
-HasApplicationIds returns a boolean if a field has been set.
-
-### SetApplicationIds
-
-`func (o *UpdateCustomEffect) SetApplicationIds(v []int32)`
-
-SetApplicationIds gets a reference to the given []int32 and assigns it to the ApplicationIds field.
-
-### GetIsPerItem
-
-`func (o *UpdateCustomEffect) GetIsPerItem() bool`
-
-GetIsPerItem returns the IsPerItem field if non-nil, zero value otherwise.
-
-### GetIsPerItemOk
-
-`func (o *UpdateCustomEffect) GetIsPerItemOk() (bool, bool)`
-
-GetIsPerItemOk returns a tuple with the IsPerItem field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasIsPerItem
-
-`func (o *UpdateCustomEffect) HasIsPerItem() bool`
-
-HasIsPerItem returns a boolean if a field has been set.
-
-### SetIsPerItem
-
-`func (o *UpdateCustomEffect) SetIsPerItem(v bool)`
-
-SetIsPerItem gets a reference to the given bool and assigns it to the IsPerItem field.
-
-### GetName
-
-`func (o *UpdateCustomEffect) GetName() string`
-
-GetName returns the Name field if non-nil, zero value otherwise.
-
-### GetNameOk
-
-`func (o *UpdateCustomEffect) GetNameOk() (string, bool)`
-
-GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasName
-
-`func (o *UpdateCustomEffect) HasName() bool`
-
-HasName returns a boolean if a field has been set.
-
-### SetName
-
-`func (o *UpdateCustomEffect) SetName(v string)`
-
-SetName gets a reference to the given string and assigns it to the Name field.
-
-### GetTitle
-
-`func (o *UpdateCustomEffect) GetTitle() string`
-
-GetTitle returns the Title field if non-nil, zero value otherwise.
-
-### GetTitleOk
-
-`func (o *UpdateCustomEffect) GetTitleOk() (string, bool)`
-
-GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasTitle
-
-`func (o *UpdateCustomEffect) HasTitle() bool`
-
-HasTitle returns a boolean if a field has been set.
-
-### SetTitle
-
-`func (o *UpdateCustomEffect) SetTitle(v string)`
-
-SetTitle gets a reference to the given string and assigns it to the Title field.
-
-### GetPayload
-
-`func (o *UpdateCustomEffect) GetPayload() string`
-
-GetPayload returns the Payload field if non-nil, zero value otherwise.
-
-### GetPayloadOk
-
-`func (o *UpdateCustomEffect) GetPayloadOk() (string, bool)`
-
-GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasPayload
-
-`func (o *UpdateCustomEffect) HasPayload() bool`
-
-HasPayload returns a boolean if a field has been set.
-
-### SetPayload
-
-`func (o *UpdateCustomEffect) SetPayload(v string)`
-
-SetPayload gets a reference to the given string and assigns it to the Payload field.
-
-### GetDescription
-
-`func (o *UpdateCustomEffect) GetDescription() string`
-
-GetDescription returns the Description field if non-nil, zero value otherwise.
-
-### GetDescriptionOk
-
-`func (o *UpdateCustomEffect) GetDescriptionOk() (string, bool)`
-
-GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasDescription
-
-`func (o *UpdateCustomEffect) HasDescription() bool`
-
-HasDescription returns a boolean if a field has been set.
-
-### SetDescription
-
-`func (o *UpdateCustomEffect) SetDescription(v string)`
-
-SetDescription gets a reference to the given string and assigns it to the Description field.
-
-### GetEnabled
-
-`func (o *UpdateCustomEffect) GetEnabled() bool`
-
-GetEnabled returns the Enabled field if non-nil, zero value otherwise.
-
-### GetEnabledOk
-
-`func (o *UpdateCustomEffect) GetEnabledOk() (bool, bool)`
-
-GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasEnabled
-
-`func (o *UpdateCustomEffect) HasEnabled() bool`
-
-HasEnabled returns a boolean if a field has been set.
-
-### SetEnabled
-
-`func (o *UpdateCustomEffect) SetEnabled(v bool)`
-
-SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
-
-### GetParams
-
-`func (o *UpdateCustomEffect) GetParams() []TemplateArgDef`
-
-GetParams returns the Params field if non-nil, zero value otherwise.
-
-### GetParamsOk
-
-`func (o *UpdateCustomEffect) GetParamsOk() ([]TemplateArgDef, bool)`
-
-GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise
-and a boolean to check if the value has been set.
-
-### HasParams
-
-`func (o *UpdateCustomEffect) HasParams() bool`
-
-HasParams returns a boolean if a field has been set.
-
-### SetParams
-
-`func (o *UpdateCustomEffect) SetParams(v []TemplateArgDef)`
-
-SetParams gets a reference to the given []TemplateArgDef and assigns it to the Params field.
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UpdateLoyaltyProgram.md b/docs/UpdateLoyaltyProgram.md
index 2aecd792..be7a69c2 100644
--- a/docs/UpdateLoyaltyProgram.md
+++ b/docs/UpdateLoyaltyProgram.md
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires and is reevaluated. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional]
**TiersDowngradePolicy** | Pointer to **string** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional]
**CardCodeSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
+**ReturnPolicy** | Pointer to **string** | The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative. | [optional]
**Tiers** | Pointer to [**[]NewLoyaltyTier**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional]
## Methods
@@ -372,6 +373,31 @@ HasCardCodeSettings returns a boolean if a field has been set.
SetCardCodeSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CardCodeSettings field.
+### GetReturnPolicy
+
+`func (o *UpdateLoyaltyProgram) GetReturnPolicy() string`
+
+GetReturnPolicy returns the ReturnPolicy field if non-nil, zero value otherwise.
+
+### GetReturnPolicyOk
+
+`func (o *UpdateLoyaltyProgram) GetReturnPolicyOk() (string, bool)`
+
+GetReturnPolicyOk returns a tuple with the ReturnPolicy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasReturnPolicy
+
+`func (o *UpdateLoyaltyProgram) HasReturnPolicy() bool`
+
+HasReturnPolicy returns a boolean if a field has been set.
+
+### SetReturnPolicy
+
+`func (o *UpdateLoyaltyProgram) SetReturnPolicy(v string)`
+
+SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+
### GetTiers
`func (o *UpdateLoyaltyProgram) GetTiers() []NewLoyaltyTier`
diff --git a/docs/UpdateLoyaltyProgramTier.md b/docs/UpdateLoyaltyProgramTier.md
new file mode 100644
index 00000000..2a520198
--- /dev/null
+++ b/docs/UpdateLoyaltyProgramTier.md
@@ -0,0 +1,91 @@
+# UpdateLoyaltyProgramTier
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | Pointer to **int32** | The internal ID of the tier. |
+**Name** | Pointer to **string** | The name of the tier. | [optional]
+**MinPoints** | Pointer to **float32** | The minimum amount of points required to enter the tier. | [optional]
+
+## Methods
+
+### GetId
+
+`func (o *UpdateLoyaltyProgramTier) GetId() int32`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *UpdateLoyaltyProgramTier) GetIdOk() (int32, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *UpdateLoyaltyProgramTier) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *UpdateLoyaltyProgramTier) SetId(v int32)`
+
+SetId gets a reference to the given int32 and assigns it to the Id field.
+
+### GetName
+
+`func (o *UpdateLoyaltyProgramTier) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *UpdateLoyaltyProgramTier) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *UpdateLoyaltyProgramTier) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *UpdateLoyaltyProgramTier) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
+### GetMinPoints
+
+`func (o *UpdateLoyaltyProgramTier) GetMinPoints() float32`
+
+GetMinPoints returns the MinPoints field if non-nil, zero value otherwise.
+
+### GetMinPointsOk
+
+`func (o *UpdateLoyaltyProgramTier) GetMinPointsOk() (float32, bool)`
+
+GetMinPointsOk returns a tuple with the MinPoints field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMinPoints
+
+`func (o *UpdateLoyaltyProgramTier) HasMinPoints() bool`
+
+HasMinPoints returns a boolean if a field has been set.
+
+### SetMinPoints
+
+`func (o *UpdateLoyaltyProgramTier) SetMinPoints(v float32)`
+
+SetMinPoints gets a reference to the given float32 and assigns it to the MinPoints field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ValueMap.md b/docs/ValueMap.md
new file mode 100644
index 00000000..e3b8dd96
--- /dev/null
+++ b/docs/ValueMap.md
@@ -0,0 +1,117 @@
+# ValueMap
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | Pointer to **int32** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. |
+**Created** | Pointer to [**time.Time**](time.Time.md) | | [optional]
+**CreatedBy** | Pointer to **int32** | The ID of the user who created the value map. | [optional]
+**CampaignId** | Pointer to **int32** | |
+
+## Methods
+
+### GetId
+
+`func (o *ValueMap) GetId() int32`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *ValueMap) GetIdOk() (int32, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *ValueMap) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *ValueMap) SetId(v int32)`
+
+SetId gets a reference to the given int32 and assigns it to the Id field.
+
+### GetCreated
+
+`func (o *ValueMap) GetCreated() time.Time`
+
+GetCreated returns the Created field if non-nil, zero value otherwise.
+
+### GetCreatedOk
+
+`func (o *ValueMap) GetCreatedOk() (time.Time, bool)`
+
+GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCreated
+
+`func (o *ValueMap) HasCreated() bool`
+
+HasCreated returns a boolean if a field has been set.
+
+### SetCreated
+
+`func (o *ValueMap) SetCreated(v time.Time)`
+
+SetCreated gets a reference to the given time.Time and assigns it to the Created field.
+
+### GetCreatedBy
+
+`func (o *ValueMap) GetCreatedBy() int32`
+
+GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise.
+
+### GetCreatedByOk
+
+`func (o *ValueMap) GetCreatedByOk() (int32, bool)`
+
+GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCreatedBy
+
+`func (o *ValueMap) HasCreatedBy() bool`
+
+HasCreatedBy returns a boolean if a field has been set.
+
+### SetCreatedBy
+
+`func (o *ValueMap) SetCreatedBy(v int32)`
+
+SetCreatedBy gets a reference to the given int32 and assigns it to the CreatedBy field.
+
+### GetCampaignId
+
+`func (o *ValueMap) GetCampaignId() int32`
+
+GetCampaignId returns the CampaignId field if non-nil, zero value otherwise.
+
+### GetCampaignIdOk
+
+`func (o *ValueMap) GetCampaignIdOk() (int32, bool)`
+
+GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCampaignId
+
+`func (o *ValueMap) HasCampaignId() bool`
+
+HasCampaignId returns a boolean if a field has been set.
+
+### SetCampaignId
+
+`func (o *ValueMap) SetCampaignId(v int32)`
+
+SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Webhook.md b/docs/Webhook.md
index 8c404400..9e42c50d 100644
--- a/docs/Webhook.md
+++ b/docs/Webhook.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
**Id** | Pointer to **int32** | Internal ID of this entity. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**Modified** | Pointer to [**time.Time**](time.Time.md) | The time this entity was last modified. |
-**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. |
+**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications in which this webhook is available. An empty array means the webhook is available in `All Applications`. |
**Title** | Pointer to **string** | Name or title for this webhook. |
**Description** | Pointer to **string** | A description of the webhook. | [optional]
**Verb** | Pointer to **string** | API method for this webhook. |
diff --git a/docs/WebhookLogEntry.md b/docs/WebhookLogEntry.md
index 00bb0e10..0b6d95bc 100644
--- a/docs/WebhookLogEntry.md
+++ b/docs/WebhookLogEntry.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**IntegrationRequestUuid** | Pointer to **string** | UUID reference of the integration request linked to this webhook request. |
**WebhookId** | Pointer to **int32** | ID of the webhook that triggered the request. |
**ApplicationId** | Pointer to **int32** | ID of the application that triggered the webhook. | [optional]
-**Url** | Pointer to **string** | Target url of request |
+**Url** | Pointer to **string** | The target URL of the request. |
**Request** | Pointer to **string** | Request message |
**Response** | Pointer to **string** | Response message | [optional]
**Status** | Pointer to **int32** | HTTP status code of response. | [optional]
diff --git a/docs/WebhookWithOutgoingIntegrationDetails.md b/docs/WebhookWithOutgoingIntegrationDetails.md
index 51b8a844..227f0b9b 100644
--- a/docs/WebhookWithOutgoingIntegrationDetails.md
+++ b/docs/WebhookWithOutgoingIntegrationDetails.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
**Id** | Pointer to **int32** | Internal ID of this entity. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**Modified** | Pointer to [**time.Time**](time.Time.md) | The time this entity was last modified. |
-**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. |
+**ApplicationIds** | Pointer to **[]int32** | The IDs of the Applications in which this webhook is available. An empty array means the webhook is available in `All Applications`. |
**Title** | Pointer to **string** | Name or title for this webhook. |
**Description** | Pointer to **string** | A description of the webhook. | [optional]
**Verb** | Pointer to **string** | API method for this webhook. |
diff --git a/go.mod b/go.mod
index 9739545b..d461c58a 100644
--- a/go.mod
+++ b/go.mod
@@ -1,5 +1,5 @@
-module github.com/talon-one/talon_go/v8
+module github.com/talon-one/talon_go
go 1.13
-require golang.org/x/oauth2 v0.23.0
+require golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
diff --git a/go.sum b/go.sum
index 7c38313a..734252e6 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,13 @@
-cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
-golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
+golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
diff --git a/model_account.go b/model_account.go
index c1e9d7af..c9f609f1 100644
--- a/model_account.go
+++ b/model_account.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Account
+// Account struct for Account
type Account struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_account_additional_cost.go b/model_account_additional_cost.go
index 7e632e31..b30fa80b 100644
--- a/model_account_additional_cost.go
+++ b/model_account_additional_cost.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// AccountAdditionalCost
+// AccountAdditionalCost struct for AccountAdditionalCost
type AccountAdditionalCost struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_achievement.go b/model_achievement.go
index 5e3a3899..1d3af284 100644
--- a/model_achievement.go
+++ b/model_achievement.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Achievement
+// Achievement struct for Achievement
type Achievement struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -32,6 +32,14 @@ type Achievement struct {
// The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period.
Period string `json:"period"`
PeriodEndOverride *TimePoint `json:"periodEndOverride,omitempty"`
+ // The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again.
+ RecurrencePolicy *string `json:"recurrencePolicy,omitempty"`
+ // The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ ActivationPolicy *string `json:"activationPolicy,omitempty"`
+ // The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string.
+ FixedStartDate *time.Time `json:"fixedStartDate,omitempty"`
+ // The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string.
+ EndDate *time.Time `json:"endDate,omitempty"`
// ID of the campaign, to which the achievement belongs to
CampaignId int32 `json:"campaignId"`
// ID of the user that created this achievement.
@@ -180,6 +188,138 @@ func (o *Achievement) SetPeriodEndOverride(v TimePoint) {
o.PeriodEndOverride = &v
}
+// GetRecurrencePolicy returns the RecurrencePolicy field value if set, zero value otherwise.
+func (o *Achievement) GetRecurrencePolicy() string {
+ if o == nil || o.RecurrencePolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.RecurrencePolicy
+}
+
+// GetRecurrencePolicyOk returns a tuple with the RecurrencePolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Achievement) GetRecurrencePolicyOk() (string, bool) {
+ if o == nil || o.RecurrencePolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.RecurrencePolicy, true
+}
+
+// HasRecurrencePolicy returns a boolean if a field has been set.
+func (o *Achievement) HasRecurrencePolicy() bool {
+ if o != nil && o.RecurrencePolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRecurrencePolicy gets a reference to the given string and assigns it to the RecurrencePolicy field.
+func (o *Achievement) SetRecurrencePolicy(v string) {
+ o.RecurrencePolicy = &v
+}
+
+// GetActivationPolicy returns the ActivationPolicy field value if set, zero value otherwise.
+func (o *Achievement) GetActivationPolicy() string {
+ if o == nil || o.ActivationPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ActivationPolicy
+}
+
+// GetActivationPolicyOk returns a tuple with the ActivationPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Achievement) GetActivationPolicyOk() (string, bool) {
+ if o == nil || o.ActivationPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ActivationPolicy, true
+}
+
+// HasActivationPolicy returns a boolean if a field has been set.
+func (o *Achievement) HasActivationPolicy() bool {
+ if o != nil && o.ActivationPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActivationPolicy gets a reference to the given string and assigns it to the ActivationPolicy field.
+func (o *Achievement) SetActivationPolicy(v string) {
+ o.ActivationPolicy = &v
+}
+
+// GetFixedStartDate returns the FixedStartDate field value if set, zero value otherwise.
+func (o *Achievement) GetFixedStartDate() time.Time {
+ if o == nil || o.FixedStartDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.FixedStartDate
+}
+
+// GetFixedStartDateOk returns a tuple with the FixedStartDate field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Achievement) GetFixedStartDateOk() (time.Time, bool) {
+ if o == nil || o.FixedStartDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.FixedStartDate, true
+}
+
+// HasFixedStartDate returns a boolean if a field has been set.
+func (o *Achievement) HasFixedStartDate() bool {
+ if o != nil && o.FixedStartDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFixedStartDate gets a reference to the given time.Time and assigns it to the FixedStartDate field.
+func (o *Achievement) SetFixedStartDate(v time.Time) {
+ o.FixedStartDate = &v
+}
+
+// GetEndDate returns the EndDate field value if set, zero value otherwise.
+func (o *Achievement) GetEndDate() time.Time {
+ if o == nil || o.EndDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.EndDate
+}
+
+// GetEndDateOk returns a tuple with the EndDate field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Achievement) GetEndDateOk() (time.Time, bool) {
+ if o == nil || o.EndDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.EndDate, true
+}
+
+// HasEndDate returns a boolean if a field has been set.
+func (o *Achievement) HasEndDate() bool {
+ if o != nil && o.EndDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
+func (o *Achievement) SetEndDate(v time.Time) {
+ o.EndDate = &v
+}
+
// GetCampaignId returns the CampaignId field value
func (o *Achievement) GetCampaignId() int32 {
if o == nil {
diff --git a/model_activate_user_request.go b/model_activate_user_request.go
index a44a2f36..3681a5c3 100644
--- a/model_activate_user_request.go
+++ b/model_activate_user_request.go
@@ -14,25 +14,8 @@ import (
"encoding/json"
)
-// ActivateUserRequest
+// ActivateUserRequest struct for ActivateUserRequest
type ActivateUserRequest struct {
- // The email address associated with the user profile.
- Email string `json:"email"`
-}
-
-// GetEmail returns the Email field value
-func (o *ActivateUserRequest) GetEmail() string {
- if o == nil {
- var ret string
- return ret
- }
-
- return o.Email
-}
-
-// SetEmail sets field value
-func (o *ActivateUserRequest) SetEmail(v string) {
- o.Email = v
}
type NullableActivateUserRequest struct {
diff --git a/model_additional_campaign_properties.go b/model_additional_campaign_properties.go
index e23b5e86..d8b00012 100644
--- a/model_additional_campaign_properties.go
+++ b/model_additional_campaign_properties.go
@@ -59,7 +59,7 @@ type AdditionalCampaignProperties struct {
UpdatedBy *string `json:"updatedBy,omitempty"`
// The ID of the Campaign Template this Campaign was created from.
TemplateId *int32 `json:"templateId,omitempty"`
- // A campaign state described exactly as in the Campaign Manager.
+ // The campaign state displayed in the Campaign Manager.
FrontendState string `json:"frontendState"`
// Indicates whether the linked stores were imported via a CSV file.
StoresImported bool `json:"storesImported"`
diff --git a/model_analytics_product.go b/model_analytics_product.go
new file mode 100644
index 00000000..c981493e
--- /dev/null
+++ b/model_analytics_product.go
@@ -0,0 +1,128 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// AnalyticsProduct struct for AnalyticsProduct
+type AnalyticsProduct struct {
+ // The ID of the analytics-level product.
+ Id int32 `json:"id"`
+ // Indicates whether the analytics-level product is connected to a catalog and also has a product name.
+ IsPreliminary bool `json:"isPreliminary"`
+ // The name of the analytics-level product.
+ Name string `json:"name"`
+ // The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.
+ CatalogId *int32 `json:"catalogId,omitempty"`
+}
+
+// GetId returns the Id field value
+func (o *AnalyticsProduct) GetId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Id
+}
+
+// SetId sets field value
+func (o *AnalyticsProduct) SetId(v int32) {
+ o.Id = v
+}
+
+// GetIsPreliminary returns the IsPreliminary field value
+func (o *AnalyticsProduct) GetIsPreliminary() bool {
+ if o == nil {
+ var ret bool
+ return ret
+ }
+
+ return o.IsPreliminary
+}
+
+// SetIsPreliminary sets field value
+func (o *AnalyticsProduct) SetIsPreliminary(v bool) {
+ o.IsPreliminary = v
+}
+
+// GetName returns the Name field value
+func (o *AnalyticsProduct) GetName() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Name
+}
+
+// SetName sets field value
+func (o *AnalyticsProduct) SetName(v string) {
+ o.Name = v
+}
+
+// GetCatalogId returns the CatalogId field value if set, zero value otherwise.
+func (o *AnalyticsProduct) GetCatalogId() int32 {
+ if o == nil || o.CatalogId == nil {
+ var ret int32
+ return ret
+ }
+ return *o.CatalogId
+}
+
+// GetCatalogIdOk returns a tuple with the CatalogId field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AnalyticsProduct) GetCatalogIdOk() (int32, bool) {
+ if o == nil || o.CatalogId == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.CatalogId, true
+}
+
+// HasCatalogId returns a boolean if a field has been set.
+func (o *AnalyticsProduct) HasCatalogId() bool {
+ if o != nil && o.CatalogId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCatalogId gets a reference to the given int32 and assigns it to the CatalogId field.
+func (o *AnalyticsProduct) SetCatalogId(v int32) {
+ o.CatalogId = &v
+}
+
+type NullableAnalyticsProduct struct {
+ Value AnalyticsProduct
+ ExplicitNull bool
+}
+
+func (v NullableAnalyticsProduct) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableAnalyticsProduct) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_analytics_product_sku.go b/model_analytics_product_sku.go
new file mode 100644
index 00000000..2c20c282
--- /dev/null
+++ b/model_analytics_product_sku.go
@@ -0,0 +1,94 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+ "time"
+)
+
+// AnalyticsProductSku struct for AnalyticsProductSku
+type AnalyticsProductSku struct {
+ // The ID of the SKU linked to the analytics-level product.
+ Id int32 `json:"id"`
+ // The SKU linked to the analytics-level product.
+ Sku string `json:"sku"`
+ // Values in UTC for the date the SKU linked to the analytics-level product was last updated.
+ LastUpdated time.Time `json:"lastUpdated"`
+}
+
+// GetId returns the Id field value
+func (o *AnalyticsProductSku) GetId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Id
+}
+
+// SetId sets field value
+func (o *AnalyticsProductSku) SetId(v int32) {
+ o.Id = v
+}
+
+// GetSku returns the Sku field value
+func (o *AnalyticsProductSku) GetSku() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Sku
+}
+
+// SetSku sets field value
+func (o *AnalyticsProductSku) SetSku(v string) {
+ o.Sku = v
+}
+
+// GetLastUpdated returns the LastUpdated field value
+func (o *AnalyticsProductSku) GetLastUpdated() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.LastUpdated
+}
+
+// SetLastUpdated sets field value
+func (o *AnalyticsProductSku) SetLastUpdated(v time.Time) {
+ o.LastUpdated = v
+}
+
+type NullableAnalyticsProductSku struct {
+ Value AnalyticsProductSku
+ ExplicitNull bool
+}
+
+func (v NullableAnalyticsProductSku) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableAnalyticsProductSku) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_application.go b/model_application.go
index 11adce9d..ab739a62 100644
--- a/model_application.go
+++ b/model_application.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Application
+// Application struct for Application
type Application struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_application_api_key.go b/model_application_api_key.go
index b316e9da..f62b3e04 100644
--- a/model_application_api_key.go
+++ b/model_application_api_key.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// ApplicationApiKey
+// ApplicationApiKey struct for ApplicationApiKey
type ApplicationApiKey struct {
// Title of the API key.
Title string `json:"title"`
diff --git a/model_application_campaign_stats.go b/model_application_campaign_stats.go
index a18727b0..c7090ebb 100644
--- a/model_application_campaign_stats.go
+++ b/model_application_campaign_stats.go
@@ -18,6 +18,8 @@ import (
type ApplicationCampaignStats struct {
// Number of disabled campaigns.
Disabled int32 `json:"disabled"`
+ // Number of staged campaigns.
+ Staged int32 `json:"staged"`
// Number of scheduled campaigns.
Scheduled int32 `json:"scheduled"`
// Number of running campaigns.
@@ -43,6 +45,21 @@ func (o *ApplicationCampaignStats) SetDisabled(v int32) {
o.Disabled = v
}
+// GetStaged returns the Staged field value
+func (o *ApplicationCampaignStats) GetStaged() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Staged
+}
+
+// SetStaged sets field value
+func (o *ApplicationCampaignStats) SetStaged(v int32) {
+ o.Staged = v
+}
+
// GetScheduled returns the Scheduled field value
func (o *ApplicationCampaignStats) GetScheduled() int32 {
if o == nil {
diff --git a/model_application_cif.go b/model_application_cif.go
index 5c9d8019..b5ef9c64 100644
--- a/model_application_cif.go
+++ b/model_application_cif.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// ApplicationCif
+// ApplicationCif struct for ApplicationCif
type ApplicationCif struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_application_cif_expression.go b/model_application_cif_expression.go
index aa1fd3b8..154fc69c 100644
--- a/model_application_cif_expression.go
+++ b/model_application_cif_expression.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// ApplicationCifExpression
+// ApplicationCifExpression struct for ApplicationCifExpression
type ApplicationCifExpression struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -26,7 +26,7 @@ type ApplicationCifExpression struct {
// The ID of the user who created the Application cart item filter.
CreatedBy *int32 `json:"createdBy,omitempty"`
// Arbitrary additional JSON data associated with the Application cart item filter.
- Expression []interface{} `json:"expression,omitempty"`
+ Expression *[]map[string]interface{} `json:"expression,omitempty"`
// The ID of the application that owns this entity.
ApplicationId int32 `json:"applicationId"`
}
@@ -128,22 +128,22 @@ func (o *ApplicationCifExpression) SetCreatedBy(v int32) {
}
// GetExpression returns the Expression field value if set, zero value otherwise.
-func (o *ApplicationCifExpression) GetExpression() []interface{} {
+func (o *ApplicationCifExpression) GetExpression() []map[string]interface{} {
if o == nil || o.Expression == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
- return o.Expression
+ return *o.Expression
}
// GetExpressionOk returns a tuple with the Expression field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *ApplicationCifExpression) GetExpressionOk() ([]interface{}, bool) {
+func (o *ApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool) {
if o == nil || o.Expression == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret, false
}
- return o.Expression, true
+ return *o.Expression, true
}
// HasExpression returns a boolean if a field has been set.
@@ -156,8 +156,8 @@ func (o *ApplicationCifExpression) HasExpression() bool {
}
// SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
-func (o *ApplicationCifExpression) SetExpression(v []interface{}) {
- o.Expression = v
+func (o *ApplicationCifExpression) SetExpression(v []map[string]interface{}) {
+ o.Expression = &v
}
// GetApplicationId returns the ApplicationId field value
diff --git a/model_application_customer.go b/model_application_customer.go
index a9cb6310..30245dc4 100644
--- a/model_application_customer.go
+++ b/model_application_customer.go
@@ -15,17 +15,17 @@ import (
"time"
)
-// ApplicationCustomer
+// ApplicationCustomer struct for ApplicationCustomer
type ApplicationCustomer struct {
- // Internal ID of this entity. Internal ID of this entity.
+ // Internal ID of this entity.
Id int32 `json:"id"`
- // The time this entity was created. The time this entity was created. The time this entity was created. The time this entity was created.
+ // The time this entity was created.
Created time.Time `json:"created"`
- // The integration ID set by your integration layer. The integration ID set by your integration layer.
+ // The integration ID set by your integration layer.
IntegrationId string `json:"integrationId"`
// Arbitrary properties associated with this item.
Attributes map[string]interface{} `json:"attributes"`
- // The ID of the Talon.One account that owns this profile. The ID of the Talon.One account that owns this profile.
+ // The ID of the Talon.One account that owns this profile.
AccountId int32 `json:"accountId"`
// The total amount of closed sessions by a customer. A closed session is a successful purchase.
ClosedSessions int32 `json:"closedSessions"`
diff --git a/model_application_event.go b/model_application_event.go
index faf9d37f..f8aa0eee 100644
--- a/model_application_event.go
+++ b/model_application_event.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// ApplicationEvent
+// ApplicationEvent struct for ApplicationEvent
type ApplicationEvent struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_application_referee.go b/model_application_referee.go
index 73349a74..ffef3e1b 100644
--- a/model_application_referee.go
+++ b/model_application_referee.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// ApplicationReferee
+// ApplicationReferee struct for ApplicationReferee
type ApplicationReferee struct {
// The ID of the application that owns this entity.
ApplicationId int32 `json:"applicationId"`
diff --git a/model_application_session.go b/model_application_session.go
index fee00d2e..fea3e0dc 100644
--- a/model_application_session.go
+++ b/model_application_session.go
@@ -15,11 +15,11 @@ import (
"time"
)
-// ApplicationSession
+// ApplicationSession struct for ApplicationSession
type ApplicationSession struct {
// Internal ID of this entity.
Id int32 `json:"id"`
- // The time this entity was created. The time this entity was created.
+ // The time this entity was created.
Created time.Time `json:"created"`
// The integration ID set by your integration layer.
IntegrationId string `json:"integrationId"`
diff --git a/model_async_coupon_deletion_job_response.go b/model_async_coupon_deletion_job_response.go
index aea61f17..e0a7108e 100644
--- a/model_async_coupon_deletion_job_response.go
+++ b/model_async_coupon_deletion_job_response.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// AsyncCouponDeletionJobResponse
+// AsyncCouponDeletionJobResponse struct for AsyncCouponDeletionJobResponse
type AsyncCouponDeletionJobResponse struct {
// Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.
Id int32 `json:"id"`
diff --git a/model_attribute.go b/model_attribute.go
index 2512a3b7..dff89fd1 100644
--- a/model_attribute.go
+++ b/model_attribute.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Attribute
+// Attribute struct for Attribute
type Attribute struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_audience.go b/model_audience.go
index 38e71948..158400e7 100644
--- a/model_audience.go
+++ b/model_audience.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Audience
+// Audience struct for Audience
type Audience struct {
// The ID of the account that owns this entity.
AccountId int32 `json:"accountId"`
diff --git a/model_audience_customer.go b/model_audience_customer.go
index 777475c3..58891a4d 100644
--- a/model_audience_customer.go
+++ b/model_audience_customer.go
@@ -15,11 +15,11 @@ import (
"time"
)
-// AudienceCustomer
+// AudienceCustomer struct for AudienceCustomer
type AudienceCustomer struct {
// Internal ID of this entity.
Id int32 `json:"id"`
- // The time this entity was created. The time this entity was created.
+ // The time this entity was created.
Created time.Time `json:"created"`
// The integration ID set by your integration layer.
IntegrationId string `json:"integrationId"`
diff --git a/model_base_loyalty_program.go b/model_base_loyalty_program.go
index be9ecdc6..b45f2ce1 100644
--- a/model_base_loyalty_program.go
+++ b/model_base_loyalty_program.go
@@ -44,6 +44,8 @@ type BaseLoyaltyProgram struct {
// The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment.
TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"`
CardCodeSettings *CodeGeneratorSettings `json:"cardCodeSettings,omitempty"`
+ // The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ ReturnPolicy *string `json:"returnPolicy,omitempty"`
}
// GetTitle returns the Title field value if set, zero value otherwise.
@@ -508,6 +510,39 @@ func (o *BaseLoyaltyProgram) SetCardCodeSettings(v CodeGeneratorSettings) {
o.CardCodeSettings = &v
}
+// GetReturnPolicy returns the ReturnPolicy field value if set, zero value otherwise.
+func (o *BaseLoyaltyProgram) GetReturnPolicy() string {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnPolicy
+}
+
+// GetReturnPolicyOk returns a tuple with the ReturnPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseLoyaltyProgram) GetReturnPolicyOk() (string, bool) {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ReturnPolicy, true
+}
+
+// HasReturnPolicy returns a boolean if a field has been set.
+func (o *BaseLoyaltyProgram) HasReturnPolicy() bool {
+ if o != nil && o.ReturnPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+func (o *BaseLoyaltyProgram) SetReturnPolicy(v string) {
+ o.ReturnPolicy = &v
+}
+
type NullableBaseLoyaltyProgram struct {
Value BaseLoyaltyProgram
ExplicitNull bool
diff --git a/model_base_notification.go b/model_base_notification.go
index 99681efc..3ec47e6d 100644
--- a/model_base_notification.go
+++ b/model_base_notification.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// BaseNotification
+// BaseNotification struct for BaseNotification
type BaseNotification struct {
// Indicates which notification properties to apply.
Policy map[string]interface{} `json:"policy"`
diff --git a/model_base_notification_webhook.go b/model_base_notification_webhook.go
index 1e78def5..8a8e871c 100644
--- a/model_base_notification_webhook.go
+++ b/model_base_notification_webhook.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// BaseNotificationWebhook
+// BaseNotificationWebhook struct for BaseNotificationWebhook
type BaseNotificationWebhook struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_binding.go b/model_binding.go
index 2449ece1..7f2e64ec 100644
--- a/model_binding.go
+++ b/model_binding.go
@@ -21,7 +21,7 @@ type Binding struct {
// The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter`
Type *string `json:"type,omitempty"`
// A Talang expression that will be evaluated and its result attached to the name of the binding.
- Expression []interface{} `json:"expression"`
+ Expression []map[string]interface{} `json:"expression"`
// Can be one of the following: - `string` - `number` - `boolean`
ValueType *string `json:"valueType,omitempty"`
}
@@ -75,9 +75,9 @@ func (o *Binding) SetType(v string) {
}
// GetExpression returns the Expression field value
-func (o *Binding) GetExpression() []interface{} {
+func (o *Binding) GetExpression() []map[string]interface{} {
if o == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
@@ -85,7 +85,7 @@ func (o *Binding) GetExpression() []interface{} {
}
// SetExpression sets field value
-func (o *Binding) SetExpression(v []interface{}) {
+func (o *Binding) SetExpression(v []map[string]interface{}) {
o.Expression = v
}
diff --git a/model_bulk_operation_on_campaigns.go b/model_bulk_operation_on_campaigns.go
index 0a7789f3..49d1f548 100644
--- a/model_bulk_operation_on_campaigns.go
+++ b/model_bulk_operation_on_campaigns.go
@@ -12,6 +12,7 @@ package talon
import (
"bytes"
"encoding/json"
+ "time"
)
// BulkOperationOnCampaigns struct for BulkOperationOnCampaigns
@@ -20,6 +21,8 @@ type BulkOperationOnCampaigns struct {
Operation string `json:"operation"`
// The list of campaign IDs on which the operation will be performed.
CampaignIds []int32 `json:"campaignIds"`
+ // Timestamp when the revisions are finalized after the `activate_revision` operation. The current time is used when left blank. **Note:** It must be an RFC3339 timestamp string.
+ ActivateAt *time.Time `json:"activateAt,omitempty"`
}
// GetOperation returns the Operation field value
@@ -52,6 +55,39 @@ func (o *BulkOperationOnCampaigns) SetCampaignIds(v []int32) {
o.CampaignIds = v
}
+// GetActivateAt returns the ActivateAt field value if set, zero value otherwise.
+func (o *BulkOperationOnCampaigns) GetActivateAt() time.Time {
+ if o == nil || o.ActivateAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.ActivateAt
+}
+
+// GetActivateAtOk returns a tuple with the ActivateAt field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *BulkOperationOnCampaigns) GetActivateAtOk() (time.Time, bool) {
+ if o == nil || o.ActivateAt == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.ActivateAt, true
+}
+
+// HasActivateAt returns a boolean if a field has been set.
+func (o *BulkOperationOnCampaigns) HasActivateAt() bool {
+ if o != nil && o.ActivateAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActivateAt gets a reference to the given time.Time and assigns it to the ActivateAt field.
+func (o *BulkOperationOnCampaigns) SetActivateAt(v time.Time) {
+ o.ActivateAt = &v
+}
+
type NullableBulkOperationOnCampaigns struct {
Value BulkOperationOnCampaigns
ExplicitNull bool
diff --git a/model_campaign.go b/model_campaign.go
index 1e339724..09957e25 100644
--- a/model_campaign.go
+++ b/model_campaign.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Campaign
+// Campaign struct for Campaign
type Campaign struct {
// Unique ID for this entity.
Id int32 `json:"id"`
@@ -95,10 +95,12 @@ type Campaign struct {
UpdatedBy *string `json:"updatedBy,omitempty"`
// The ID of the Campaign Template this Campaign was created from.
TemplateId *int32 `json:"templateId,omitempty"`
- // A campaign state described exactly as in the Campaign Manager.
+ // The campaign state displayed in the Campaign Manager.
FrontendState string `json:"frontendState"`
// Indicates whether the linked stores were imported via a CSV file.
StoresImported bool `json:"storesImported"`
+ // The campaign revision state displayed in the Campaign Manager.
+ RevisionFrontendState *string `json:"revisionFrontendState,omitempty"`
// ID of the revision that was last activated on this campaign.
ActiveRevisionId *int32 `json:"activeRevisionId,omitempty"`
// ID of the revision version that is active on the campaign.
@@ -1247,6 +1249,39 @@ func (o *Campaign) SetStoresImported(v bool) {
o.StoresImported = v
}
+// GetRevisionFrontendState returns the RevisionFrontendState field value if set, zero value otherwise.
+func (o *Campaign) GetRevisionFrontendState() string {
+ if o == nil || o.RevisionFrontendState == nil {
+ var ret string
+ return ret
+ }
+ return *o.RevisionFrontendState
+}
+
+// GetRevisionFrontendStateOk returns a tuple with the RevisionFrontendState field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Campaign) GetRevisionFrontendStateOk() (string, bool) {
+ if o == nil || o.RevisionFrontendState == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.RevisionFrontendState, true
+}
+
+// HasRevisionFrontendState returns a boolean if a field has been set.
+func (o *Campaign) HasRevisionFrontendState() bool {
+ if o != nil && o.RevisionFrontendState != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRevisionFrontendState gets a reference to the given string and assigns it to the RevisionFrontendState field.
+func (o *Campaign) SetRevisionFrontendState(v string) {
+ o.RevisionFrontendState = &v
+}
+
// GetActiveRevisionId returns the ActiveRevisionId field value if set, zero value otherwise.
func (o *Campaign) GetActiveRevisionId() int32 {
if o == nil || o.ActiveRevisionId == nil {
diff --git a/model_campaign_analytics.go b/model_campaign_analytics.go
index 66ee03be..36a4b29a 100644
--- a/model_campaign_analytics.go
+++ b/model_campaign_analytics.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CampaignAnalytics
+// CampaignAnalytics struct for CampaignAnalytics
type CampaignAnalytics struct {
Date time.Time `json:"date"`
// Amount of revenue in this campaign (for coupon or discount sessions).
diff --git a/model_campaign_collection.go b/model_campaign_collection.go
index 5e0fb299..5e712eaa 100644
--- a/model_campaign_collection.go
+++ b/model_campaign_collection.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CampaignCollection
+// CampaignCollection struct for CampaignCollection
type CampaignCollection struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_campaign_collection_without_payload.go b/model_campaign_collection_without_payload.go
index 35ef09e4..23754d33 100644
--- a/model_campaign_collection_without_payload.go
+++ b/model_campaign_collection_without_payload.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CampaignCollectionWithoutPayload
+// CampaignCollectionWithoutPayload struct for CampaignCollectionWithoutPayload
type CampaignCollectionWithoutPayload struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_campaign_evaluation_group.go b/model_campaign_evaluation_group.go
index 3028d130..7c0356b2 100644
--- a/model_campaign_evaluation_group.go
+++ b/model_campaign_evaluation_group.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// CampaignEvaluationGroup
+// CampaignEvaluationGroup struct for CampaignEvaluationGroup
type CampaignEvaluationGroup struct {
// The ID of the application that owns this entity.
ApplicationId int32 `json:"applicationId"`
diff --git a/model_campaign_group.go b/model_campaign_group.go
index 4c1ff44c..b21372d3 100644
--- a/model_campaign_group.go
+++ b/model_campaign_group.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CampaignGroup
+// CampaignGroup struct for CampaignGroup
type CampaignGroup struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_campaign_set.go b/model_campaign_set.go
index 4110798e..81caa39e 100644
--- a/model_campaign_set.go
+++ b/model_campaign_set.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// CampaignSet
+// CampaignSet struct for CampaignSet
type CampaignSet struct {
// The ID of the application that owns this entity.
ApplicationId int32 `json:"applicationId"`
diff --git a/model_campaign_store_budget.go b/model_campaign_store_budget.go
index 41d859c0..2b134ab1 100644
--- a/model_campaign_store_budget.go
+++ b/model_campaign_store_budget.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CampaignStoreBudget
+// CampaignStoreBudget struct for CampaignStoreBudget
type CampaignStoreBudget struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_campaign_template.go b/model_campaign_template.go
index 37e1307e..c6571268 100644
--- a/model_campaign_template.go
+++ b/model_campaign_template.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CampaignTemplate
+// CampaignTemplate struct for CampaignTemplate
type CampaignTemplate struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -42,9 +42,10 @@ type CampaignTemplate struct {
// A list of tags for the campaign template.
Tags *[]string `json:"tags,omitempty"`
// A list of features for the campaign template.
- Features *[]string `json:"features,omitempty"`
- CouponSettings *CodeGeneratorSettings `json:"couponSettings,omitempty"`
- ReferralSettings *CodeGeneratorSettings `json:"referralSettings,omitempty"`
+ Features *[]string `json:"features,omitempty"`
+ CouponSettings *CodeGeneratorSettings `json:"couponSettings,omitempty"`
+ CouponReservationSettings *CampaignTemplateCouponReservationSettings `json:"couponReservationSettings,omitempty"`
+ ReferralSettings *CodeGeneratorSettings `json:"referralSettings,omitempty"`
// The set of limits that operate for this campaign template.
Limits *[]TemplateLimitConfig `json:"limits,omitempty"`
// Fields which can be used to replace values in a rule.
@@ -383,6 +384,39 @@ func (o *CampaignTemplate) SetCouponSettings(v CodeGeneratorSettings) {
o.CouponSettings = &v
}
+// GetCouponReservationSettings returns the CouponReservationSettings field value if set, zero value otherwise.
+func (o *CampaignTemplate) GetCouponReservationSettings() CampaignTemplateCouponReservationSettings {
+ if o == nil || o.CouponReservationSettings == nil {
+ var ret CampaignTemplateCouponReservationSettings
+ return ret
+ }
+ return *o.CouponReservationSettings
+}
+
+// GetCouponReservationSettingsOk returns a tuple with the CouponReservationSettings field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CampaignTemplate) GetCouponReservationSettingsOk() (CampaignTemplateCouponReservationSettings, bool) {
+ if o == nil || o.CouponReservationSettings == nil {
+ var ret CampaignTemplateCouponReservationSettings
+ return ret, false
+ }
+ return *o.CouponReservationSettings, true
+}
+
+// HasCouponReservationSettings returns a boolean if a field has been set.
+func (o *CampaignTemplate) HasCouponReservationSettings() bool {
+ if o != nil && o.CouponReservationSettings != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCouponReservationSettings gets a reference to the given CampaignTemplateCouponReservationSettings and assigns it to the CouponReservationSettings field.
+func (o *CampaignTemplate) SetCouponReservationSettings(v CampaignTemplateCouponReservationSettings) {
+ o.CouponReservationSettings = &v
+}
+
// GetReferralSettings returns the ReferralSettings field value if set, zero value otherwise.
func (o *CampaignTemplate) GetReferralSettings() CodeGeneratorSettings {
if o == nil || o.ReferralSettings == nil {
diff --git a/model_campaign_template_coupon_reservation_settings.go b/model_campaign_template_coupon_reservation_settings.go
new file mode 100644
index 00000000..aea25b48
--- /dev/null
+++ b/model_campaign_template_coupon_reservation_settings.go
@@ -0,0 +1,112 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// CampaignTemplateCouponReservationSettings struct for CampaignTemplateCouponReservationSettings
+type CampaignTemplateCouponReservationSettings struct {
+ // The number of reservations that can be made with this coupon code.
+ ReservationLimit *int32 `json:"reservationLimit,omitempty"`
+ // An indication of whether the code can be redeemed only if it has been reserved first.
+ IsReservationMandatory *bool `json:"isReservationMandatory,omitempty"`
+}
+
+// GetReservationLimit returns the ReservationLimit field value if set, zero value otherwise.
+func (o *CampaignTemplateCouponReservationSettings) GetReservationLimit() int32 {
+ if o == nil || o.ReservationLimit == nil {
+ var ret int32
+ return ret
+ }
+ return *o.ReservationLimit
+}
+
+// GetReservationLimitOk returns a tuple with the ReservationLimit field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CampaignTemplateCouponReservationSettings) GetReservationLimitOk() (int32, bool) {
+ if o == nil || o.ReservationLimit == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.ReservationLimit, true
+}
+
+// HasReservationLimit returns a boolean if a field has been set.
+func (o *CampaignTemplateCouponReservationSettings) HasReservationLimit() bool {
+ if o != nil && o.ReservationLimit != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReservationLimit gets a reference to the given int32 and assigns it to the ReservationLimit field.
+func (o *CampaignTemplateCouponReservationSettings) SetReservationLimit(v int32) {
+ o.ReservationLimit = &v
+}
+
+// GetIsReservationMandatory returns the IsReservationMandatory field value if set, zero value otherwise.
+func (o *CampaignTemplateCouponReservationSettings) GetIsReservationMandatory() bool {
+ if o == nil || o.IsReservationMandatory == nil {
+ var ret bool
+ return ret
+ }
+ return *o.IsReservationMandatory
+}
+
+// GetIsReservationMandatoryOk returns a tuple with the IsReservationMandatory field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CampaignTemplateCouponReservationSettings) GetIsReservationMandatoryOk() (bool, bool) {
+ if o == nil || o.IsReservationMandatory == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.IsReservationMandatory, true
+}
+
+// HasIsReservationMandatory returns a boolean if a field has been set.
+func (o *CampaignTemplateCouponReservationSettings) HasIsReservationMandatory() bool {
+ if o != nil && o.IsReservationMandatory != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIsReservationMandatory gets a reference to the given bool and assigns it to the IsReservationMandatory field.
+func (o *CampaignTemplateCouponReservationSettings) SetIsReservationMandatory(v bool) {
+ o.IsReservationMandatory = &v
+}
+
+type NullableCampaignTemplateCouponReservationSettings struct {
+ Value CampaignTemplateCouponReservationSettings
+ ExplicitNull bool
+}
+
+func (v NullableCampaignTemplateCouponReservationSettings) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableCampaignTemplateCouponReservationSettings) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_campaign_versions.go b/model_campaign_versions.go
index 0cc439ce..e76892b6 100644
--- a/model_campaign_versions.go
+++ b/model_campaign_versions.go
@@ -16,6 +16,8 @@ import (
// CampaignVersions struct for CampaignVersions
type CampaignVersions struct {
+ // The campaign revision state displayed in the Campaign Manager.
+ RevisionFrontendState *string `json:"revisionFrontendState,omitempty"`
// ID of the revision that was last activated on this campaign.
ActiveRevisionId *int32 `json:"activeRevisionId,omitempty"`
// ID of the revision version that is active on the campaign.
@@ -30,6 +32,39 @@ type CampaignVersions struct {
StageRevision *bool `json:"stageRevision,omitempty"`
}
+// GetRevisionFrontendState returns the RevisionFrontendState field value if set, zero value otherwise.
+func (o *CampaignVersions) GetRevisionFrontendState() string {
+ if o == nil || o.RevisionFrontendState == nil {
+ var ret string
+ return ret
+ }
+ return *o.RevisionFrontendState
+}
+
+// GetRevisionFrontendStateOk returns a tuple with the RevisionFrontendState field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CampaignVersions) GetRevisionFrontendStateOk() (string, bool) {
+ if o == nil || o.RevisionFrontendState == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.RevisionFrontendState, true
+}
+
+// HasRevisionFrontendState returns a boolean if a field has been set.
+func (o *CampaignVersions) HasRevisionFrontendState() bool {
+ if o != nil && o.RevisionFrontendState != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRevisionFrontendState gets a reference to the given string and assigns it to the RevisionFrontendState field.
+func (o *CampaignVersions) SetRevisionFrontendState(v string) {
+ o.RevisionFrontendState = &v
+}
+
// GetActiveRevisionId returns the ActiveRevisionId field value if set, zero value otherwise.
func (o *CampaignVersions) GetActiveRevisionId() int32 {
if o == nil || o.ActiveRevisionId == nil {
diff --git a/model_catalog.go b/model_catalog.go
index 4eaaf590..3b0d2ea6 100644
--- a/model_catalog.go
+++ b/model_catalog.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Catalog
+// Catalog struct for Catalog
type Catalog struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_catalog_item.go b/model_catalog_item.go
index e6d652cd..8cd999eb 100644
--- a/model_catalog_item.go
+++ b/model_catalog_item.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CatalogItem
+// CatalogItem struct for CatalogItem
type CatalogItem struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_change.go b/model_change.go
index 0cfaa8d7..ef6d2ae1 100644
--- a/model_change.go
+++ b/model_change.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Change
+// Change struct for Change
type Change struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_collection.go b/model_collection.go
index 5bae2b34..0e97ac6a 100644
--- a/model_collection.go
+++ b/model_collection.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Collection
+// Collection struct for Collection
type Collection struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_collection_item.go b/model_collection_item.go
index 9ba975ed..7ccafc90 100644
--- a/model_collection_item.go
+++ b/model_collection_item.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// CollectionItem
+// CollectionItem struct for CollectionItem
type CollectionItem struct {
Item string `json:"item"`
}
diff --git a/model_collection_without_payload.go b/model_collection_without_payload.go
index 3346c813..c91da0b2 100644
--- a/model_collection_without_payload.go
+++ b/model_collection_without_payload.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CollectionWithoutPayload
+// CollectionWithoutPayload struct for CollectionWithoutPayload
type CollectionWithoutPayload struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_coupon.go b/model_coupon.go
index 91c55457..d70e1231 100644
--- a/model_coupon.go
+++ b/model_coupon.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Coupon
+// Coupon struct for Coupon
type Coupon struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_coupon_creation_job.go b/model_coupon_creation_job.go
index 162ea9f6..4b7779c0 100644
--- a/model_coupon_creation_job.go
+++ b/model_coupon_creation_job.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CouponCreationJob
+// CouponCreationJob struct for CouponCreationJob
type CouponCreationJob struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_coupon_deletion_job.go b/model_coupon_deletion_job.go
index d4177357..9acaf049 100644
--- a/model_coupon_deletion_job.go
+++ b/model_coupon_deletion_job.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CouponDeletionJob
+// CouponDeletionJob struct for CouponDeletionJob
type CouponDeletionJob struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_create_achievement.go b/model_create_achievement.go
index 3c02e953..a730f8c7 100644
--- a/model_create_achievement.go
+++ b/model_create_achievement.go
@@ -12,6 +12,7 @@ package talon
import (
"bytes"
"encoding/json"
+ "time"
)
// CreateAchievement struct for CreateAchievement
@@ -27,6 +28,14 @@ type CreateAchievement struct {
// The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period.
Period string `json:"period"`
PeriodEndOverride *TimePoint `json:"periodEndOverride,omitempty"`
+ // The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again.
+ RecurrencePolicy *string `json:"recurrencePolicy,omitempty"`
+ // The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ ActivationPolicy *string `json:"activationPolicy,omitempty"`
+ // The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string.
+ FixedStartDate *time.Time `json:"fixedStartDate,omitempty"`
+ // The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string.
+ EndDate *time.Time `json:"endDate,omitempty"`
}
// GetName returns the Name field value
@@ -137,6 +146,138 @@ func (o *CreateAchievement) SetPeriodEndOverride(v TimePoint) {
o.PeriodEndOverride = &v
}
+// GetRecurrencePolicy returns the RecurrencePolicy field value if set, zero value otherwise.
+func (o *CreateAchievement) GetRecurrencePolicy() string {
+ if o == nil || o.RecurrencePolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.RecurrencePolicy
+}
+
+// GetRecurrencePolicyOk returns a tuple with the RecurrencePolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateAchievement) GetRecurrencePolicyOk() (string, bool) {
+ if o == nil || o.RecurrencePolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.RecurrencePolicy, true
+}
+
+// HasRecurrencePolicy returns a boolean if a field has been set.
+func (o *CreateAchievement) HasRecurrencePolicy() bool {
+ if o != nil && o.RecurrencePolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRecurrencePolicy gets a reference to the given string and assigns it to the RecurrencePolicy field.
+func (o *CreateAchievement) SetRecurrencePolicy(v string) {
+ o.RecurrencePolicy = &v
+}
+
+// GetActivationPolicy returns the ActivationPolicy field value if set, zero value otherwise.
+func (o *CreateAchievement) GetActivationPolicy() string {
+ if o == nil || o.ActivationPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ActivationPolicy
+}
+
+// GetActivationPolicyOk returns a tuple with the ActivationPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateAchievement) GetActivationPolicyOk() (string, bool) {
+ if o == nil || o.ActivationPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ActivationPolicy, true
+}
+
+// HasActivationPolicy returns a boolean if a field has been set.
+func (o *CreateAchievement) HasActivationPolicy() bool {
+ if o != nil && o.ActivationPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActivationPolicy gets a reference to the given string and assigns it to the ActivationPolicy field.
+func (o *CreateAchievement) SetActivationPolicy(v string) {
+ o.ActivationPolicy = &v
+}
+
+// GetFixedStartDate returns the FixedStartDate field value if set, zero value otherwise.
+func (o *CreateAchievement) GetFixedStartDate() time.Time {
+ if o == nil || o.FixedStartDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.FixedStartDate
+}
+
+// GetFixedStartDateOk returns a tuple with the FixedStartDate field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateAchievement) GetFixedStartDateOk() (time.Time, bool) {
+ if o == nil || o.FixedStartDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.FixedStartDate, true
+}
+
+// HasFixedStartDate returns a boolean if a field has been set.
+func (o *CreateAchievement) HasFixedStartDate() bool {
+ if o != nil && o.FixedStartDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFixedStartDate gets a reference to the given time.Time and assigns it to the FixedStartDate field.
+func (o *CreateAchievement) SetFixedStartDate(v time.Time) {
+ o.FixedStartDate = &v
+}
+
+// GetEndDate returns the EndDate field value if set, zero value otherwise.
+func (o *CreateAchievement) GetEndDate() time.Time {
+ if o == nil || o.EndDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.EndDate
+}
+
+// GetEndDateOk returns a tuple with the EndDate field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateAchievement) GetEndDateOk() (time.Time, bool) {
+ if o == nil || o.EndDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.EndDate, true
+}
+
+// HasEndDate returns a boolean if a field has been set.
+func (o *CreateAchievement) HasEndDate() bool {
+ if o != nil && o.EndDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
+func (o *CreateAchievement) SetEndDate(v time.Time) {
+ o.EndDate = &v
+}
+
type NullableCreateAchievement struct {
Value CreateAchievement
ExplicitNull bool
diff --git a/model_custom_effect.go b/model_custom_effect.go
index 4c762a6b..2bd9f8d3 100644
--- a/model_custom_effect.go
+++ b/model_custom_effect.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CustomEffect
+// CustomEffect struct for CustomEffect
type CustomEffect struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_customer_profile.go b/model_customer_profile.go
index afd8b7ad..53d0e287 100644
--- a/model_customer_profile.go
+++ b/model_customer_profile.go
@@ -15,11 +15,11 @@ import (
"time"
)
-// CustomerProfile
+// CustomerProfile struct for CustomerProfile
type CustomerProfile struct {
// Internal ID of this entity.
Id int32 `json:"id"`
- // The time this entity was created. The time this entity was created.
+ // The time this entity was created.
Created time.Time `json:"created"`
// The integration ID set by your integration layer.
IntegrationId string `json:"integrationId"`
diff --git a/model_customer_profile_audience_request_item.go b/model_customer_profile_audience_request_item.go
index fde01ac5..4a468c90 100644
--- a/model_customer_profile_audience_request_item.go
+++ b/model_customer_profile_audience_request_item.go
@@ -16,7 +16,7 @@ import (
// CustomerProfileAudienceRequestItem struct for CustomerProfileAudienceRequestItem
type CustomerProfileAudienceRequestItem struct {
- // Defines the action to perform: - `add`: Adds the customer profile to the audience. If the customer profile does not exist, it will be created. - `delete`: Removes the customer profile from the audience.
+ // Defines the action to perform: - `add`: Adds the customer profile to the audience. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `delete`: Removes the customer profile from the audience.
Action string `json:"action"`
// The ID of this customer profile in the third-party integration.
ProfileIntegrationId string `json:"profileIntegrationId"`
diff --git a/model_customer_profile_integration_request_v2.go b/model_customer_profile_integration_request_v2.go
index 0eb70e6c..f0f73af9 100644
--- a/model_customer_profile_integration_request_v2.go
+++ b/model_customer_profile_integration_request_v2.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// CustomerProfileIntegrationRequestV2
+// CustomerProfileIntegrationRequestV2 The body of a V2 integration API request (customer profile update). Next to the customer profile details, this contains an optional listing of extra properties that should be returned in the response.
type CustomerProfileIntegrationRequestV2 struct {
// Arbitrary properties associated with this item.
Attributes *map[string]interface{} `json:"attributes,omitempty"`
diff --git a/model_customer_session.go b/model_customer_session.go
index 285a6931..c3a6a7a6 100644
--- a/model_customer_session.go
+++ b/model_customer_session.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// CustomerSession
+// CustomerSession struct for CustomerSession
type CustomerSession struct {
// The integration ID set by your integration layer.
IntegrationId string `json:"integrationId"`
diff --git a/model_customer_session_v2.go b/model_customer_session_v2.go
index 0731f67f..a22d14a3 100644
--- a/model_customer_session_v2.go
+++ b/model_customer_session_v2.go
@@ -15,11 +15,11 @@ import (
"time"
)
-// CustomerSessionV2
+// CustomerSessionV2 The representation of the customer session.
type CustomerSessionV2 struct {
// Internal ID of this entity.
Id int32 `json:"id"`
- // The time this entity was created. The time this entity was created.
+ // The time this entity was created.
Created time.Time `json:"created"`
// The integration ID set by your integration layer.
IntegrationId string `json:"integrationId"`
@@ -31,9 +31,9 @@ type CustomerSessionV2 struct {
StoreIntegrationId *string `json:"storeIntegrationId,omitempty"`
// When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them.
EvaluableCampaignIds *[]int32 `json:"evaluableCampaignIds,omitempty"`
- // Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely.
+ // Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, omit the parameter entirely.
CouponCodes *[]string `json:"couponCodes,omitempty"`
- // Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely.
+ // Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, omit the parameter entirely.
ReferralCode *string `json:"referralCode,omitempty"`
// Identifier of a loyalty card.
LoyaltyCards *[]string `json:"loyaltyCards,omitempty"`
@@ -43,11 +43,11 @@ type CustomerSessionV2 struct {
CartItems []CartItem `json:"cartItems"`
// Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
AdditionalCosts *map[string]AdditionalCost `json:"additionalCosts,omitempty"`
- // Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
+ // Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). - We recommend passing an anonymized (hashed) version of the identifier value.
Identifiers *[]string `json:"identifiers,omitempty"`
// Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property.
Attributes map[string]interface{} `json:"attributes"`
- // Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions.
+ // Indicates whether this is the first session for the customer's profile. It's always `true` for anonymous sessions.
FirstSession bool `json:"firstSession"`
// The total value of cart items and additional costs in the session, before any discounts are applied.
Total float32 `json:"total"`
@@ -57,6 +57,8 @@ type CustomerSessionV2 struct {
AdditionalCostTotal float32 `json:"additionalCostTotal"`
// Timestamp of the most recent event received on this session.
Updated time.Time `json:"updated"`
+ // The likelihood of the customer session closing based on predictive modeling, expressed as a decimal between `0` and `1`.
+ ClosurePrediction *float32 `json:"closurePrediction,omitempty"`
}
// GetId returns the Id field value
@@ -485,6 +487,39 @@ func (o *CustomerSessionV2) SetUpdated(v time.Time) {
o.Updated = v
}
+// GetClosurePrediction returns the ClosurePrediction field value if set, zero value otherwise.
+func (o *CustomerSessionV2) GetClosurePrediction() float32 {
+ if o == nil || o.ClosurePrediction == nil {
+ var ret float32
+ return ret
+ }
+ return *o.ClosurePrediction
+}
+
+// GetClosurePredictionOk returns a tuple with the ClosurePrediction field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CustomerSessionV2) GetClosurePredictionOk() (float32, bool) {
+ if o == nil || o.ClosurePrediction == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.ClosurePrediction, true
+}
+
+// HasClosurePrediction returns a boolean if a field has been set.
+func (o *CustomerSessionV2) HasClosurePrediction() bool {
+ if o != nil && o.ClosurePrediction != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClosurePrediction gets a reference to the given float32 and assigns it to the ClosurePrediction field.
+func (o *CustomerSessionV2) SetClosurePrediction(v float32) {
+ o.ClosurePrediction = &v
+}
+
type NullableCustomerSessionV2 struct {
Value CustomerSessionV2
ExplicitNull bool
diff --git a/model_deactivate_user_request.go b/model_deactivate_user_request.go
index 4941aa87..dea8641f 100644
--- a/model_deactivate_user_request.go
+++ b/model_deactivate_user_request.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// DeactivateUserRequest
+// DeactivateUserRequest struct for DeactivateUserRequest
type DeactivateUserRequest struct {
// The email address associated with the user profile.
Email string `json:"email"`
diff --git a/model_delete_user_request.go b/model_delete_user_request.go
index 9abf867a..31c32e34 100644
--- a/model_delete_user_request.go
+++ b/model_delete_user_request.go
@@ -14,25 +14,8 @@ import (
"encoding/json"
)
-// DeleteUserRequest
+// DeleteUserRequest struct for DeleteUserRequest
type DeleteUserRequest struct {
- // The email address associated with the user profile.
- Email string `json:"email"`
-}
-
-// GetEmail returns the Email field value
-func (o *DeleteUserRequest) GetEmail() string {
- if o == nil {
- var ret string
- return ret
- }
-
- return o.Email
-}
-
-// SetEmail sets field value
-func (o *DeleteUserRequest) SetEmail(v string) {
- o.Email = v
}
type NullableDeleteUserRequest struct {
diff --git a/model_effect.go b/model_effect.go
index c0766160..96a31339 100644
--- a/model_effect.go
+++ b/model_effect.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// Effect
+// Effect A generic effect that is fired by a triggered campaign. The props property will contain information specific to the specific effect type.
type Effect struct {
// The ID of the campaign that triggered this effect.
CampaignId int32 `json:"campaignId"`
diff --git a/model_environment.go b/model_environment.go
index 32451f3b..e258e079 100644
--- a/model_environment.go
+++ b/model_environment.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Environment
+// Environment struct for Environment
type Environment struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_event.go b/model_event.go
index cb7d7e8e..c0c2f47a 100644
--- a/model_event.go
+++ b/model_event.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Event
+// Event struct for Event
type Event struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -34,7 +34,7 @@ type Event struct {
// The ID of the session that this event occurred in.
SessionId *string `json:"sessionId,omitempty"`
// An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects).
- Effects [][]interface{} `json:"effects"`
+ Effects []map[string]interface{} `json:"effects"`
// Ledger entries for the event.
LedgerEntries *[]LedgerEntry `json:"ledgerEntries,omitempty"`
Meta *Meta `json:"meta,omitempty"`
@@ -215,9 +215,9 @@ func (o *Event) SetSessionId(v string) {
}
// GetEffects returns the Effects field value
-func (o *Event) GetEffects() [][]interface{} {
+func (o *Event) GetEffects() []map[string]interface{} {
if o == nil {
- var ret [][]interface{}
+ var ret []map[string]interface{}
return ret
}
@@ -225,7 +225,7 @@ func (o *Event) GetEffects() [][]interface{} {
}
// SetEffects sets field value
-func (o *Event) SetEffects(v [][]interface{}) {
+func (o *Event) SetEffects(v []map[string]interface{}) {
o.Effects = v
}
diff --git a/model_event_type.go b/model_event_type.go
index 4b41a2f6..b9000d65 100644
--- a/model_event_type.go
+++ b/model_event_type.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// EventType
+// EventType struct for EventType
type EventType struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_event_v2.go b/model_event_v2.go
index 57a3fc1f..1ae2dc0d 100644
--- a/model_event_v2.go
+++ b/model_event_v2.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// EventV2
+// EventV2 struct for EventV2
type EventV2 struct {
// ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
ProfileId *string `json:"profileId,omitempty"`
diff --git a/model_export.go b/model_export.go
index 2fc84b0f..4bf69a04 100644
--- a/model_export.go
+++ b/model_export.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Export
+// Export struct for Export
type Export struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_features_feed.go b/model_features_feed.go
index fcbffdea..6c794bd2 100644
--- a/model_features_feed.go
+++ b/model_features_feed.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// FeaturesFeed
+// FeaturesFeed struct for FeaturesFeed
type FeaturesFeed struct {
Title *string `json:"title,omitempty"`
PubDate *string `json:"pubDate,omitempty"`
diff --git a/model_generate_campaign_description.go b/model_generate_campaign_description.go
index ac07be58..dca289e9 100644
--- a/model_generate_campaign_description.go
+++ b/model_generate_campaign_description.go
@@ -16,25 +16,25 @@ import (
// GenerateCampaignDescription struct for GenerateCampaignDescription
type GenerateCampaignDescription struct {
- // ID of the campaign.
- CampaignID int32 `json:"campaignID"`
+ // ID of a ruleset.
+ RulesetID int32 `json:"rulesetID"`
// Currency for the campaign.
Currency string `json:"currency"`
}
-// GetCampaignID returns the CampaignID field value
-func (o *GenerateCampaignDescription) GetCampaignID() int32 {
+// GetRulesetID returns the RulesetID field value
+func (o *GenerateCampaignDescription) GetRulesetID() int32 {
if o == nil {
var ret int32
return ret
}
- return o.CampaignID
+ return o.RulesetID
}
-// SetCampaignID sets field value
-func (o *GenerateCampaignDescription) SetCampaignID(v int32) {
- o.CampaignID = v
+// SetRulesetID sets field value
+func (o *GenerateCampaignDescription) SetRulesetID(v int32) {
+ o.RulesetID = v
}
// GetCurrency returns the Currency field value
diff --git a/model_generate_campaign_tags.go b/model_generate_campaign_tags.go
index 4992430e..b5fd79c9 100644
--- a/model_generate_campaign_tags.go
+++ b/model_generate_campaign_tags.go
@@ -16,23 +16,23 @@ import (
// GenerateCampaignTags struct for GenerateCampaignTags
type GenerateCampaignTags struct {
- // ID of the campaign.
- CampaignID int32 `json:"campaignID"`
+ // ID of a ruleset.
+ RulesetID int32 `json:"rulesetID"`
}
-// GetCampaignID returns the CampaignID field value
-func (o *GenerateCampaignTags) GetCampaignID() int32 {
+// GetRulesetID returns the RulesetID field value
+func (o *GenerateCampaignTags) GetRulesetID() int32 {
if o == nil {
var ret int32
return ret
}
- return o.CampaignID
+ return o.RulesetID
}
-// SetCampaignID sets field value
-func (o *GenerateCampaignTags) SetCampaignID(v int32) {
- o.CampaignID = v
+// SetRulesetID sets field value
+func (o *GenerateCampaignTags) SetRulesetID(v int32) {
+ o.RulesetID = v
}
type NullableGenerateCampaignTags struct {
diff --git a/model_generate_loyalty_card.go b/model_generate_loyalty_card.go
index f4123294..4daf232d 100644
--- a/model_generate_loyalty_card.go
+++ b/model_generate_loyalty_card.go
@@ -20,6 +20,8 @@ type GenerateLoyaltyCard struct {
Status *string `json:"status,omitempty"`
// Integration IDs of the customer profiles linked to the card.
CustomerProfileIds *[]string `json:"customerProfileIds,omitempty"`
+ // The alphanumeric identifier of the loyalty card.
+ CardIdentifier *string `json:"cardIdentifier,omitempty"`
}
// GetStatus returns the Status field value if set, zero value otherwise.
@@ -88,6 +90,39 @@ func (o *GenerateLoyaltyCard) SetCustomerProfileIds(v []string) {
o.CustomerProfileIds = &v
}
+// GetCardIdentifier returns the CardIdentifier field value if set, zero value otherwise.
+func (o *GenerateLoyaltyCard) GetCardIdentifier() string {
+ if o == nil || o.CardIdentifier == nil {
+ var ret string
+ return ret
+ }
+ return *o.CardIdentifier
+}
+
+// GetCardIdentifierOk returns a tuple with the CardIdentifier field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *GenerateLoyaltyCard) GetCardIdentifierOk() (string, bool) {
+ if o == nil || o.CardIdentifier == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.CardIdentifier, true
+}
+
+// HasCardIdentifier returns a boolean if a field has been set.
+func (o *GenerateLoyaltyCard) HasCardIdentifier() bool {
+ if o != nil && o.CardIdentifier != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCardIdentifier gets a reference to the given string and assigns it to the CardIdentifier field.
+func (o *GenerateLoyaltyCard) SetCardIdentifier(v string) {
+ o.CardIdentifier = &v
+}
+
type NullableGenerateLoyaltyCard struct {
Value GenerateLoyaltyCard
ExplicitNull bool
diff --git a/model_generate_rule_title_rule.go b/model_generate_rule_title_rule.go
index 31b19b42..418296ce 100644
--- a/model_generate_rule_title_rule.go
+++ b/model_generate_rule_title_rule.go
@@ -17,28 +17,28 @@ import (
// GenerateRuleTitleRule struct for GenerateRuleTitleRule
type GenerateRuleTitleRule struct {
// An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
- Effects [][]interface{} `json:"effects,omitempty"`
+ Effects *[]map[string]interface{} `json:"effects,omitempty"`
// A Talang expression that will be evaluated in the context of the given event.
- Condition []interface{} `json:"condition,omitempty"`
+ Condition *[]map[string]interface{} `json:"condition,omitempty"`
}
// GetEffects returns the Effects field value if set, zero value otherwise.
-func (o *GenerateRuleTitleRule) GetEffects() [][]interface{} {
+func (o *GenerateRuleTitleRule) GetEffects() []map[string]interface{} {
if o == nil || o.Effects == nil {
- var ret [][]interface{}
+ var ret []map[string]interface{}
return ret
}
- return o.Effects
+ return *o.Effects
}
// GetEffectsOk returns a tuple with the Effects field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *GenerateRuleTitleRule) GetEffectsOk() ([][]interface{}, bool) {
+func (o *GenerateRuleTitleRule) GetEffectsOk() ([]map[string]interface{}, bool) {
if o == nil || o.Effects == nil {
- var ret [][]interface{}
+ var ret []map[string]interface{}
return ret, false
}
- return o.Effects, true
+ return *o.Effects, true
}
// HasEffects returns a boolean if a field has been set.
@@ -51,27 +51,27 @@ func (o *GenerateRuleTitleRule) HasEffects() bool {
}
// SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
-func (o *GenerateRuleTitleRule) SetEffects(v [][]interface{}) {
- o.Effects = v
+func (o *GenerateRuleTitleRule) SetEffects(v []map[string]interface{}) {
+ o.Effects = &v
}
// GetCondition returns the Condition field value if set, zero value otherwise.
-func (o *GenerateRuleTitleRule) GetCondition() []interface{} {
+func (o *GenerateRuleTitleRule) GetCondition() []map[string]interface{} {
if o == nil || o.Condition == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
- return o.Condition
+ return *o.Condition
}
// GetConditionOk returns a tuple with the Condition field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *GenerateRuleTitleRule) GetConditionOk() ([]interface{}, bool) {
+func (o *GenerateRuleTitleRule) GetConditionOk() ([]map[string]interface{}, bool) {
if o == nil || o.Condition == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret, false
}
- return o.Condition, true
+ return *o.Condition, true
}
// HasCondition returns a boolean if a field has been set.
@@ -84,8 +84,8 @@ func (o *GenerateRuleTitleRule) HasCondition() bool {
}
// SetCondition gets a reference to the given []map[string]interface{} and assigns it to the Condition field.
-func (o *GenerateRuleTitleRule) SetCondition(v []interface{}) {
- o.Condition = v
+func (o *GenerateRuleTitleRule) SetCondition(v []map[string]interface{}) {
+ o.Condition = &v
}
type NullableGenerateRuleTitleRule struct {
diff --git a/model_giveaway.go b/model_giveaway.go
index 23bf312e..7580bce1 100644
--- a/model_giveaway.go
+++ b/model_giveaway.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Giveaway
+// Giveaway struct for Giveaway
type Giveaway struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_import.go b/model_import.go
index 2ab8d34a..db6d24a8 100644
--- a/model_import.go
+++ b/model_import.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Import
+// Import struct for Import
type Import struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_inline_response_200_20.go b/model_inline_response_200_20.go
index 3cb8e65b..f5cade25 100644
--- a/model_inline_response_200_20.go
+++ b/model_inline_response_200_20.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20020 struct for InlineResponse20020
type InlineResponse20020 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []AccessLogEntry `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []CampaignAnalytics `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20020) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20020) GetData() []AccessLogEntry {
+func (o *InlineResponse20020) GetData() []CampaignAnalytics {
if o == nil {
- var ret []AccessLogEntry
+ var ret []CampaignAnalytics
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20020) GetData() []AccessLogEntry {
}
// SetData sets field value
-func (o *InlineResponse20020) SetData(v []AccessLogEntry) {
+func (o *InlineResponse20020) SetData(v []CampaignAnalytics) {
o.Data = v
}
diff --git a/model_inline_response_200_21.go b/model_inline_response_200_21.go
index a118405f..d476855c 100644
--- a/model_inline_response_200_21.go
+++ b/model_inline_response_200_21.go
@@ -16,29 +16,81 @@ import (
// InlineResponse20021 struct for InlineResponse20021
type InlineResponse20021 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []CampaignAnalytics `json:"data"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ Data []ApplicationCustomer `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
func (o *InlineResponse20021) GetTotalResultSize() int32 {
- if o == nil {
+ if o == nil || o.TotalResultSize == nil {
var ret int32
return ret
}
+ return *o.TotalResultSize
+}
- return o.TotalResultSize
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20021) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.TotalResultSize, true
}
-// SetTotalResultSize sets field value
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20021) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
func (o *InlineResponse20021) SetTotalResultSize(v int32) {
- o.TotalResultSize = v
+ o.TotalResultSize = &v
+}
+
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
+func (o *InlineResponse20021) GetHasMore() bool {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret
+ }
+ return *o.HasMore
+}
+
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20021) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.HasMore, true
+}
+
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20021) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+func (o *InlineResponse20021) SetHasMore(v bool) {
+ o.HasMore = &v
}
// GetData returns the Data field value
-func (o *InlineResponse20021) GetData() []CampaignAnalytics {
+func (o *InlineResponse20021) GetData() []ApplicationCustomer {
if o == nil {
- var ret []CampaignAnalytics
+ var ret []ApplicationCustomer
return ret
}
@@ -46,7 +98,7 @@ func (o *InlineResponse20021) GetData() []CampaignAnalytics {
}
// SetData sets field value
-func (o *InlineResponse20021) SetData(v []CampaignAnalytics) {
+func (o *InlineResponse20021) SetData(v []ApplicationCustomer) {
o.Data = v
}
diff --git a/model_inline_response_200_22.go b/model_inline_response_200_22.go
index 64f8b0e6..0524b99d 100644
--- a/model_inline_response_200_22.go
+++ b/model_inline_response_200_22.go
@@ -16,75 +16,75 @@ import (
// InlineResponse20022 struct for InlineResponse20022
type InlineResponse20022 struct {
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
Data []ApplicationCustomer `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
-func (o *InlineResponse20022) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
+func (o *InlineResponse20022) GetHasMore() bool {
+ if o == nil || o.HasMore == nil {
+ var ret bool
return ret
}
- return *o.TotalResultSize
+ return *o.HasMore
}
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *InlineResponse20022) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
+func (o *InlineResponse20022) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
return ret, false
}
- return *o.TotalResultSize, true
+ return *o.HasMore, true
}
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20022) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20022) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
return true
}
return false
}
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-func (o *InlineResponse20022) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+func (o *InlineResponse20022) SetHasMore(v bool) {
+ o.HasMore = &v
}
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
-func (o *InlineResponse20022) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
- var ret bool
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
+func (o *InlineResponse20022) GetTotalResultSize() int32 {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
return ret
}
- return *o.HasMore
+ return *o.TotalResultSize
}
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *InlineResponse20022) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
+func (o *InlineResponse20022) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
return ret, false
}
- return *o.HasMore, true
+ return *o.TotalResultSize, true
}
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20022) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20022) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
return true
}
return false
}
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-func (o *InlineResponse20022) SetHasMore(v bool) {
- o.HasMore = &v
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+func (o *InlineResponse20022) SetTotalResultSize(v int32) {
+ o.TotalResultSize = &v
}
// GetData returns the Data field value
diff --git a/model_inline_response_200_23.go b/model_inline_response_200_23.go
index 6132db59..f9e5c685 100644
--- a/model_inline_response_200_23.go
+++ b/model_inline_response_200_23.go
@@ -16,9 +16,9 @@ import (
// InlineResponse20023 struct for InlineResponse20023
type InlineResponse20023 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- Data []ApplicationCustomer `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ Data []CustomerProfile `json:"data"`
}
// GetHasMore returns the HasMore field value if set, zero value otherwise.
@@ -88,9 +88,9 @@ func (o *InlineResponse20023) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20023) GetData() []ApplicationCustomer {
+func (o *InlineResponse20023) GetData() []CustomerProfile {
if o == nil {
- var ret []ApplicationCustomer
+ var ret []CustomerProfile
return ret
}
@@ -98,7 +98,7 @@ func (o *InlineResponse20023) GetData() []ApplicationCustomer {
}
// SetData sets field value
-func (o *InlineResponse20023) SetData(v []ApplicationCustomer) {
+func (o *InlineResponse20023) SetData(v []CustomerProfile) {
o.Data = v
}
diff --git a/model_inline_response_200_24.go b/model_inline_response_200_24.go
index a85f3f28..a827d4b3 100644
--- a/model_inline_response_200_24.go
+++ b/model_inline_response_200_24.go
@@ -16,75 +16,23 @@ import (
// InlineResponse20024 struct for InlineResponse20024
type InlineResponse20024 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- Data []CustomerProfile `json:"data"`
+ HasMore bool `json:"hasMore"`
+ Data []CustomerProfile `json:"data"`
}
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
+// GetHasMore returns the HasMore field value
func (o *InlineResponse20024) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
+ if o == nil {
var ret bool
return ret
}
- return *o.HasMore
-}
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20024) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret, false
- }
- return *o.HasMore, true
+ return o.HasMore
}
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20024) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
- return true
- }
-
- return false
-}
-
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+// SetHasMore sets field value
func (o *InlineResponse20024) SetHasMore(v bool) {
- o.HasMore = &v
-}
-
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
-func (o *InlineResponse20024) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret
- }
- return *o.TotalResultSize
-}
-
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20024) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret, false
- }
- return *o.TotalResultSize, true
-}
-
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20024) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
- return true
- }
-
- return false
-}
-
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-func (o *InlineResponse20024) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
+ o.HasMore = v
}
// GetData returns the Data field value
diff --git a/model_inline_response_200_25.go b/model_inline_response_200_25.go
index ec434e1a..d107fdf1 100644
--- a/model_inline_response_200_25.go
+++ b/model_inline_response_200_25.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20025 struct for InlineResponse20025
type InlineResponse20025 struct {
- HasMore bool `json:"hasMore"`
- Data []CustomerProfile `json:"data"`
+ HasMore bool `json:"hasMore"`
+ Data []CustomerActivityReport `json:"data"`
}
// GetHasMore returns the HasMore field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20025) SetHasMore(v bool) {
}
// GetData returns the Data field value
-func (o *InlineResponse20025) GetData() []CustomerProfile {
+func (o *InlineResponse20025) GetData() []CustomerActivityReport {
if o == nil {
- var ret []CustomerProfile
+ var ret []CustomerActivityReport
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20025) GetData() []CustomerProfile {
}
// SetData sets field value
-func (o *InlineResponse20025) SetData(v []CustomerProfile) {
+func (o *InlineResponse20025) SetData(v []CustomerActivityReport) {
o.Data = v
}
diff --git a/model_inline_response_200_26.go b/model_inline_response_200_26.go
index 134688d0..12854fb2 100644
--- a/model_inline_response_200_26.go
+++ b/model_inline_response_200_26.go
@@ -16,29 +16,47 @@ import (
// InlineResponse20026 struct for InlineResponse20026
type InlineResponse20026 struct {
- HasMore bool `json:"hasMore"`
- Data []CustomerActivityReport `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ Data []ApplicationSession `json:"data"`
}
-// GetHasMore returns the HasMore field value
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
func (o *InlineResponse20026) GetHasMore() bool {
- if o == nil {
+ if o == nil || o.HasMore == nil {
var ret bool
return ret
}
+ return *o.HasMore
+}
+
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20026) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.HasMore, true
+}
+
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20026) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
+ return true
+ }
- return o.HasMore
+ return false
}
-// SetHasMore sets field value
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
func (o *InlineResponse20026) SetHasMore(v bool) {
- o.HasMore = v
+ o.HasMore = &v
}
// GetData returns the Data field value
-func (o *InlineResponse20026) GetData() []CustomerActivityReport {
+func (o *InlineResponse20026) GetData() []ApplicationSession {
if o == nil {
- var ret []CustomerActivityReport
+ var ret []ApplicationSession
return ret
}
@@ -46,7 +64,7 @@ func (o *InlineResponse20026) GetData() []CustomerActivityReport {
}
// SetData sets field value
-func (o *InlineResponse20026) SetData(v []CustomerActivityReport) {
+func (o *InlineResponse20026) SetData(v []ApplicationSession) {
o.Data = v
}
diff --git a/model_inline_response_200_27.go b/model_inline_response_200_27.go
index cbe928cb..54d47656 100644
--- a/model_inline_response_200_27.go
+++ b/model_inline_response_200_27.go
@@ -16,47 +16,29 @@ import (
// InlineResponse20027 struct for InlineResponse20027
type InlineResponse20027 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- Data []ApplicationSession `json:"data"`
+ HasMore bool `json:"hasMore"`
+ Data []ApplicationEvent `json:"data"`
}
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
+// GetHasMore returns the HasMore field value
func (o *InlineResponse20027) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
+ if o == nil {
var ret bool
return ret
}
- return *o.HasMore
-}
-
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20027) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret, false
- }
- return *o.HasMore, true
-}
-
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20027) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
- return true
- }
- return false
+ return o.HasMore
}
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+// SetHasMore sets field value
func (o *InlineResponse20027) SetHasMore(v bool) {
- o.HasMore = &v
+ o.HasMore = v
}
// GetData returns the Data field value
-func (o *InlineResponse20027) GetData() []ApplicationSession {
+func (o *InlineResponse20027) GetData() []ApplicationEvent {
if o == nil {
- var ret []ApplicationSession
+ var ret []ApplicationEvent
return ret
}
@@ -64,7 +46,7 @@ func (o *InlineResponse20027) GetData() []ApplicationSession {
}
// SetData sets field value
-func (o *InlineResponse20027) SetData(v []ApplicationSession) {
+func (o *InlineResponse20027) SetData(v []ApplicationEvent) {
o.Data = v
}
diff --git a/model_inline_response_200_28.go b/model_inline_response_200_28.go
index c21afbe9..9aaed6d4 100644
--- a/model_inline_response_200_28.go
+++ b/model_inline_response_200_28.go
@@ -16,29 +16,29 @@ import (
// InlineResponse20028 struct for InlineResponse20028
type InlineResponse20028 struct {
- HasMore bool `json:"hasMore"`
- Data []ApplicationEvent `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []string `json:"data"`
}
-// GetHasMore returns the HasMore field value
-func (o *InlineResponse20028) GetHasMore() bool {
+// GetTotalResultSize returns the TotalResultSize field value
+func (o *InlineResponse20028) GetTotalResultSize() int32 {
if o == nil {
- var ret bool
+ var ret int32
return ret
}
- return o.HasMore
+ return o.TotalResultSize
}
-// SetHasMore sets field value
-func (o *InlineResponse20028) SetHasMore(v bool) {
- o.HasMore = v
+// SetTotalResultSize sets field value
+func (o *InlineResponse20028) SetTotalResultSize(v int32) {
+ o.TotalResultSize = v
}
// GetData returns the Data field value
-func (o *InlineResponse20028) GetData() []ApplicationEvent {
+func (o *InlineResponse20028) GetData() []string {
if o == nil {
- var ret []ApplicationEvent
+ var ret []string
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20028) GetData() []ApplicationEvent {
}
// SetData sets field value
-func (o *InlineResponse20028) SetData(v []ApplicationEvent) {
+func (o *InlineResponse20028) SetData(v []string) {
o.Data = v
}
diff --git a/model_inline_response_200_29.go b/model_inline_response_200_29.go
index 7a78bc6a..c57c88ba 100644
--- a/model_inline_response_200_29.go
+++ b/model_inline_response_200_29.go
@@ -16,29 +16,81 @@ import (
// InlineResponse20029 struct for InlineResponse20029
type InlineResponse20029 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []string `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ Data []Audience `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
+func (o *InlineResponse20029) GetHasMore() bool {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret
+ }
+ return *o.HasMore
+}
+
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20029) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.HasMore, true
+}
+
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20029) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+func (o *InlineResponse20029) SetHasMore(v bool) {
+ o.HasMore = &v
+}
+
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
func (o *InlineResponse20029) GetTotalResultSize() int32 {
- if o == nil {
+ if o == nil || o.TotalResultSize == nil {
var ret int32
return ret
}
+ return *o.TotalResultSize
+}
+
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20029) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.TotalResultSize, true
+}
+
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20029) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
+ return true
+ }
- return o.TotalResultSize
+ return false
}
-// SetTotalResultSize sets field value
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
func (o *InlineResponse20029) SetTotalResultSize(v int32) {
- o.TotalResultSize = v
+ o.TotalResultSize = &v
}
// GetData returns the Data field value
-func (o *InlineResponse20029) GetData() []string {
+func (o *InlineResponse20029) GetData() []Audience {
if o == nil {
- var ret []string
+ var ret []Audience
return ret
}
@@ -46,7 +98,7 @@ func (o *InlineResponse20029) GetData() []string {
}
// SetData sets field value
-func (o *InlineResponse20029) SetData(v []string) {
+func (o *InlineResponse20029) SetData(v []Audience) {
o.Data = v
}
diff --git a/model_inline_response_200_30.go b/model_inline_response_200_30.go
index 16ebac4c..21579ca9 100644
--- a/model_inline_response_200_30.go
+++ b/model_inline_response_200_30.go
@@ -16,9 +16,8 @@ import (
// InlineResponse20030 struct for InlineResponse20030
type InlineResponse20030 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- Data []Audience `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ Data []AudienceAnalytics `json:"data"`
}
// GetHasMore returns the HasMore field value if set, zero value otherwise.
@@ -54,43 +53,10 @@ func (o *InlineResponse20030) SetHasMore(v bool) {
o.HasMore = &v
}
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
-func (o *InlineResponse20030) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret
- }
- return *o.TotalResultSize
-}
-
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20030) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret, false
- }
- return *o.TotalResultSize, true
-}
-
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20030) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
- return true
- }
-
- return false
-}
-
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-func (o *InlineResponse20030) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
-}
-
// GetData returns the Data field value
-func (o *InlineResponse20030) GetData() []Audience {
+func (o *InlineResponse20030) GetData() []AudienceAnalytics {
if o == nil {
- var ret []Audience
+ var ret []AudienceAnalytics
return ret
}
@@ -98,7 +64,7 @@ func (o *InlineResponse20030) GetData() []Audience {
}
// SetData sets field value
-func (o *InlineResponse20030) SetData(v []Audience) {
+func (o *InlineResponse20030) SetData(v []AudienceAnalytics) {
o.Data = v
}
diff --git a/model_inline_response_200_31.go b/model_inline_response_200_31.go
index 27aae598..364f0bb3 100644
--- a/model_inline_response_200_31.go
+++ b/model_inline_response_200_31.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20031 struct for InlineResponse20031
type InlineResponse20031 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- Data []AudienceAnalytics `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ Data []CustomerProfile `json:"data"`
}
// GetHasMore returns the HasMore field value if set, zero value otherwise.
@@ -54,9 +54,9 @@ func (o *InlineResponse20031) SetHasMore(v bool) {
}
// GetData returns the Data field value
-func (o *InlineResponse20031) GetData() []AudienceAnalytics {
+func (o *InlineResponse20031) GetData() []CustomerProfile {
if o == nil {
- var ret []AudienceAnalytics
+ var ret []CustomerProfile
return ret
}
@@ -64,7 +64,7 @@ func (o *InlineResponse20031) GetData() []AudienceAnalytics {
}
// SetData sets field value
-func (o *InlineResponse20031) SetData(v []AudienceAnalytics) {
+func (o *InlineResponse20031) SetData(v []CustomerProfile) {
o.Data = v
}
diff --git a/model_inline_response_200_32.go b/model_inline_response_200_32.go
index 189aeff5..587637dc 100644
--- a/model_inline_response_200_32.go
+++ b/model_inline_response_200_32.go
@@ -16,8 +16,9 @@ import (
// InlineResponse20032 struct for InlineResponse20032
type InlineResponse20032 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- Data []CustomerProfile `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ Data []ApplicationReferee `json:"data"`
}
// GetHasMore returns the HasMore field value if set, zero value otherwise.
@@ -53,10 +54,43 @@ func (o *InlineResponse20032) SetHasMore(v bool) {
o.HasMore = &v
}
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
+func (o *InlineResponse20032) GetTotalResultSize() int32 {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret
+ }
+ return *o.TotalResultSize
+}
+
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20032) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.TotalResultSize, true
+}
+
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20032) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+func (o *InlineResponse20032) SetTotalResultSize(v int32) {
+ o.TotalResultSize = &v
+}
+
// GetData returns the Data field value
-func (o *InlineResponse20032) GetData() []CustomerProfile {
+func (o *InlineResponse20032) GetData() []ApplicationReferee {
if o == nil {
- var ret []CustomerProfile
+ var ret []ApplicationReferee
return ret
}
@@ -64,7 +98,7 @@ func (o *InlineResponse20032) GetData() []CustomerProfile {
}
// SetData sets field value
-func (o *InlineResponse20032) SetData(v []CustomerProfile) {
+func (o *InlineResponse20032) SetData(v []ApplicationReferee) {
o.Data = v
}
diff --git a/model_inline_response_200_33.go b/model_inline_response_200_33.go
index ce6ecb4b..4c580b52 100644
--- a/model_inline_response_200_33.go
+++ b/model_inline_response_200_33.go
@@ -16,81 +16,29 @@ import (
// InlineResponse20033 struct for InlineResponse20033
type InlineResponse20033 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- Data []ApplicationReferee `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []Attribute `json:"data"`
}
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
-func (o *InlineResponse20033) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret
- }
- return *o.HasMore
-}
-
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20033) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret, false
- }
- return *o.HasMore, true
-}
-
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20033) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
- return true
- }
-
- return false
-}
-
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-func (o *InlineResponse20033) SetHasMore(v bool) {
- o.HasMore = &v
-}
-
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
+// GetTotalResultSize returns the TotalResultSize field value
func (o *InlineResponse20033) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
+ if o == nil {
var ret int32
return ret
}
- return *o.TotalResultSize
-}
-
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20033) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret, false
- }
- return *o.TotalResultSize, true
-}
-
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20033) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
- return true
- }
- return false
+ return o.TotalResultSize
}
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+// SetTotalResultSize sets field value
func (o *InlineResponse20033) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
+ o.TotalResultSize = v
}
// GetData returns the Data field value
-func (o *InlineResponse20033) GetData() []ApplicationReferee {
+func (o *InlineResponse20033) GetData() []Attribute {
if o == nil {
- var ret []ApplicationReferee
+ var ret []Attribute
return ret
}
@@ -98,7 +46,7 @@ func (o *InlineResponse20033) GetData() []ApplicationReferee {
}
// SetData sets field value
-func (o *InlineResponse20033) SetData(v []ApplicationReferee) {
+func (o *InlineResponse20033) SetData(v []Attribute) {
o.Data = v
}
diff --git a/model_inline_response_200_34.go b/model_inline_response_200_34.go
index 50d4efea..2b58d1c0 100644
--- a/model_inline_response_200_34.go
+++ b/model_inline_response_200_34.go
@@ -16,29 +16,81 @@ import (
// InlineResponse20034 struct for InlineResponse20034
type InlineResponse20034 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []Attribute `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ Data []CatalogItem `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
+func (o *InlineResponse20034) GetHasMore() bool {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret
+ }
+ return *o.HasMore
+}
+
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20034) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.HasMore, true
+}
+
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20034) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+func (o *InlineResponse20034) SetHasMore(v bool) {
+ o.HasMore = &v
+}
+
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
func (o *InlineResponse20034) GetTotalResultSize() int32 {
- if o == nil {
+ if o == nil || o.TotalResultSize == nil {
var ret int32
return ret
}
+ return *o.TotalResultSize
+}
+
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20034) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.TotalResultSize, true
+}
+
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20034) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
+ return true
+ }
- return o.TotalResultSize
+ return false
}
-// SetTotalResultSize sets field value
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
func (o *InlineResponse20034) SetTotalResultSize(v int32) {
- o.TotalResultSize = v
+ o.TotalResultSize = &v
}
// GetData returns the Data field value
-func (o *InlineResponse20034) GetData() []Attribute {
+func (o *InlineResponse20034) GetData() []CatalogItem {
if o == nil {
- var ret []Attribute
+ var ret []CatalogItem
return ret
}
@@ -46,7 +98,7 @@ func (o *InlineResponse20034) GetData() []Attribute {
}
// SetData sets field value
-func (o *InlineResponse20034) SetData(v []Attribute) {
+func (o *InlineResponse20034) SetData(v []CatalogItem) {
o.Data = v
}
diff --git a/model_inline_response_200_35.go b/model_inline_response_200_35.go
index 5422c082..46c92f7f 100644
--- a/model_inline_response_200_35.go
+++ b/model_inline_response_200_35.go
@@ -16,81 +16,29 @@ import (
// InlineResponse20035 struct for InlineResponse20035
type InlineResponse20035 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- Data []CatalogItem `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []AccountAdditionalCost `json:"data"`
}
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
-func (o *InlineResponse20035) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret
- }
- return *o.HasMore
-}
-
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20035) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret, false
- }
- return *o.HasMore, true
-}
-
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20035) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
- return true
- }
-
- return false
-}
-
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-func (o *InlineResponse20035) SetHasMore(v bool) {
- o.HasMore = &v
-}
-
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
+// GetTotalResultSize returns the TotalResultSize field value
func (o *InlineResponse20035) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
+ if o == nil {
var ret int32
return ret
}
- return *o.TotalResultSize
-}
-
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20035) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret, false
- }
- return *o.TotalResultSize, true
-}
-
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20035) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
- return true
- }
- return false
+ return o.TotalResultSize
}
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+// SetTotalResultSize sets field value
func (o *InlineResponse20035) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
+ o.TotalResultSize = v
}
// GetData returns the Data field value
-func (o *InlineResponse20035) GetData() []CatalogItem {
+func (o *InlineResponse20035) GetData() []AccountAdditionalCost {
if o == nil {
- var ret []CatalogItem
+ var ret []AccountAdditionalCost
return ret
}
@@ -98,7 +46,7 @@ func (o *InlineResponse20035) GetData() []CatalogItem {
}
// SetData sets field value
-func (o *InlineResponse20035) SetData(v []CatalogItem) {
+func (o *InlineResponse20035) SetData(v []AccountAdditionalCost) {
o.Data = v
}
diff --git a/model_inline_response_200_36.go b/model_inline_response_200_36.go
index ff55e428..0075c780 100644
--- a/model_inline_response_200_36.go
+++ b/model_inline_response_200_36.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20036 struct for InlineResponse20036
type InlineResponse20036 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []AccountAdditionalCost `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []WebhookWithOutgoingIntegrationDetails `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20036) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20036) GetData() []AccountAdditionalCost {
+func (o *InlineResponse20036) GetData() []WebhookWithOutgoingIntegrationDetails {
if o == nil {
- var ret []AccountAdditionalCost
+ var ret []WebhookWithOutgoingIntegrationDetails
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20036) GetData() []AccountAdditionalCost {
}
// SetData sets field value
-func (o *InlineResponse20036) SetData(v []AccountAdditionalCost) {
+func (o *InlineResponse20036) SetData(v []WebhookWithOutgoingIntegrationDetails) {
o.Data = v
}
diff --git a/model_inline_response_200_37.go b/model_inline_response_200_37.go
index 849e5886..1ccc9c9d 100644
--- a/model_inline_response_200_37.go
+++ b/model_inline_response_200_37.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20037 struct for InlineResponse20037
type InlineResponse20037 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []WebhookWithOutgoingIntegrationDetails `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []WebhookActivationLogEntry `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20037) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20037) GetData() []WebhookWithOutgoingIntegrationDetails {
+func (o *InlineResponse20037) GetData() []WebhookActivationLogEntry {
if o == nil {
- var ret []WebhookWithOutgoingIntegrationDetails
+ var ret []WebhookActivationLogEntry
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20037) GetData() []WebhookWithOutgoingIntegrationDetails
}
// SetData sets field value
-func (o *InlineResponse20037) SetData(v []WebhookWithOutgoingIntegrationDetails) {
+func (o *InlineResponse20037) SetData(v []WebhookActivationLogEntry) {
o.Data = v
}
diff --git a/model_inline_response_200_38.go b/model_inline_response_200_38.go
index e1a5f12c..b93df0e6 100644
--- a/model_inline_response_200_38.go
+++ b/model_inline_response_200_38.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20038 struct for InlineResponse20038
type InlineResponse20038 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []WebhookActivationLogEntry `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []WebhookLogEntry `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20038) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20038) GetData() []WebhookActivationLogEntry {
+func (o *InlineResponse20038) GetData() []WebhookLogEntry {
if o == nil {
- var ret []WebhookActivationLogEntry
+ var ret []WebhookLogEntry
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20038) GetData() []WebhookActivationLogEntry {
}
// SetData sets field value
-func (o *InlineResponse20038) SetData(v []WebhookActivationLogEntry) {
+func (o *InlineResponse20038) SetData(v []WebhookLogEntry) {
o.Data = v
}
diff --git a/model_inline_response_200_39.go b/model_inline_response_200_39.go
index 00861163..136d44f9 100644
--- a/model_inline_response_200_39.go
+++ b/model_inline_response_200_39.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20039 struct for InlineResponse20039
type InlineResponse20039 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []WebhookLogEntry `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []EventType `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20039) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20039) GetData() []WebhookLogEntry {
+func (o *InlineResponse20039) GetData() []EventType {
if o == nil {
- var ret []WebhookLogEntry
+ var ret []EventType
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20039) GetData() []WebhookLogEntry {
}
// SetData sets field value
-func (o *InlineResponse20039) SetData(v []WebhookLogEntry) {
+func (o *InlineResponse20039) SetData(v []EventType) {
o.Data = v
}
diff --git a/model_inline_response_200_40.go b/model_inline_response_200_40.go
index 90d96933..45516936 100644
--- a/model_inline_response_200_40.go
+++ b/model_inline_response_200_40.go
@@ -16,8 +16,8 @@ import (
// InlineResponse20040 struct for InlineResponse20040
type InlineResponse20040 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []EventType `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []User `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20040) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20040) GetData() []EventType {
+func (o *InlineResponse20040) GetData() []User {
if o == nil {
- var ret []EventType
+ var ret []User
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20040) GetData() []EventType {
}
// SetData sets field value
-func (o *InlineResponse20040) SetData(v []EventType) {
+func (o *InlineResponse20040) SetData(v []User) {
o.Data = v
}
diff --git a/model_inline_response_200_41.go b/model_inline_response_200_41.go
index bef1d4ae..949f779c 100644
--- a/model_inline_response_200_41.go
+++ b/model_inline_response_200_41.go
@@ -16,29 +16,81 @@ import (
// InlineResponse20041 struct for InlineResponse20041
type InlineResponse20041 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []User `json:"data"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ Data []Change `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
func (o *InlineResponse20041) GetTotalResultSize() int32 {
- if o == nil {
+ if o == nil || o.TotalResultSize == nil {
var ret int32
return ret
}
+ return *o.TotalResultSize
+}
- return o.TotalResultSize
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20041) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.TotalResultSize, true
}
-// SetTotalResultSize sets field value
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20041) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
func (o *InlineResponse20041) SetTotalResultSize(v int32) {
- o.TotalResultSize = v
+ o.TotalResultSize = &v
+}
+
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
+func (o *InlineResponse20041) GetHasMore() bool {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret
+ }
+ return *o.HasMore
+}
+
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20041) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.HasMore, true
+}
+
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20041) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+func (o *InlineResponse20041) SetHasMore(v bool) {
+ o.HasMore = &v
}
// GetData returns the Data field value
-func (o *InlineResponse20041) GetData() []User {
+func (o *InlineResponse20041) GetData() []Change {
if o == nil {
- var ret []User
+ var ret []Change
return ret
}
@@ -46,7 +98,7 @@ func (o *InlineResponse20041) GetData() []User {
}
// SetData sets field value
-func (o *InlineResponse20041) SetData(v []User) {
+func (o *InlineResponse20041) SetData(v []Change) {
o.Data = v
}
diff --git a/model_inline_response_200_42.go b/model_inline_response_200_42.go
index aa9895c7..a116279e 100644
--- a/model_inline_response_200_42.go
+++ b/model_inline_response_200_42.go
@@ -16,81 +16,29 @@ import (
// InlineResponse20042 struct for InlineResponse20042
type InlineResponse20042 struct {
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- HasMore *bool `json:"hasMore,omitempty"`
- Data []Change `json:"data"`
+ TotalResultSize int32 `json:"totalResultSize"`
+ Data []Export `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
+// GetTotalResultSize returns the TotalResultSize field value
func (o *InlineResponse20042) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
+ if o == nil {
var ret int32
return ret
}
- return *o.TotalResultSize
-}
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20042) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret, false
- }
- return *o.TotalResultSize, true
+ return o.TotalResultSize
}
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20042) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
- return true
- }
-
- return false
-}
-
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
+// SetTotalResultSize sets field value
func (o *InlineResponse20042) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
-}
-
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
-func (o *InlineResponse20042) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret
- }
- return *o.HasMore
-}
-
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20042) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret, false
- }
- return *o.HasMore, true
-}
-
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20042) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
- return true
- }
-
- return false
-}
-
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
-func (o *InlineResponse20042) SetHasMore(v bool) {
- o.HasMore = &v
+ o.TotalResultSize = v
}
// GetData returns the Data field value
-func (o *InlineResponse20042) GetData() []Change {
+func (o *InlineResponse20042) GetData() []Export {
if o == nil {
- var ret []Change
+ var ret []Export
return ret
}
@@ -98,7 +46,7 @@ func (o *InlineResponse20042) GetData() []Change {
}
// SetData sets field value
-func (o *InlineResponse20042) SetData(v []Change) {
+func (o *InlineResponse20042) SetData(v []Export) {
o.Data = v
}
diff --git a/model_inline_response_200_43.go b/model_inline_response_200_43.go
index 4e9be7c8..aaa26ed8 100644
--- a/model_inline_response_200_43.go
+++ b/model_inline_response_200_43.go
@@ -17,7 +17,7 @@ import (
// InlineResponse20043 struct for InlineResponse20043
type InlineResponse20043 struct {
TotalResultSize int32 `json:"totalResultSize"`
- Data []Export `json:"data"`
+ Data []RoleV2 `json:"data"`
}
// GetTotalResultSize returns the TotalResultSize field value
@@ -36,9 +36,9 @@ func (o *InlineResponse20043) SetTotalResultSize(v int32) {
}
// GetData returns the Data field value
-func (o *InlineResponse20043) GetData() []Export {
+func (o *InlineResponse20043) GetData() []RoleV2 {
if o == nil {
- var ret []Export
+ var ret []RoleV2
return ret
}
@@ -46,7 +46,7 @@ func (o *InlineResponse20043) GetData() []Export {
}
// SetData sets field value
-func (o *InlineResponse20043) SetData(v []Export) {
+func (o *InlineResponse20043) SetData(v []RoleV2) {
o.Data = v
}
diff --git a/model_inline_response_200_44.go b/model_inline_response_200_44.go
index 510f99b4..9b34e42c 100644
--- a/model_inline_response_200_44.go
+++ b/model_inline_response_200_44.go
@@ -16,29 +16,81 @@ import (
// InlineResponse20044 struct for InlineResponse20044
type InlineResponse20044 struct {
- TotalResultSize int32 `json:"totalResultSize"`
- Data []RoleV2 `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ TotalResultSize *int32 `json:"totalResultSize,omitempty"`
+ Data []Store `json:"data"`
}
-// GetTotalResultSize returns the TotalResultSize field value
+// GetHasMore returns the HasMore field value if set, zero value otherwise.
+func (o *InlineResponse20044) GetHasMore() bool {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret
+ }
+ return *o.HasMore
+}
+
+// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20044) GetHasMoreOk() (bool, bool) {
+ if o == nil || o.HasMore == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.HasMore, true
+}
+
+// HasHasMore returns a boolean if a field has been set.
+func (o *InlineResponse20044) HasHasMore() bool {
+ if o != nil && o.HasMore != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+func (o *InlineResponse20044) SetHasMore(v bool) {
+ o.HasMore = &v
+}
+
+// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
func (o *InlineResponse20044) GetTotalResultSize() int32 {
- if o == nil {
+ if o == nil || o.TotalResultSize == nil {
var ret int32
return ret
}
+ return *o.TotalResultSize
+}
+
+// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *InlineResponse20044) GetTotalResultSizeOk() (int32, bool) {
+ if o == nil || o.TotalResultSize == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.TotalResultSize, true
+}
+
+// HasTotalResultSize returns a boolean if a field has been set.
+func (o *InlineResponse20044) HasTotalResultSize() bool {
+ if o != nil && o.TotalResultSize != nil {
+ return true
+ }
- return o.TotalResultSize
+ return false
}
-// SetTotalResultSize sets field value
+// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
func (o *InlineResponse20044) SetTotalResultSize(v int32) {
- o.TotalResultSize = v
+ o.TotalResultSize = &v
}
// GetData returns the Data field value
-func (o *InlineResponse20044) GetData() []RoleV2 {
+func (o *InlineResponse20044) GetData() []Store {
if o == nil {
- var ret []RoleV2
+ var ret []Store
return ret
}
@@ -46,7 +98,7 @@ func (o *InlineResponse20044) GetData() []RoleV2 {
}
// SetData sets field value
-func (o *InlineResponse20044) SetData(v []RoleV2) {
+func (o *InlineResponse20044) SetData(v []Store) {
o.Data = v
}
diff --git a/model_inline_response_200_45.go b/model_inline_response_200_45.go
index b157b056..e4d31cfd 100644
--- a/model_inline_response_200_45.go
+++ b/model_inline_response_200_45.go
@@ -16,9 +16,8 @@ import (
// InlineResponse20045 struct for InlineResponse20045
type InlineResponse20045 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- TotalResultSize *int32 `json:"totalResultSize,omitempty"`
- Data []Store `json:"data"`
+ HasMore *bool `json:"hasMore,omitempty"`
+ Data []Achievement `json:"data"`
}
// GetHasMore returns the HasMore field value if set, zero value otherwise.
@@ -54,43 +53,10 @@ func (o *InlineResponse20045) SetHasMore(v bool) {
o.HasMore = &v
}
-// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise.
-func (o *InlineResponse20045) GetTotalResultSize() int32 {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret
- }
- return *o.TotalResultSize
-}
-
-// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20045) GetTotalResultSizeOk() (int32, bool) {
- if o == nil || o.TotalResultSize == nil {
- var ret int32
- return ret, false
- }
- return *o.TotalResultSize, true
-}
-
-// HasTotalResultSize returns a boolean if a field has been set.
-func (o *InlineResponse20045) HasTotalResultSize() bool {
- if o != nil && o.TotalResultSize != nil {
- return true
- }
-
- return false
-}
-
-// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field.
-func (o *InlineResponse20045) SetTotalResultSize(v int32) {
- o.TotalResultSize = &v
-}
-
// GetData returns the Data field value
-func (o *InlineResponse20045) GetData() []Store {
+func (o *InlineResponse20045) GetData() []Achievement {
if o == nil {
- var ret []Store
+ var ret []Achievement
return ret
}
@@ -98,7 +64,7 @@ func (o *InlineResponse20045) GetData() []Store {
}
// SetData sets field value
-func (o *InlineResponse20045) SetData(v []Store) {
+func (o *InlineResponse20045) SetData(v []Achievement) {
o.Data = v
}
diff --git a/model_inline_response_200_46.go b/model_inline_response_200_46.go
index 3ab88457..12bb047f 100644
--- a/model_inline_response_200_46.go
+++ b/model_inline_response_200_46.go
@@ -16,47 +16,29 @@ import (
// InlineResponse20046 struct for InlineResponse20046
type InlineResponse20046 struct {
- HasMore *bool `json:"hasMore,omitempty"`
- Data []Achievement `json:"data"`
+ HasMore bool `json:"hasMore"`
+ Data []AchievementProgress `json:"data"`
}
-// GetHasMore returns the HasMore field value if set, zero value otherwise.
+// GetHasMore returns the HasMore field value
func (o *InlineResponse20046) GetHasMore() bool {
- if o == nil || o.HasMore == nil {
+ if o == nil {
var ret bool
return ret
}
- return *o.HasMore
-}
-
-// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *InlineResponse20046) GetHasMoreOk() (bool, bool) {
- if o == nil || o.HasMore == nil {
- var ret bool
- return ret, false
- }
- return *o.HasMore, true
-}
-
-// HasHasMore returns a boolean if a field has been set.
-func (o *InlineResponse20046) HasHasMore() bool {
- if o != nil && o.HasMore != nil {
- return true
- }
- return false
+ return o.HasMore
}
-// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
+// SetHasMore sets field value
func (o *InlineResponse20046) SetHasMore(v bool) {
- o.HasMore = &v
+ o.HasMore = v
}
// GetData returns the Data field value
-func (o *InlineResponse20046) GetData() []Achievement {
+func (o *InlineResponse20046) GetData() []AchievementProgress {
if o == nil {
- var ret []Achievement
+ var ret []AchievementProgress
return ret
}
@@ -64,7 +46,7 @@ func (o *InlineResponse20046) GetData() []Achievement {
}
// SetData sets field value
-func (o *InlineResponse20046) SetData(v []Achievement) {
+func (o *InlineResponse20046) SetData(v []AchievementProgress) {
o.Data = v
}
diff --git a/model_integration_coupon.go b/model_integration_coupon.go
index b02171d5..01ef4d08 100644
--- a/model_integration_coupon.go
+++ b/model_integration_coupon.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// IntegrationCoupon
+// IntegrationCoupon struct for IntegrationCoupon
type IntegrationCoupon struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_integration_customer_session_response.go b/model_integration_customer_session_response.go
index 25e5f0d9..03887c65 100644
--- a/model_integration_customer_session_response.go
+++ b/model_integration_customer_session_response.go
@@ -17,7 +17,8 @@ import (
// IntegrationCustomerSessionResponse struct for IntegrationCustomerSessionResponse
type IntegrationCustomerSessionResponse struct {
CustomerSession *CustomerSessionV2 `json:"customerSession,omitempty"`
- Effects *[]Effect `json:"effects,omitempty"`
+ // The returned effects. **Note:** This endpoint returns only the effects that are valid after any rollback effects and their corresponding non-rollback effects are removed.
+ Effects *[]Effect `json:"effects,omitempty"`
}
// GetCustomerSession returns the CustomerSession field value if set, zero value otherwise.
diff --git a/model_integration_event.go b/model_integration_event.go
index 8d8dd699..0126c861 100644
--- a/model_integration_event.go
+++ b/model_integration_event.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// IntegrationEvent
+// IntegrationEvent struct for IntegrationEvent
type IntegrationEvent struct {
// ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
ProfileId *string `json:"profileId,omitempty"`
diff --git a/model_integration_event_v2_request.go b/model_integration_event_v2_request.go
index 7e9bd8f6..5fbba327 100644
--- a/model_integration_event_v2_request.go
+++ b/model_integration_event_v2_request.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// IntegrationEventV2Request
+// IntegrationEventV2Request struct for IntegrationEventV2Request
type IntegrationEventV2Request struct {
// ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
ProfileId *string `json:"profileId,omitempty"`
diff --git a/model_inventory_coupon.go b/model_inventory_coupon.go
index 4bcb7ba9..be568e71 100644
--- a/model_inventory_coupon.go
+++ b/model_inventory_coupon.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// InventoryCoupon
+// InventoryCoupon struct for InventoryCoupon
type InventoryCoupon struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_inventory_referral.go b/model_inventory_referral.go
index 6f5fe5c1..6d077968 100644
--- a/model_inventory_referral.go
+++ b/model_inventory_referral.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// InventoryReferral
+// InventoryReferral struct for InventoryReferral
type InventoryReferral struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_item_attribute.go b/model_item_attribute.go
index 95957521..0315471d 100644
--- a/model_item_attribute.go
+++ b/model_item_attribute.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// ItemAttribute
+// ItemAttribute struct for ItemAttribute
type ItemAttribute struct {
// The ID of the attribute of the item.
Attributeid int32 `json:"attributeid"`
diff --git a/model_ledger_entry.go b/model_ledger_entry.go
index c4dd2c18..70ee8415 100644
--- a/model_ledger_entry.go
+++ b/model_ledger_entry.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// LedgerEntry
+// LedgerEntry Entry in the point ledger.
type LedgerEntry struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_ledger_info.go b/model_ledger_info.go
index 3bc8db32..a3fd2f4f 100644
--- a/model_ledger_info.go
+++ b/model_ledger_info.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// LedgerInfo
+// LedgerInfo The balance in a Loyalty Program for some Customer.
type LedgerInfo struct {
// Sum of currently active points.
CurrentBalance float32 `json:"currentBalance"`
@@ -24,9 +24,9 @@ type LedgerInfo struct {
ExpiredBalance float32 `json:"expiredBalance"`
// **DEPRECATED** Value is shown as 0.
SpentBalance float32 `json:"spentBalance"`
- // Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied.
+ // The tentative points balance, reflecting the `currentBalance` and all point additions and deductions within the current open customer session. When the session is closed, the effects are applied and the `currentBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
TentativeCurrentBalance float32 `json:"tentativeCurrentBalance"`
- // Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied.
+ // The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
TentativePendingBalance *float32 `json:"tentativePendingBalance,omitempty"`
CurrentTier *Tier `json:"currentTier,omitempty"`
// Points required to move up a tier.
diff --git a/model_library_attribute.go b/model_library_attribute.go
index 7459ccd3..423fe102 100644
--- a/model_library_attribute.go
+++ b/model_library_attribute.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// LibraryAttribute
+// LibraryAttribute struct for LibraryAttribute
type LibraryAttribute struct {
// The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.
Entity string `json:"entity"`
diff --git a/model_limit_counter.go b/model_limit_counter.go
index b03474dc..9223199d 100644
--- a/model_limit_counter.go
+++ b/model_limit_counter.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// LimitCounter
+// LimitCounter struct for LimitCounter
type LimitCounter struct {
// The ID of the campaign that owns this entity.
CampaignId int32 `json:"campaignId"`
diff --git a/model_list_campaign_store_budgets.go b/model_list_campaign_store_budgets.go
new file mode 100644
index 00000000..bff1f36f
--- /dev/null
+++ b/model_list_campaign_store_budgets.go
@@ -0,0 +1,124 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// ListCampaignStoreBudgets struct for ListCampaignStoreBudgets
+type ListCampaignStoreBudgets struct {
+ Store ListCampaignStoreBudgetsStore `json:"store"`
+ Limit int32 `json:"limit"`
+ Action string `json:"action"`
+ Period *string `json:"period,omitempty"`
+}
+
+// GetStore returns the Store field value
+func (o *ListCampaignStoreBudgets) GetStore() ListCampaignStoreBudgetsStore {
+ if o == nil {
+ var ret ListCampaignStoreBudgetsStore
+ return ret
+ }
+
+ return o.Store
+}
+
+// SetStore sets field value
+func (o *ListCampaignStoreBudgets) SetStore(v ListCampaignStoreBudgetsStore) {
+ o.Store = v
+}
+
+// GetLimit returns the Limit field value
+func (o *ListCampaignStoreBudgets) GetLimit() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Limit
+}
+
+// SetLimit sets field value
+func (o *ListCampaignStoreBudgets) SetLimit(v int32) {
+ o.Limit = v
+}
+
+// GetAction returns the Action field value
+func (o *ListCampaignStoreBudgets) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// SetAction sets field value
+func (o *ListCampaignStoreBudgets) SetAction(v string) {
+ o.Action = v
+}
+
+// GetPeriod returns the Period field value if set, zero value otherwise.
+func (o *ListCampaignStoreBudgets) GetPeriod() string {
+ if o == nil || o.Period == nil {
+ var ret string
+ return ret
+ }
+ return *o.Period
+}
+
+// GetPeriodOk returns a tuple with the Period field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ListCampaignStoreBudgets) GetPeriodOk() (string, bool) {
+ if o == nil || o.Period == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Period, true
+}
+
+// HasPeriod returns a boolean if a field has been set.
+func (o *ListCampaignStoreBudgets) HasPeriod() bool {
+ if o != nil && o.Period != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPeriod gets a reference to the given string and assigns it to the Period field.
+func (o *ListCampaignStoreBudgets) SetPeriod(v string) {
+ o.Period = &v
+}
+
+type NullableListCampaignStoreBudgets struct {
+ Value ListCampaignStoreBudgets
+ ExplicitNull bool
+}
+
+func (v NullableListCampaignStoreBudgets) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableListCampaignStoreBudgets) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_list_campaign_store_budgets_store.go b/model_list_campaign_store_budgets_store.go
new file mode 100644
index 00000000..c0448177
--- /dev/null
+++ b/model_list_campaign_store_budgets_store.go
@@ -0,0 +1,90 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// ListCampaignStoreBudgetsStore struct for ListCampaignStoreBudgetsStore
+type ListCampaignStoreBudgetsStore struct {
+ Id int32 `json:"id"`
+ IntegrationId string `json:"integrationId"`
+ Name string `json:"name"`
+}
+
+// GetId returns the Id field value
+func (o *ListCampaignStoreBudgetsStore) GetId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Id
+}
+
+// SetId sets field value
+func (o *ListCampaignStoreBudgetsStore) SetId(v int32) {
+ o.Id = v
+}
+
+// GetIntegrationId returns the IntegrationId field value
+func (o *ListCampaignStoreBudgetsStore) GetIntegrationId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.IntegrationId
+}
+
+// SetIntegrationId sets field value
+func (o *ListCampaignStoreBudgetsStore) SetIntegrationId(v string) {
+ o.IntegrationId = v
+}
+
+// GetName returns the Name field value
+func (o *ListCampaignStoreBudgetsStore) GetName() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Name
+}
+
+// SetName sets field value
+func (o *ListCampaignStoreBudgetsStore) SetName(v string) {
+ o.Name = v
+}
+
+type NullableListCampaignStoreBudgetsStore struct {
+ Value ListCampaignStoreBudgetsStore
+ ExplicitNull bool
+}
+
+func (v NullableListCampaignStoreBudgetsStore) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableListCampaignStoreBudgetsStore) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_login_params.go b/model_login_params.go
index 0a105016..59add038 100644
--- a/model_login_params.go
+++ b/model_login_params.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// LoginParams
+// LoginParams struct for LoginParams
type LoginParams struct {
// The email address associated with the user profile.
Email string `json:"email"`
diff --git a/model_loyalty_balance_with_tier.go b/model_loyalty_balance_with_tier.go
index 3dda35af..4f23a6d1 100644
--- a/model_loyalty_balance_with_tier.go
+++ b/model_loyalty_balance_with_tier.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// LoyaltyBalanceWithTier
+// LoyaltyBalanceWithTier Point balance of a ledger in the Loyalty Program.
type LoyaltyBalanceWithTier struct {
// Total amount of points awarded to this customer and available to spend.
ActivePoints *float32 `json:"activePoints,omitempty"`
diff --git a/model_loyalty_card.go b/model_loyalty_card.go
index 209f7936..65053992 100644
--- a/model_loyalty_card.go
+++ b/model_loyalty_card.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// LoyaltyCard
+// LoyaltyCard struct for LoyaltyCard
type LoyaltyCard struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -23,6 +23,10 @@ type LoyaltyCard struct {
Created time.Time `json:"created"`
// The ID of the loyalty program that owns this entity.
ProgramID int32 `json:"programID"`
+ // The integration name of the loyalty program that owns this entity.
+ ProgramName *string `json:"programName,omitempty"`
+ // The Campaign Manager-displayed name of the loyalty program that owns this entity.
+ ProgramTitle *string `json:"programTitle,omitempty"`
// Status of the loyalty card. Can be `active` or `inactive`.
Status string `json:"status"`
// Reason for transferring and blocking the loyalty card.
@@ -91,6 +95,72 @@ func (o *LoyaltyCard) SetProgramID(v int32) {
o.ProgramID = v
}
+// GetProgramName returns the ProgramName field value if set, zero value otherwise.
+func (o *LoyaltyCard) GetProgramName() string {
+ if o == nil || o.ProgramName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ProgramName
+}
+
+// GetProgramNameOk returns a tuple with the ProgramName field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyCard) GetProgramNameOk() (string, bool) {
+ if o == nil || o.ProgramName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ProgramName, true
+}
+
+// HasProgramName returns a boolean if a field has been set.
+func (o *LoyaltyCard) HasProgramName() bool {
+ if o != nil && o.ProgramName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProgramName gets a reference to the given string and assigns it to the ProgramName field.
+func (o *LoyaltyCard) SetProgramName(v string) {
+ o.ProgramName = &v
+}
+
+// GetProgramTitle returns the ProgramTitle field value if set, zero value otherwise.
+func (o *LoyaltyCard) GetProgramTitle() string {
+ if o == nil || o.ProgramTitle == nil {
+ var ret string
+ return ret
+ }
+ return *o.ProgramTitle
+}
+
+// GetProgramTitleOk returns a tuple with the ProgramTitle field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyCard) GetProgramTitleOk() (string, bool) {
+ if o == nil || o.ProgramTitle == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ProgramTitle, true
+}
+
+// HasProgramTitle returns a boolean if a field has been set.
+func (o *LoyaltyCard) HasProgramTitle() bool {
+ if o != nil && o.ProgramTitle != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProgramTitle gets a reference to the given string and assigns it to the ProgramTitle field.
+func (o *LoyaltyCard) SetProgramTitle(v string) {
+ o.ProgramTitle = &v
+}
+
// GetStatus returns the Status field value
func (o *LoyaltyCard) GetStatus() string {
if o == nil {
diff --git a/model_loyalty_card_balances.go b/model_loyalty_card_balances.go
index 75ce2eaa..ffba8bfc 100644
--- a/model_loyalty_card_balances.go
+++ b/model_loyalty_card_balances.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// LoyaltyCardBalances
+// LoyaltyCardBalances List of customer profiles linked to the loyalty card.
type LoyaltyCardBalances struct {
Balance *LoyaltyBalance `json:"balance,omitempty"`
// Map of the loyalty balances of the subledgers of a ledger.
diff --git a/model_loyalty_card_batch.go b/model_loyalty_card_batch.go
index 7a680769..6028af1d 100644
--- a/model_loyalty_card_batch.go
+++ b/model_loyalty_card_batch.go
@@ -14,14 +14,15 @@ import (
"encoding/json"
)
-// LoyaltyCardBatch
+// LoyaltyCardBatch struct for LoyaltyCardBatch
type LoyaltyCardBatch struct {
// Number of loyalty cards in the batch.
NumberOfCards int32 `json:"numberOfCards"`
// ID of the loyalty card batch.
BatchId *string `json:"batchId,omitempty"`
// Status of the loyalty cards in the batch.
- Status *string `json:"status,omitempty"`
+ Status *string `json:"status,omitempty"`
+ CardCodeSettings *CodeGeneratorSettings `json:"cardCodeSettings,omitempty"`
}
// GetNumberOfCards returns the NumberOfCards field value
@@ -105,6 +106,39 @@ func (o *LoyaltyCardBatch) SetStatus(v string) {
o.Status = &v
}
+// GetCardCodeSettings returns the CardCodeSettings field value if set, zero value otherwise.
+func (o *LoyaltyCardBatch) GetCardCodeSettings() CodeGeneratorSettings {
+ if o == nil || o.CardCodeSettings == nil {
+ var ret CodeGeneratorSettings
+ return ret
+ }
+ return *o.CardCodeSettings
+}
+
+// GetCardCodeSettingsOk returns a tuple with the CardCodeSettings field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyCardBatch) GetCardCodeSettingsOk() (CodeGeneratorSettings, bool) {
+ if o == nil || o.CardCodeSettings == nil {
+ var ret CodeGeneratorSettings
+ return ret, false
+ }
+ return *o.CardCodeSettings, true
+}
+
+// HasCardCodeSettings returns a boolean if a field has been set.
+func (o *LoyaltyCardBatch) HasCardCodeSettings() bool {
+ if o != nil && o.CardCodeSettings != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCardCodeSettings gets a reference to the given CodeGeneratorSettings and assigns it to the CardCodeSettings field.
+func (o *LoyaltyCardBatch) SetCardCodeSettings(v CodeGeneratorSettings) {
+ o.CardCodeSettings = &v
+}
+
type NullableLoyaltyCardBatch struct {
Value LoyaltyCardBatch
ExplicitNull bool
diff --git a/model_loyalty_program.go b/model_loyalty_program.go
index 8415c3f5..1285cc39 100644
--- a/model_loyalty_program.go
+++ b/model_loyalty_program.go
@@ -15,9 +15,9 @@ import (
"time"
)
-// LoyaltyProgram
+// LoyaltyProgram A Loyalty Program
type LoyaltyProgram struct {
- // The ID of loyalty program. Internal ID of this entity.
+ // The ID of loyalty program.
Id int32 `json:"id"`
// The time this entity was created.
Created time.Time `json:"created"`
@@ -48,6 +48,8 @@ type LoyaltyProgram struct {
// The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment.
TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"`
CardCodeSettings *CodeGeneratorSettings `json:"cardCodeSettings,omitempty"`
+ // The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ ReturnPolicy *string `json:"returnPolicy,omitempty"`
// The ID of the Talon.One account that owns this program.
AccountID int32 `json:"accountID"`
// The internal name for the Loyalty Program. This is an immutable value.
@@ -436,6 +438,39 @@ func (o *LoyaltyProgram) SetCardCodeSettings(v CodeGeneratorSettings) {
o.CardCodeSettings = &v
}
+// GetReturnPolicy returns the ReturnPolicy field value if set, zero value otherwise.
+func (o *LoyaltyProgram) GetReturnPolicy() string {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnPolicy
+}
+
+// GetReturnPolicyOk returns a tuple with the ReturnPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyProgram) GetReturnPolicyOk() (string, bool) {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ReturnPolicy, true
+}
+
+// HasReturnPolicy returns a boolean if a field has been set.
+func (o *LoyaltyProgram) HasReturnPolicy() bool {
+ if o != nil && o.ReturnPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+func (o *LoyaltyProgram) SetReturnPolicy(v string) {
+ o.ReturnPolicy = &v
+}
+
// GetAccountID returns the AccountID field value
func (o *LoyaltyProgram) GetAccountID() int32 {
if o == nil {
diff --git a/model_loyalty_program_balance.go b/model_loyalty_program_balance.go
index 99ba55cf..c3220a44 100644
--- a/model_loyalty_program_balance.go
+++ b/model_loyalty_program_balance.go
@@ -24,9 +24,9 @@ type LoyaltyProgramBalance struct {
ExpiredBalance float32 `json:"expiredBalance"`
// **DEPRECATED** Value is shown as 0.
SpentBalance float32 `json:"spentBalance"`
- // Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied.
+ // The tentative points balance, reflecting the `currentBalance` and all point additions and deductions within the current open customer session. When the session is closed, the effects are applied and the `currentBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
TentativeCurrentBalance float32 `json:"tentativeCurrentBalance"`
- // Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied.
+ // The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
TentativePendingBalance *float32 `json:"tentativePendingBalance,omitempty"`
}
diff --git a/model_loyalty_program_entity.go b/model_loyalty_program_entity.go
index ba1bacff..d64dcafd 100644
--- a/model_loyalty_program_entity.go
+++ b/model_loyalty_program_entity.go
@@ -18,6 +18,10 @@ import (
type LoyaltyProgramEntity struct {
// The ID of the loyalty program that owns this entity.
ProgramID int32 `json:"programID"`
+ // The integration name of the loyalty program that owns this entity.
+ ProgramName *string `json:"programName,omitempty"`
+ // The Campaign Manager-displayed name of the loyalty program that owns this entity.
+ ProgramTitle *string `json:"programTitle,omitempty"`
}
// GetProgramID returns the ProgramID field value
@@ -35,6 +39,72 @@ func (o *LoyaltyProgramEntity) SetProgramID(v int32) {
o.ProgramID = v
}
+// GetProgramName returns the ProgramName field value if set, zero value otherwise.
+func (o *LoyaltyProgramEntity) GetProgramName() string {
+ if o == nil || o.ProgramName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ProgramName
+}
+
+// GetProgramNameOk returns a tuple with the ProgramName field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyProgramEntity) GetProgramNameOk() (string, bool) {
+ if o == nil || o.ProgramName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ProgramName, true
+}
+
+// HasProgramName returns a boolean if a field has been set.
+func (o *LoyaltyProgramEntity) HasProgramName() bool {
+ if o != nil && o.ProgramName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProgramName gets a reference to the given string and assigns it to the ProgramName field.
+func (o *LoyaltyProgramEntity) SetProgramName(v string) {
+ o.ProgramName = &v
+}
+
+// GetProgramTitle returns the ProgramTitle field value if set, zero value otherwise.
+func (o *LoyaltyProgramEntity) GetProgramTitle() string {
+ if o == nil || o.ProgramTitle == nil {
+ var ret string
+ return ret
+ }
+ return *o.ProgramTitle
+}
+
+// GetProgramTitleOk returns a tuple with the ProgramTitle field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyProgramEntity) GetProgramTitleOk() (string, bool) {
+ if o == nil || o.ProgramTitle == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ProgramTitle, true
+}
+
+// HasProgramTitle returns a boolean if a field has been set.
+func (o *LoyaltyProgramEntity) HasProgramTitle() bool {
+ if o != nil && o.ProgramTitle != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProgramTitle gets a reference to the given string and assigns it to the ProgramTitle field.
+func (o *LoyaltyProgramEntity) SetProgramTitle(v string) {
+ o.ProgramTitle = &v
+}
+
type NullableLoyaltyProgramEntity struct {
Value LoyaltyProgramEntity
ExplicitNull bool
diff --git a/model_loyalty_tier.go b/model_loyalty_tier.go
index 65029570..8be22e95 100644
--- a/model_loyalty_tier.go
+++ b/model_loyalty_tier.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// LoyaltyTier
+// LoyaltyTier A tier in a loyalty program.
type LoyaltyTier struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -23,9 +23,13 @@ type LoyaltyTier struct {
Created time.Time `json:"created"`
// The ID of the loyalty program that owns this entity.
ProgramID int32 `json:"programID"`
- // The name of the tier
+ // The integration name of the loyalty program that owns this entity.
+ ProgramName *string `json:"programName,omitempty"`
+ // The Campaign Manager-displayed name of the loyalty program that owns this entity.
+ ProgramTitle *string `json:"programTitle,omitempty"`
+ // The name of the tier.
Name string `json:"name"`
- // The minimum amount of points required to be eligible for the tier.
+ // The minimum amount of points required to enter the tier.
MinPoints float32 `json:"minPoints"`
}
@@ -74,6 +78,72 @@ func (o *LoyaltyTier) SetProgramID(v int32) {
o.ProgramID = v
}
+// GetProgramName returns the ProgramName field value if set, zero value otherwise.
+func (o *LoyaltyTier) GetProgramName() string {
+ if o == nil || o.ProgramName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ProgramName
+}
+
+// GetProgramNameOk returns a tuple with the ProgramName field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyTier) GetProgramNameOk() (string, bool) {
+ if o == nil || o.ProgramName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ProgramName, true
+}
+
+// HasProgramName returns a boolean if a field has been set.
+func (o *LoyaltyTier) HasProgramName() bool {
+ if o != nil && o.ProgramName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProgramName gets a reference to the given string and assigns it to the ProgramName field.
+func (o *LoyaltyTier) SetProgramName(v string) {
+ o.ProgramName = &v
+}
+
+// GetProgramTitle returns the ProgramTitle field value if set, zero value otherwise.
+func (o *LoyaltyTier) GetProgramTitle() string {
+ if o == nil || o.ProgramTitle == nil {
+ var ret string
+ return ret
+ }
+ return *o.ProgramTitle
+}
+
+// GetProgramTitleOk returns a tuple with the ProgramTitle field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *LoyaltyTier) GetProgramTitleOk() (string, bool) {
+ if o == nil || o.ProgramTitle == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ProgramTitle, true
+}
+
+// HasProgramTitle returns a boolean if a field has been set.
+func (o *LoyaltyTier) HasProgramTitle() bool {
+ if o != nil && o.ProgramTitle != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProgramTitle gets a reference to the given string and assigns it to the ProgramTitle field.
+func (o *LoyaltyTier) SetProgramTitle(v string) {
+ o.ProgramTitle = &v
+}
+
// GetName returns the Name field value
func (o *LoyaltyTier) GetName() string {
if o == nil {
diff --git a/model_management_key.go b/model_management_key.go
index 6800e5f8..bd366682 100644
--- a/model_management_key.go
+++ b/model_management_key.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// ManagementKey
+// ManagementKey struct for ManagementKey
type ManagementKey struct {
// Name for management key.
Name string `json:"name"`
diff --git a/model_message_log_entry.go b/model_message_log_entry.go
index 52276ed9..2ce30c65 100644
--- a/model_message_log_entry.go
+++ b/model_message_log_entry.go
@@ -26,17 +26,25 @@ type MessageLogEntry struct {
// ID of the notification.
NotificationId *int32 `json:"notificationId,omitempty"`
// The name of the notification.
- NotificationName *string `json:"notificationName,omitempty"`
- Request *MessageLogRequest `json:"request,omitempty"`
- Response *MessageLogResponse `json:"response,omitempty"`
+ NotificationName *string `json:"notificationName,omitempty"`
+ // ID of the webhook.
+ WebhookId *int32 `json:"webhookId,omitempty"`
+ // The name of the webhook.
+ WebhookName *string `json:"webhookName,omitempty"`
+ Request *MessageLogRequest `json:"request,omitempty"`
+ Response *MessageLogResponse `json:"response,omitempty"`
// Timestamp when the log entry was created.
CreatedAt time.Time `json:"createdAt"`
- // The entity type the notification is related to.
- EntityType *string `json:"entityType,omitempty"`
+ // The entity type the log is related to.
+ EntityType string `json:"entityType"`
+ // The target URL of the request.
+ Url *string `json:"url,omitempty"`
// Identifier of the Application.
ApplicationId *int32 `json:"applicationId,omitempty"`
// Identifier of the loyalty program.
LoyaltyProgramId *int32 `json:"loyaltyProgramId,omitempty"`
+ // Identifier of the campaign.
+ CampaignId *int32 `json:"campaignId,omitempty"`
}
// GetId returns the Id field value
@@ -168,6 +176,72 @@ func (o *MessageLogEntry) SetNotificationName(v string) {
o.NotificationName = &v
}
+// GetWebhookId returns the WebhookId field value if set, zero value otherwise.
+func (o *MessageLogEntry) GetWebhookId() int32 {
+ if o == nil || o.WebhookId == nil {
+ var ret int32
+ return ret
+ }
+ return *o.WebhookId
+}
+
+// GetWebhookIdOk returns a tuple with the WebhookId field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MessageLogEntry) GetWebhookIdOk() (int32, bool) {
+ if o == nil || o.WebhookId == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.WebhookId, true
+}
+
+// HasWebhookId returns a boolean if a field has been set.
+func (o *MessageLogEntry) HasWebhookId() bool {
+ if o != nil && o.WebhookId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetWebhookId gets a reference to the given int32 and assigns it to the WebhookId field.
+func (o *MessageLogEntry) SetWebhookId(v int32) {
+ o.WebhookId = &v
+}
+
+// GetWebhookName returns the WebhookName field value if set, zero value otherwise.
+func (o *MessageLogEntry) GetWebhookName() string {
+ if o == nil || o.WebhookName == nil {
+ var ret string
+ return ret
+ }
+ return *o.WebhookName
+}
+
+// GetWebhookNameOk returns a tuple with the WebhookName field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MessageLogEntry) GetWebhookNameOk() (string, bool) {
+ if o == nil || o.WebhookName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.WebhookName, true
+}
+
+// HasWebhookName returns a boolean if a field has been set.
+func (o *MessageLogEntry) HasWebhookName() bool {
+ if o != nil && o.WebhookName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetWebhookName gets a reference to the given string and assigns it to the WebhookName field.
+func (o *MessageLogEntry) SetWebhookName(v string) {
+ o.WebhookName = &v
+}
+
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *MessageLogEntry) GetRequest() MessageLogRequest {
if o == nil || o.Request == nil {
@@ -249,37 +323,52 @@ func (o *MessageLogEntry) SetCreatedAt(v time.Time) {
o.CreatedAt = v
}
-// GetEntityType returns the EntityType field value if set, zero value otherwise.
+// GetEntityType returns the EntityType field value
func (o *MessageLogEntry) GetEntityType() string {
- if o == nil || o.EntityType == nil {
+ if o == nil {
var ret string
return ret
}
- return *o.EntityType
+
+ return o.EntityType
+}
+
+// SetEntityType sets field value
+func (o *MessageLogEntry) SetEntityType(v string) {
+ o.EntityType = v
}
-// GetEntityTypeOk returns a tuple with the EntityType field value if set, zero value otherwise
+// GetUrl returns the Url field value if set, zero value otherwise.
+func (o *MessageLogEntry) GetUrl() string {
+ if o == nil || o.Url == nil {
+ var ret string
+ return ret
+ }
+ return *o.Url
+}
+
+// GetUrlOk returns a tuple with the Url field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *MessageLogEntry) GetEntityTypeOk() (string, bool) {
- if o == nil || o.EntityType == nil {
+func (o *MessageLogEntry) GetUrlOk() (string, bool) {
+ if o == nil || o.Url == nil {
var ret string
return ret, false
}
- return *o.EntityType, true
+ return *o.Url, true
}
-// HasEntityType returns a boolean if a field has been set.
-func (o *MessageLogEntry) HasEntityType() bool {
- if o != nil && o.EntityType != nil {
+// HasUrl returns a boolean if a field has been set.
+func (o *MessageLogEntry) HasUrl() bool {
+ if o != nil && o.Url != nil {
return true
}
return false
}
-// SetEntityType gets a reference to the given string and assigns it to the EntityType field.
-func (o *MessageLogEntry) SetEntityType(v string) {
- o.EntityType = &v
+// SetUrl gets a reference to the given string and assigns it to the Url field.
+func (o *MessageLogEntry) SetUrl(v string) {
+ o.Url = &v
}
// GetApplicationId returns the ApplicationId field value if set, zero value otherwise.
@@ -348,6 +437,39 @@ func (o *MessageLogEntry) SetLoyaltyProgramId(v int32) {
o.LoyaltyProgramId = &v
}
+// GetCampaignId returns the CampaignId field value if set, zero value otherwise.
+func (o *MessageLogEntry) GetCampaignId() int32 {
+ if o == nil || o.CampaignId == nil {
+ var ret int32
+ return ret
+ }
+ return *o.CampaignId
+}
+
+// GetCampaignIdOk returns a tuple with the CampaignId field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MessageLogEntry) GetCampaignIdOk() (int32, bool) {
+ if o == nil || o.CampaignId == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.CampaignId, true
+}
+
+// HasCampaignId returns a boolean if a field has been set.
+func (o *MessageLogEntry) HasCampaignId() bool {
+ if o != nil && o.CampaignId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field.
+func (o *MessageLogEntry) SetCampaignId(v int32) {
+ o.CampaignId = &v
+}
+
type NullableMessageLogEntry struct {
Value MessageLogEntry
ExplicitNull bool
diff --git a/model_multiple_audiences_item.go b/model_multiple_audiences_item.go
index b4b2a0fe..d0c9ee60 100644
--- a/model_multiple_audiences_item.go
+++ b/model_multiple_audiences_item.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// MultipleAudiencesItem
+// MultipleAudiencesItem struct for MultipleAudiencesItem
type MultipleAudiencesItem struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_multiple_customer_profile_integration_request_item.go b/model_multiple_customer_profile_integration_request_item.go
index dd7d5b89..ce65d96e 100644
--- a/model_multiple_customer_profile_integration_request_item.go
+++ b/model_multiple_customer_profile_integration_request_item.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// MultipleCustomerProfileIntegrationRequestItem
+// MultipleCustomerProfileIntegrationRequestItem The body of a V2 integration API request (customer profile update). Next to the customer profile details, this contains an optional listing of extra properties that should be returned in the response.
type MultipleCustomerProfileIntegrationRequestItem struct {
// Arbitrary properties associated with this item.
Attributes *map[string]interface{} `json:"attributes,omitempty"`
diff --git a/model_new_account_sign_up.go b/model_new_account_sign_up.go
index 2de01d88..c67a43f9 100644
--- a/model_new_account_sign_up.go
+++ b/model_new_account_sign_up.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewAccountSignUp
+// NewAccountSignUp struct for NewAccountSignUp
type NewAccountSignUp struct {
// The email address associated with the user profile.
Email string `json:"email"`
diff --git a/model_new_additional_cost.go b/model_new_additional_cost.go
index 90b0e6a4..ea61c1a0 100644
--- a/model_new_additional_cost.go
+++ b/model_new_additional_cost.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewAdditionalCost
+// NewAdditionalCost struct for NewAdditionalCost
type NewAdditionalCost struct {
// The internal name used in API requests.
Name string `json:"name"`
diff --git a/model_new_application_api_key.go b/model_new_application_api_key.go
index bedc8402..46086330 100644
--- a/model_new_application_api_key.go
+++ b/model_new_application_api_key.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewApplicationApiKey
+// NewApplicationApiKey struct for NewApplicationApiKey
type NewApplicationApiKey struct {
// Title of the API key.
Title string `json:"title"`
diff --git a/model_new_application_cif_expression.go b/model_new_application_cif_expression.go
index 546502c3..1c48dd68 100644
--- a/model_new_application_cif_expression.go
+++ b/model_new_application_cif_expression.go
@@ -21,7 +21,7 @@ type NewApplicationCifExpression struct {
// The ID of the user who created the Application cart item filter.
CreatedBy *int32 `json:"createdBy,omitempty"`
// Arbitrary additional JSON data associated with the Application cart item filter.
- Expression []interface{} `json:"expression,omitempty"`
+ Expression *[]map[string]interface{} `json:"expression,omitempty"`
}
// GetCartItemFilterId returns the CartItemFilterId field value if set, zero value otherwise.
@@ -91,22 +91,22 @@ func (o *NewApplicationCifExpression) SetCreatedBy(v int32) {
}
// GetExpression returns the Expression field value if set, zero value otherwise.
-func (o *NewApplicationCifExpression) GetExpression() []interface{} {
+func (o *NewApplicationCifExpression) GetExpression() []map[string]interface{} {
if o == nil || o.Expression == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
- return o.Expression
+ return *o.Expression
}
// GetExpressionOk returns a tuple with the Expression field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *NewApplicationCifExpression) GetExpressionOk() ([]interface{}, bool) {
+func (o *NewApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool) {
if o == nil || o.Expression == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret, false
}
- return o.Expression, true
+ return *o.Expression, true
}
// HasExpression returns a boolean if a field has been set.
@@ -118,9 +118,9 @@ func (o *NewApplicationCifExpression) HasExpression() bool {
return false
}
-// SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
-func (o *NewApplicationCifExpression) SetExpression(v []interface{}) {
- o.Expression = v
+// SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
+func (o *NewApplicationCifExpression) SetExpression(v []map[string]interface{}) {
+ o.Expression = &v
}
type NullableNewApplicationCifExpression struct {
diff --git a/model_new_attribute.go b/model_new_attribute.go
index 293664f5..9a5ca874 100644
--- a/model_new_attribute.go
+++ b/model_new_attribute.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewAttribute
+// NewAttribute struct for NewAttribute
type NewAttribute struct {
// The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.
Entity string `json:"entity"`
diff --git a/model_new_audience.go b/model_new_audience.go
index 93e182da..88b4a6a9 100644
--- a/model_new_audience.go
+++ b/model_new_audience.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewAudience
+// NewAudience struct for NewAudience
type NewAudience struct {
// The human-friendly display name for this audience.
Name string `json:"name"`
diff --git a/model_new_base_notification.go b/model_new_base_notification.go
index 9315200c..ae031e13 100644
--- a/model_new_base_notification.go
+++ b/model_new_base_notification.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewBaseNotification
+// NewBaseNotification struct for NewBaseNotification
type NewBaseNotification struct {
// Indicates which notification properties to apply.
Policy map[string]interface{} `json:"policy"`
diff --git a/model_new_campaign.go b/model_new_campaign.go
index f803e7fc..da447c44 100644
--- a/model_new_campaign.go
+++ b/model_new_campaign.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewCampaign
+// NewCampaign struct for NewCampaign
type NewCampaign struct {
// A user-facing name for this campaign.
Name string `json:"name"`
diff --git a/model_new_campaign_collection.go b/model_new_campaign_collection.go
index 2ec29676..ad3104e8 100644
--- a/model_new_campaign_collection.go
+++ b/model_new_campaign_collection.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewCampaignCollection
+// NewCampaignCollection struct for NewCampaignCollection
type NewCampaignCollection struct {
// A short description of the purpose of this collection.
Description *string `json:"description,omitempty"`
diff --git a/model_new_campaign_set.go b/model_new_campaign_set.go
index d21bc6c1..83a5e312 100644
--- a/model_new_campaign_set.go
+++ b/model_new_campaign_set.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewCampaignSet
+// NewCampaignSet struct for NewCampaignSet
type NewCampaignSet struct {
// The ID of the application that owns this entity.
ApplicationId int32 `json:"applicationId"`
diff --git a/model_new_campaign_store_budget.go b/model_new_campaign_store_budget.go
new file mode 100644
index 00000000..28319a75
--- /dev/null
+++ b/model_new_campaign_store_budget.go
@@ -0,0 +1,109 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// NewCampaignStoreBudget struct for NewCampaignStoreBudget
+type NewCampaignStoreBudget struct {
+ Action string `json:"action"`
+ // The set of budget limits for stores linked to the campaign.
+ StoreLimits []NewCampaignStoreBudgetStoreLimit `json:"storeLimits"`
+ Period *string `json:"period,omitempty"`
+}
+
+// GetAction returns the Action field value
+func (o *NewCampaignStoreBudget) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// SetAction sets field value
+func (o *NewCampaignStoreBudget) SetAction(v string) {
+ o.Action = v
+}
+
+// GetStoreLimits returns the StoreLimits field value
+func (o *NewCampaignStoreBudget) GetStoreLimits() []NewCampaignStoreBudgetStoreLimit {
+ if o == nil {
+ var ret []NewCampaignStoreBudgetStoreLimit
+ return ret
+ }
+
+ return o.StoreLimits
+}
+
+// SetStoreLimits sets field value
+func (o *NewCampaignStoreBudget) SetStoreLimits(v []NewCampaignStoreBudgetStoreLimit) {
+ o.StoreLimits = v
+}
+
+// GetPeriod returns the Period field value if set, zero value otherwise.
+func (o *NewCampaignStoreBudget) GetPeriod() string {
+ if o == nil || o.Period == nil {
+ var ret string
+ return ret
+ }
+ return *o.Period
+}
+
+// GetPeriodOk returns a tuple with the Period field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *NewCampaignStoreBudget) GetPeriodOk() (string, bool) {
+ if o == nil || o.Period == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Period, true
+}
+
+// HasPeriod returns a boolean if a field has been set.
+func (o *NewCampaignStoreBudget) HasPeriod() bool {
+ if o != nil && o.Period != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPeriod gets a reference to the given string and assigns it to the Period field.
+func (o *NewCampaignStoreBudget) SetPeriod(v string) {
+ o.Period = &v
+}
+
+type NullableNewCampaignStoreBudget struct {
+ Value NewCampaignStoreBudget
+ ExplicitNull bool
+}
+
+func (v NullableNewCampaignStoreBudget) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableNewCampaignStoreBudget) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_inline_response_200_47.go b/model_new_campaign_store_budget_store_limit.go
similarity index 52%
rename from model_inline_response_200_47.go
rename to model_new_campaign_store_budget_store_limit.go
index 0a84501b..311833a7 100644
--- a/model_inline_response_200_47.go
+++ b/model_new_campaign_store_budget_store_limit.go
@@ -14,48 +14,50 @@ import (
"encoding/json"
)
-// InlineResponse20047 struct for InlineResponse20047
-type InlineResponse20047 struct {
- HasMore bool `json:"hasMore"`
- Data []AchievementProgress `json:"data"`
+// NewCampaignStoreBudgetStoreLimit struct for NewCampaignStoreBudgetStoreLimit
+type NewCampaignStoreBudgetStoreLimit struct {
+ // The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.
+ StoreId int32 `json:"storeId"`
+ // The value to set for the limit.
+ Limit float32 `json:"limit"`
}
-// GetHasMore returns the HasMore field value
-func (o *InlineResponse20047) GetHasMore() bool {
+// GetStoreId returns the StoreId field value
+func (o *NewCampaignStoreBudgetStoreLimit) GetStoreId() int32 {
if o == nil {
- var ret bool
+ var ret int32
return ret
}
- return o.HasMore
+ return o.StoreId
}
-// SetHasMore sets field value
-func (o *InlineResponse20047) SetHasMore(v bool) {
- o.HasMore = v
+// SetStoreId sets field value
+func (o *NewCampaignStoreBudgetStoreLimit) SetStoreId(v int32) {
+ o.StoreId = v
}
-// GetData returns the Data field value
-func (o *InlineResponse20047) GetData() []AchievementProgress {
+// GetLimit returns the Limit field value
+func (o *NewCampaignStoreBudgetStoreLimit) GetLimit() float32 {
if o == nil {
- var ret []AchievementProgress
+ var ret float32
return ret
}
- return o.Data
+ return o.Limit
}
-// SetData sets field value
-func (o *InlineResponse20047) SetData(v []AchievementProgress) {
- o.Data = v
+// SetLimit sets field value
+func (o *NewCampaignStoreBudgetStoreLimit) SetLimit(v float32) {
+ o.Limit = v
}
-type NullableInlineResponse20047 struct {
- Value InlineResponse20047
+type NullableNewCampaignStoreBudgetStoreLimit struct {
+ Value NewCampaignStoreBudgetStoreLimit
ExplicitNull bool
}
-func (v NullableInlineResponse20047) MarshalJSON() ([]byte, error) {
+func (v NullableNewCampaignStoreBudgetStoreLimit) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
@@ -64,7 +66,7 @@ func (v NullableInlineResponse20047) MarshalJSON() ([]byte, error) {
}
}
-func (v *NullableInlineResponse20047) UnmarshalJSON(src []byte) error {
+func (v *NullableNewCampaignStoreBudgetStoreLimit) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
diff --git a/model_new_campaign_template.go b/model_new_campaign_template.go
index e800dc63..6e3a9aed 100644
--- a/model_new_campaign_template.go
+++ b/model_new_campaign_template.go
@@ -31,9 +31,10 @@ type NewCampaignTemplate struct {
// A list of tags for the campaign template.
Tags *[]string `json:"tags,omitempty"`
// A list of features for the campaign template.
- Features *[]string `json:"features,omitempty"`
- CouponSettings *CodeGeneratorSettings `json:"couponSettings,omitempty"`
- ReferralSettings *CodeGeneratorSettings `json:"referralSettings,omitempty"`
+ Features *[]string `json:"features,omitempty"`
+ CouponSettings *CodeGeneratorSettings `json:"couponSettings,omitempty"`
+ CouponReservationSettings *CampaignTemplateCouponReservationSettings `json:"couponReservationSettings,omitempty"`
+ ReferralSettings *CodeGeneratorSettings `json:"referralSettings,omitempty"`
// The set of limits that will operate for this campaign template.
Limits *[]TemplateLimitConfig `json:"limits,omitempty"`
// Fields which can be used to replace values in a rule.
@@ -271,6 +272,39 @@ func (o *NewCampaignTemplate) SetCouponSettings(v CodeGeneratorSettings) {
o.CouponSettings = &v
}
+// GetCouponReservationSettings returns the CouponReservationSettings field value if set, zero value otherwise.
+func (o *NewCampaignTemplate) GetCouponReservationSettings() CampaignTemplateCouponReservationSettings {
+ if o == nil || o.CouponReservationSettings == nil {
+ var ret CampaignTemplateCouponReservationSettings
+ return ret
+ }
+ return *o.CouponReservationSettings
+}
+
+// GetCouponReservationSettingsOk returns a tuple with the CouponReservationSettings field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *NewCampaignTemplate) GetCouponReservationSettingsOk() (CampaignTemplateCouponReservationSettings, bool) {
+ if o == nil || o.CouponReservationSettings == nil {
+ var ret CampaignTemplateCouponReservationSettings
+ return ret, false
+ }
+ return *o.CouponReservationSettings, true
+}
+
+// HasCouponReservationSettings returns a boolean if a field has been set.
+func (o *NewCampaignTemplate) HasCouponReservationSettings() bool {
+ if o != nil && o.CouponReservationSettings != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCouponReservationSettings gets a reference to the given CampaignTemplateCouponReservationSettings and assigns it to the CouponReservationSettings field.
+func (o *NewCampaignTemplate) SetCouponReservationSettings(v CampaignTemplateCouponReservationSettings) {
+ o.CouponReservationSettings = &v
+}
+
// GetReferralSettings returns the ReferralSettings field value if set, zero value otherwise.
func (o *NewCampaignTemplate) GetReferralSettings() CodeGeneratorSettings {
if o == nil || o.ReferralSettings == nil {
diff --git a/model_new_catalog.go b/model_new_catalog.go
index 751ce584..705da069 100644
--- a/model_new_catalog.go
+++ b/model_new_catalog.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewCatalog
+// NewCatalog struct for NewCatalog
type NewCatalog struct {
// The cart item catalog name.
Name string `json:"name"`
diff --git a/model_new_collection.go b/model_new_collection.go
index a900ee01..3a60da05 100644
--- a/model_new_collection.go
+++ b/model_new_collection.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewCollection
+// NewCollection struct for NewCollection
type NewCollection struct {
// A short description of the purpose of this collection.
Description *string `json:"description,omitempty"`
diff --git a/model_new_coupon_creation_job.go b/model_new_coupon_creation_job.go
index 90271d0b..4fd456f2 100644
--- a/model_new_coupon_creation_job.go
+++ b/model_new_coupon_creation_job.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewCouponCreationJob
+// NewCouponCreationJob struct for NewCouponCreationJob
type NewCouponCreationJob struct {
// The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
UsageLimit int32 `json:"usageLimit"`
diff --git a/model_new_coupons.go b/model_new_coupons.go
index 3ef05b15..04670608 100644
--- a/model_new_coupons.go
+++ b/model_new_coupons.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewCoupons
+// NewCoupons struct for NewCoupons
type NewCoupons struct {
// The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
UsageLimit int32 `json:"usageLimit"`
diff --git a/model_new_coupons_for_multiple_recipients.go b/model_new_coupons_for_multiple_recipients.go
index 9cde04ea..7cb4236c 100644
--- a/model_new_coupons_for_multiple_recipients.go
+++ b/model_new_coupons_for_multiple_recipients.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewCouponsForMultipleRecipients
+// NewCouponsForMultipleRecipients struct for NewCouponsForMultipleRecipients
type NewCouponsForMultipleRecipients struct {
// The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
UsageLimit int32 `json:"usageLimit"`
diff --git a/model_new_custom_effect.go b/model_new_custom_effect.go
index f07b7109..7036d597 100644
--- a/model_new_custom_effect.go
+++ b/model_new_custom_effect.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewCustomEffect
+// NewCustomEffect struct for NewCustomEffect
type NewCustomEffect struct {
// The IDs of the Applications that are related to this entity.
ApplicationIds []int32 `json:"applicationIds"`
diff --git a/model_new_customer_session.go b/model_new_customer_session.go
index 11703c3a..36c82f58 100644
--- a/model_new_customer_session.go
+++ b/model_new_customer_session.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewCustomerSession
+// NewCustomerSession struct for NewCustomerSession
type NewCustomerSession struct {
// ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
ProfileId *string `json:"profileId,omitempty"`
diff --git a/model_new_customer_session_v2.go b/model_new_customer_session_v2.go
index b37d2934..c5cca4e9 100644
--- a/model_new_customer_session_v2.go
+++ b/model_new_customer_session_v2.go
@@ -22,9 +22,9 @@ type NewCustomerSessionV2 struct {
StoreIntegrationId *string `json:"storeIntegrationId,omitempty"`
// When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them.
EvaluableCampaignIds *[]int32 `json:"evaluableCampaignIds,omitempty"`
- // Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely.
+ // Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, omit the parameter entirely.
CouponCodes *[]string `json:"couponCodes,omitempty"`
- // Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely.
+ // Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, omit the parameter entirely.
ReferralCode *string `json:"referralCode,omitempty"`
// Identifier of a loyalty card.
LoyaltyCards *[]string `json:"loyaltyCards,omitempty"`
@@ -34,7 +34,7 @@ type NewCustomerSessionV2 struct {
CartItems *[]CartItem `json:"cartItems,omitempty"`
// Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
AdditionalCosts *map[string]AdditionalCost `json:"additionalCosts,omitempty"`
- // Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
+ // Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). - We recommend passing an anonymized (hashed) version of the identifier value.
Identifiers *[]string `json:"identifiers,omitempty"`
// Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property.
Attributes *map[string]interface{} `json:"attributes,omitempty"`
diff --git a/model_new_event.go b/model_new_event.go
index dc69a043..4ee4e4e1 100644
--- a/model_new_event.go
+++ b/model_new_event.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewEvent
+// NewEvent struct for NewEvent
type NewEvent struct {
// ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
ProfileId *string `json:"profileId,omitempty"`
diff --git a/model_new_event_type.go b/model_new_event_type.go
index b402b5ee..66efceff 100644
--- a/model_new_event_type.go
+++ b/model_new_event_type.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewEventType
+// NewEventType struct for NewEventType
type NewEventType struct {
// The human-friendly name for this event type.
Title string `json:"title"`
diff --git a/model_new_loyalty_program.go b/model_new_loyalty_program.go
index 363ee457..9fabc10f 100644
--- a/model_new_loyalty_program.go
+++ b/model_new_loyalty_program.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewLoyaltyProgram
+// NewLoyaltyProgram A new loyalty program
type NewLoyaltyProgram struct {
// The display title for the Loyalty Program.
Title string `json:"title"`
@@ -44,6 +44,8 @@ type NewLoyaltyProgram struct {
// The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment.
TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"`
CardCodeSettings *CodeGeneratorSettings `json:"cardCodeSettings,omitempty"`
+ // The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ ReturnPolicy *string `json:"returnPolicy,omitempty"`
// The internal name for the Loyalty Program. This is an immutable value.
Name string `json:"name"`
// The tiers in this loyalty program.
@@ -426,6 +428,39 @@ func (o *NewLoyaltyProgram) SetCardCodeSettings(v CodeGeneratorSettings) {
o.CardCodeSettings = &v
}
+// GetReturnPolicy returns the ReturnPolicy field value if set, zero value otherwise.
+func (o *NewLoyaltyProgram) GetReturnPolicy() string {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnPolicy
+}
+
+// GetReturnPolicyOk returns a tuple with the ReturnPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *NewLoyaltyProgram) GetReturnPolicyOk() (string, bool) {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ReturnPolicy, true
+}
+
+// HasReturnPolicy returns a boolean if a field has been set.
+func (o *NewLoyaltyProgram) HasReturnPolicy() bool {
+ if o != nil && o.ReturnPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+func (o *NewLoyaltyProgram) SetReturnPolicy(v string) {
+ o.ReturnPolicy = &v
+}
+
// GetName returns the Name field value
func (o *NewLoyaltyProgram) GetName() string {
if o == nil {
diff --git a/model_new_loyalty_tier.go b/model_new_loyalty_tier.go
index 71237106..f3b9ff94 100644
--- a/model_new_loyalty_tier.go
+++ b/model_new_loyalty_tier.go
@@ -16,9 +16,9 @@ import (
// NewLoyaltyTier A tier in a loyalty program.
type NewLoyaltyTier struct {
- // The name of the tier
+ // The name of the tier.
Name string `json:"name"`
- // The minimum amount of points required to be eligible for the tier.
+ // The minimum amount of points required to enter the tier.
MinPoints float32 `json:"minPoints"`
}
diff --git a/model_new_management_key.go b/model_new_management_key.go
index eff5769b..fc70c996 100644
--- a/model_new_management_key.go
+++ b/model_new_management_key.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewManagementKey
+// NewManagementKey struct for NewManagementKey
type NewManagementKey struct {
// Name for management key.
Name string `json:"name"`
diff --git a/model_new_multiple_audiences_item.go b/model_new_multiple_audiences_item.go
index 56138629..45a95f11 100644
--- a/model_new_multiple_audiences_item.go
+++ b/model_new_multiple_audiences_item.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewMultipleAudiencesItem
+// NewMultipleAudiencesItem struct for NewMultipleAudiencesItem
type NewMultipleAudiencesItem struct {
// The human-friendly display name for this audience.
Name string `json:"name"`
diff --git a/model_new_referral.go b/model_new_referral.go
index 2aa00e2c..c7f66208 100644
--- a/model_new_referral.go
+++ b/model_new_referral.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewReferral
+// NewReferral struct for NewReferral
type NewReferral struct {
// Timestamp at which point the referral code becomes valid.
StartDate *time.Time `json:"startDate,omitempty"`
diff --git a/model_new_referrals_for_multiple_advocates.go b/model_new_referrals_for_multiple_advocates.go
index 1e1ca887..9829851e 100644
--- a/model_new_referrals_for_multiple_advocates.go
+++ b/model_new_referrals_for_multiple_advocates.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// NewReferralsForMultipleAdvocates
+// NewReferralsForMultipleAdvocates struct for NewReferralsForMultipleAdvocates
type NewReferralsForMultipleAdvocates struct {
// Timestamp at which point the referral code becomes valid.
StartDate *time.Time `json:"startDate,omitempty"`
diff --git a/model_new_role.go b/model_new_role.go
index 65b0b5ad..a615bdcc 100644
--- a/model_new_role.go
+++ b/model_new_role.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewRole
+// NewRole struct for NewRole
type NewRole struct {
// Name of the role.
Name string `json:"name"`
diff --git a/model_new_role_v2.go b/model_new_role_v2.go
index 329387e0..47c6d4eb 100644
--- a/model_new_role_v2.go
+++ b/model_new_role_v2.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewRoleV2
+// NewRoleV2 struct for NewRoleV2
type NewRoleV2 struct {
// Name of the role.
Name string `json:"name"`
diff --git a/model_new_saml_connection.go b/model_new_saml_connection.go
index f79dff5a..cf062c11 100644
--- a/model_new_saml_connection.go
+++ b/model_new_saml_connection.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewSamlConnection
+// NewSamlConnection A new SAML 2.0 connection.
type NewSamlConnection struct {
// X.509 Certificate.
X509certificate string `json:"x509certificate"`
diff --git a/model_new_store.go b/model_new_store.go
index 475b8113..0989090b 100644
--- a/model_new_store.go
+++ b/model_new_store.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewStore
+// NewStore struct for NewStore
type NewStore struct {
// The name of the store.
Name string `json:"name"`
diff --git a/model_new_template_def.go b/model_new_template_def.go
index bd92bbf0..e33c6a18 100644
--- a/model_new_template_def.go
+++ b/model_new_template_def.go
@@ -25,7 +25,7 @@ type NewTemplateDef struct {
// Used for grouping templates in the rule editor sidebar.
Category string `json:"category"`
// A Talang expression that contains variable bindings referring to args.
- Expr []interface{} `json:"expr"`
+ Expr []map[string]interface{} `json:"expr"`
// An array of argument definitions.
Args []TemplateArgDef `json:"args"`
// A flag to control exposure in Rule Builder.
@@ -129,9 +129,9 @@ func (o *NewTemplateDef) SetCategory(v string) {
}
// GetExpr returns the Expr field value
-func (o *NewTemplateDef) GetExpr() []interface{} {
+func (o *NewTemplateDef) GetExpr() []map[string]interface{} {
if o == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
@@ -139,7 +139,7 @@ func (o *NewTemplateDef) GetExpr() []interface{} {
}
// SetExpr sets field value
-func (o *NewTemplateDef) SetExpr(v []interface{}) {
+func (o *NewTemplateDef) SetExpr(v []map[string]interface{}) {
o.Expr = v
}
diff --git a/model_new_user.go b/model_new_user.go
index b408b0a4..58a62f5c 100644
--- a/model_new_user.go
+++ b/model_new_user.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// NewUser
+// NewUser struct for NewUser
type NewUser struct {
// The email address associated with the user profile.
Email string `json:"email"`
diff --git a/model_new_webhook.go b/model_new_webhook.go
index 1010ffcb..b81794b6 100644
--- a/model_new_webhook.go
+++ b/model_new_webhook.go
@@ -14,9 +14,9 @@ import (
"encoding/json"
)
-// NewWebhook
+// NewWebhook struct for NewWebhook
type NewWebhook struct {
- // The IDs of the Applications that are related to this entity.
+ // The IDs of the Applications in which this webhook is available. An empty array means the webhook is available in `All Applications`.
ApplicationIds []int32 `json:"applicationIds"`
// Name or title for this webhook.
Title string `json:"title"`
diff --git a/model_outgoing_integration_template_with_configuration_details.go b/model_outgoing_integration_template_with_configuration_details.go
index ba044eb7..b1dd63de 100644
--- a/model_outgoing_integration_template_with_configuration_details.go
+++ b/model_outgoing_integration_template_with_configuration_details.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// OutgoingIntegrationTemplateWithConfigurationDetails
+// OutgoingIntegrationTemplateWithConfigurationDetails struct for OutgoingIntegrationTemplateWithConfigurationDetails
type OutgoingIntegrationTemplateWithConfigurationDetails struct {
// Unique ID for this entity.
Id int32 `json:"id"`
diff --git a/model_picklist.go b/model_picklist.go
index 630f4f2e..e2d89da5 100644
--- a/model_picklist.go
+++ b/model_picklist.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Picklist
+// Picklist struct for Picklist
type Picklist struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_product.go b/model_product.go
index a6c22244..644516c5 100644
--- a/model_product.go
+++ b/model_product.go
@@ -16,7 +16,7 @@ import (
// Product The specific properties of the product this item belongs to, if available.
type Product struct {
- // The name of the product.
+ // The product the item belongs to.
Name string `json:"name"`
}
diff --git a/model_product_search_match.go b/model_product_search_match.go
new file mode 100644
index 00000000..9e98c79c
--- /dev/null
+++ b/model_product_search_match.go
@@ -0,0 +1,111 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// ProductSearchMatch struct for ProductSearchMatch
+type ProductSearchMatch struct {
+ // The ID of the product.
+ ProductId int32 `json:"productId"`
+ // The string matching the given value. Either a product name or SKU.
+ Value string `json:"value"`
+ // The ID of the SKU linked to a product. If empty, this is an analytics-level product.
+ ProductSkuId *int32 `json:"productSkuId,omitempty"`
+}
+
+// GetProductId returns the ProductId field value
+func (o *ProductSearchMatch) GetProductId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.ProductId
+}
+
+// SetProductId sets field value
+func (o *ProductSearchMatch) SetProductId(v int32) {
+ o.ProductId = v
+}
+
+// GetValue returns the Value field value
+func (o *ProductSearchMatch) GetValue() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Value
+}
+
+// SetValue sets field value
+func (o *ProductSearchMatch) SetValue(v string) {
+ o.Value = v
+}
+
+// GetProductSkuId returns the ProductSkuId field value if set, zero value otherwise.
+func (o *ProductSearchMatch) GetProductSkuId() int32 {
+ if o == nil || o.ProductSkuId == nil {
+ var ret int32
+ return ret
+ }
+ return *o.ProductSkuId
+}
+
+// GetProductSkuIdOk returns a tuple with the ProductSkuId field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ProductSearchMatch) GetProductSkuIdOk() (int32, bool) {
+ if o == nil || o.ProductSkuId == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.ProductSkuId, true
+}
+
+// HasProductSkuId returns a boolean if a field has been set.
+func (o *ProductSearchMatch) HasProductSkuId() bool {
+ if o != nil && o.ProductSkuId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProductSkuId gets a reference to the given int32 and assigns it to the ProductSkuId field.
+func (o *ProductSearchMatch) SetProductSkuId(v int32) {
+ o.ProductSkuId = &v
+}
+
+type NullableProductSearchMatch struct {
+ Value ProductSearchMatch
+ ExplicitNull bool
+}
+
+func (v NullableProductSearchMatch) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableProductSearchMatch) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_product_sku_unit_analytics.go b/model_product_sku_unit_analytics.go
new file mode 100644
index 00000000..8f8d3e8a
--- /dev/null
+++ b/model_product_sku_unit_analytics.go
@@ -0,0 +1,110 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+ "time"
+)
+
+// ProductSkuUnitAnalytics struct for ProductSkuUnitAnalytics
+type ProductSkuUnitAnalytics struct {
+ // The start of the aggregation time frame in UTC.
+ StartTime time.Time `json:"startTime"`
+ // The end of the aggregation time frame in UTC.
+ EndTime time.Time `json:"endTime"`
+ PurchasedUnits AnalyticsDataPointWithTrend `json:"purchasedUnits"`
+ // The SKU linked to the analytics-level product.
+ Sku string `json:"sku"`
+}
+
+// GetStartTime returns the StartTime field value
+func (o *ProductSkuUnitAnalytics) GetStartTime() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.StartTime
+}
+
+// SetStartTime sets field value
+func (o *ProductSkuUnitAnalytics) SetStartTime(v time.Time) {
+ o.StartTime = v
+}
+
+// GetEndTime returns the EndTime field value
+func (o *ProductSkuUnitAnalytics) GetEndTime() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.EndTime
+}
+
+// SetEndTime sets field value
+func (o *ProductSkuUnitAnalytics) SetEndTime(v time.Time) {
+ o.EndTime = v
+}
+
+// GetPurchasedUnits returns the PurchasedUnits field value
+func (o *ProductSkuUnitAnalytics) GetPurchasedUnits() AnalyticsDataPointWithTrend {
+ if o == nil {
+ var ret AnalyticsDataPointWithTrend
+ return ret
+ }
+
+ return o.PurchasedUnits
+}
+
+// SetPurchasedUnits sets field value
+func (o *ProductSkuUnitAnalytics) SetPurchasedUnits(v AnalyticsDataPointWithTrend) {
+ o.PurchasedUnits = v
+}
+
+// GetSku returns the Sku field value
+func (o *ProductSkuUnitAnalytics) GetSku() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Sku
+}
+
+// SetSku sets field value
+func (o *ProductSkuUnitAnalytics) SetSku(v string) {
+ o.Sku = v
+}
+
+type NullableProductSkuUnitAnalytics struct {
+ Value ProductSkuUnitAnalytics
+ ExplicitNull bool
+}
+
+func (v NullableProductSkuUnitAnalytics) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableProductSkuUnitAnalytics) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_product_unit_analytics.go b/model_product_unit_analytics.go
new file mode 100644
index 00000000..2c41d660
--- /dev/null
+++ b/model_product_unit_analytics.go
@@ -0,0 +1,127 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+ "time"
+)
+
+// ProductUnitAnalytics struct for ProductUnitAnalytics
+type ProductUnitAnalytics struct {
+ // The start of the aggregation time frame in UTC.
+ StartTime time.Time `json:"startTime"`
+ // The end of the aggregation time frame in UTC.
+ EndTime time.Time `json:"endTime"`
+ PurchasedUnits AnalyticsDataPointWithTrend `json:"purchasedUnits"`
+ // The ID of the analytics-level product.
+ ProductId int32 `json:"productId"`
+ // The name of the analytics-level product.
+ ProductName string `json:"productName"`
+}
+
+// GetStartTime returns the StartTime field value
+func (o *ProductUnitAnalytics) GetStartTime() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.StartTime
+}
+
+// SetStartTime sets field value
+func (o *ProductUnitAnalytics) SetStartTime(v time.Time) {
+ o.StartTime = v
+}
+
+// GetEndTime returns the EndTime field value
+func (o *ProductUnitAnalytics) GetEndTime() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.EndTime
+}
+
+// SetEndTime sets field value
+func (o *ProductUnitAnalytics) SetEndTime(v time.Time) {
+ o.EndTime = v
+}
+
+// GetPurchasedUnits returns the PurchasedUnits field value
+func (o *ProductUnitAnalytics) GetPurchasedUnits() AnalyticsDataPointWithTrend {
+ if o == nil {
+ var ret AnalyticsDataPointWithTrend
+ return ret
+ }
+
+ return o.PurchasedUnits
+}
+
+// SetPurchasedUnits sets field value
+func (o *ProductUnitAnalytics) SetPurchasedUnits(v AnalyticsDataPointWithTrend) {
+ o.PurchasedUnits = v
+}
+
+// GetProductId returns the ProductId field value
+func (o *ProductUnitAnalytics) GetProductId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.ProductId
+}
+
+// SetProductId sets field value
+func (o *ProductUnitAnalytics) SetProductId(v int32) {
+ o.ProductId = v
+}
+
+// GetProductName returns the ProductName field value
+func (o *ProductUnitAnalytics) GetProductName() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ProductName
+}
+
+// SetProductName sets field value
+func (o *ProductUnitAnalytics) SetProductName(v string) {
+ o.ProductName = v
+}
+
+type NullableProductUnitAnalytics struct {
+ Value ProductUnitAnalytics
+ ExplicitNull bool
+}
+
+func (v NullableProductUnitAnalytics) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableProductUnitAnalytics) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_referral.go b/model_referral.go
index 8c861e5f..63e058f0 100644
--- a/model_referral.go
+++ b/model_referral.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Referral
+// Referral struct for Referral
type Referral struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_return.go b/model_return.go
index 6e433f5f..a69bcfe4 100644
--- a/model_return.go
+++ b/model_return.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Return
+// Return struct for Return
type Return struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_revision.go b/model_revision.go
index caec0cd2..d170a0ac 100644
--- a/model_revision.go
+++ b/model_revision.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Revision
+// Revision struct for Revision
type Revision struct {
// Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.
Id int32 `json:"id"`
diff --git a/model_revision_version.go b/model_revision_version.go
index b3932678..64a4dd60 100644
--- a/model_revision_version.go
+++ b/model_revision_version.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// RevisionVersion
+// RevisionVersion struct for RevisionVersion
type RevisionVersion struct {
// Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.
Id int32 `json:"id"`
diff --git a/model_role.go b/model_role.go
index c11627ab..9a6dbc5a 100644
--- a/model_role.go
+++ b/model_role.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Role
+// Role struct for Role
type Role struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_role_assign.go b/model_role_assign.go
index ec917f49..20bb6e2c 100644
--- a/model_role_assign.go
+++ b/model_role_assign.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// RoleAssign
+// RoleAssign struct for RoleAssign
type RoleAssign struct {
// An array of user IDs.
Users []int32 `json:"users"`
diff --git a/model_role_v2.go b/model_role_v2.go
index ab1b7cf1..5a8bb16c 100644
--- a/model_role_v2.go
+++ b/model_role_v2.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// RoleV2
+// RoleV2 struct for RoleV2
type RoleV2 struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_rule.go b/model_rule.go
index e2401b6f..acc8a36d 100644
--- a/model_rule.go
+++ b/model_rule.go
@@ -27,9 +27,9 @@ type Rule struct {
// An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
Bindings *[]Binding `json:"bindings,omitempty"`
// A Talang expression that will be evaluated in the context of the given event.
- Condition []interface{} `json:"condition"`
+ Condition []map[string]interface{} `json:"condition"`
// An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
- Effects [][]interface{} `json:"effects"`
+ Effects []map[string]interface{} `json:"effects"`
}
// GetId returns the Id field value if set, zero value otherwise.
@@ -180,9 +180,9 @@ func (o *Rule) SetBindings(v []Binding) {
}
// GetCondition returns the Condition field value
-func (o *Rule) GetCondition() []interface{} {
+func (o *Rule) GetCondition() []map[string]interface{} {
if o == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
@@ -190,14 +190,14 @@ func (o *Rule) GetCondition() []interface{} {
}
// SetCondition sets field value
-func (o *Rule) SetCondition(v []interface{}) {
+func (o *Rule) SetCondition(v []map[string]interface{}) {
o.Condition = v
}
// GetEffects returns the Effects field value
-func (o *Rule) GetEffects() [][]interface{} {
+func (o *Rule) GetEffects() []map[string]interface{} {
if o == nil {
- var ret [][]interface{}
+ var ret []map[string]interface{}
return ret
}
@@ -205,7 +205,7 @@ func (o *Rule) GetEffects() [][]interface{} {
}
// SetEffects sets field value
-func (o *Rule) SetEffects(v [][]interface{}) {
+func (o *Rule) SetEffects(v []map[string]interface{}) {
o.Effects = v
}
diff --git a/model_ruleset.go b/model_ruleset.go
index e0c7f657..5a712f5d 100644
--- a/model_ruleset.go
+++ b/model_ruleset.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Ruleset
+// Ruleset struct for Ruleset
type Ruleset struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_saml_connection.go b/model_saml_connection.go
index 4bb694fd..05e05b0e 100644
--- a/model_saml_connection.go
+++ b/model_saml_connection.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// SamlConnection
+// SamlConnection A SAML 2.0 connection.
type SamlConnection struct {
// The location where the SAML assertion is sent with a HTTP POST.
AssertionConsumerServiceURL string `json:"assertionConsumerServiceURL"`
diff --git a/model_scim_new_user.go b/model_scim_new_user.go
index fd654366..4cd6fdd3 100644
--- a/model_scim_new_user.go
+++ b/model_scim_new_user.go
@@ -21,7 +21,7 @@ type ScimNewUser struct {
// Display name of the user.
DisplayName *string `json:"displayName,omitempty"`
// Unique identifier of the user. This is usually an email address.
- UserName *string `json:"userName,omitempty"`
+ UserName string `json:"userName"`
Name *ScimBaseUserName `json:"name,omitempty"`
}
@@ -91,37 +91,19 @@ func (o *ScimNewUser) SetDisplayName(v string) {
o.DisplayName = &v
}
-// GetUserName returns the UserName field value if set, zero value otherwise.
+// GetUserName returns the UserName field value
func (o *ScimNewUser) GetUserName() string {
- if o == nil || o.UserName == nil {
+ if o == nil {
var ret string
return ret
}
- return *o.UserName
-}
-// GetUserNameOk returns a tuple with the UserName field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *ScimNewUser) GetUserNameOk() (string, bool) {
- if o == nil || o.UserName == nil {
- var ret string
- return ret, false
- }
- return *o.UserName, true
-}
-
-// HasUserName returns a boolean if a field has been set.
-func (o *ScimNewUser) HasUserName() bool {
- if o != nil && o.UserName != nil {
- return true
- }
-
- return false
+ return o.UserName
}
-// SetUserName gets a reference to the given string and assigns it to the UserName field.
+// SetUserName sets field value
func (o *ScimNewUser) SetUserName(v string) {
- o.UserName = &v
+ o.UserName = v
}
// GetName returns the Name field value if set, zero value otherwise.
diff --git a/model_scim_service_provider_config_response.go b/model_scim_service_provider_config_response.go
index cac8fa6d..5238027c 100644
--- a/model_scim_service_provider_config_response.go
+++ b/model_scim_service_provider_config_response.go
@@ -23,7 +23,8 @@ type ScimServiceProviderConfigResponse struct {
Filter *ScimServiceProviderConfigResponseFilter `json:"filter,omitempty"`
Patch *ScimServiceProviderConfigResponsePatch `json:"patch,omitempty"`
// A list of SCIM schemas that define the structure and data types supported by the service provider.
- Schemas *[]string `json:"schemas,omitempty"`
+ Schemas *[]string `json:"schemas,omitempty"`
+ Sort *ScimServiceProviderConfigResponseSort `json:"sort,omitempty"`
}
// GetBulk returns the Bulk field value if set, zero value otherwise.
@@ -224,6 +225,39 @@ func (o *ScimServiceProviderConfigResponse) SetSchemas(v []string) {
o.Schemas = &v
}
+// GetSort returns the Sort field value if set, zero value otherwise.
+func (o *ScimServiceProviderConfigResponse) GetSort() ScimServiceProviderConfigResponseSort {
+ if o == nil || o.Sort == nil {
+ var ret ScimServiceProviderConfigResponseSort
+ return ret
+ }
+ return *o.Sort
+}
+
+// GetSortOk returns a tuple with the Sort field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ScimServiceProviderConfigResponse) GetSortOk() (ScimServiceProviderConfigResponseSort, bool) {
+ if o == nil || o.Sort == nil {
+ var ret ScimServiceProviderConfigResponseSort
+ return ret, false
+ }
+ return *o.Sort, true
+}
+
+// HasSort returns a boolean if a field has been set.
+func (o *ScimServiceProviderConfigResponse) HasSort() bool {
+ if o != nil && o.Sort != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSort gets a reference to the given ScimServiceProviderConfigResponseSort and assigns it to the Sort field.
+func (o *ScimServiceProviderConfigResponse) SetSort(v ScimServiceProviderConfigResponseSort) {
+ o.Sort = &v
+}
+
type NullableScimServiceProviderConfigResponse struct {
Value ScimServiceProviderConfigResponse
ExplicitNull bool
diff --git a/model_scim_service_provider_config_response_sort.go b/model_scim_service_provider_config_response_sort.go
new file mode 100644
index 00000000..c2aad7b0
--- /dev/null
+++ b/model_scim_service_provider_config_response_sort.go
@@ -0,0 +1,77 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// ScimServiceProviderConfigResponseSort Configuration settings related to sorting SCIM resources in query responses.
+type ScimServiceProviderConfigResponseSort struct {
+ // Indicates whether the service provider supports sorting operations for ordered query results.
+ Supported *bool `json:"supported,omitempty"`
+}
+
+// GetSupported returns the Supported field value if set, zero value otherwise.
+func (o *ScimServiceProviderConfigResponseSort) GetSupported() bool {
+ if o == nil || o.Supported == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Supported
+}
+
+// GetSupportedOk returns a tuple with the Supported field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ScimServiceProviderConfigResponseSort) GetSupportedOk() (bool, bool) {
+ if o == nil || o.Supported == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.Supported, true
+}
+
+// HasSupported returns a boolean if a field has been set.
+func (o *ScimServiceProviderConfigResponseSort) HasSupported() bool {
+ if o != nil && o.Supported != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSupported gets a reference to the given bool and assigns it to the Supported field.
+func (o *ScimServiceProviderConfigResponseSort) SetSupported(v bool) {
+ o.Supported = &v
+}
+
+type NullableScimServiceProviderConfigResponseSort struct {
+ Value ScimServiceProviderConfigResponseSort
+ ExplicitNull bool
+}
+
+func (v NullableScimServiceProviderConfigResponseSort) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableScimServiceProviderConfigResponseSort) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_scim_user.go b/model_scim_user.go
index d4717a55..7185e7b5 100644
--- a/model_scim_user.go
+++ b/model_scim_user.go
@@ -21,7 +21,7 @@ type ScimUser struct {
// Display name of the user.
DisplayName *string `json:"displayName,omitempty"`
// Unique identifier of the user. This is usually an email address.
- UserName *string `json:"userName,omitempty"`
+ UserName string `json:"userName"`
Name *ScimBaseUserName `json:"name,omitempty"`
// ID of the user.
Id string `json:"id"`
@@ -93,37 +93,19 @@ func (o *ScimUser) SetDisplayName(v string) {
o.DisplayName = &v
}
-// GetUserName returns the UserName field value if set, zero value otherwise.
+// GetUserName returns the UserName field value
func (o *ScimUser) GetUserName() string {
- if o == nil || o.UserName == nil {
+ if o == nil {
var ret string
return ret
}
- return *o.UserName
-}
-
-// GetUserNameOk returns a tuple with the UserName field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *ScimUser) GetUserNameOk() (string, bool) {
- if o == nil || o.UserName == nil {
- var ret string
- return ret, false
- }
- return *o.UserName, true
-}
-
-// HasUserName returns a boolean if a field has been set.
-func (o *ScimUser) HasUserName() bool {
- if o != nil && o.UserName != nil {
- return true
- }
- return false
+ return o.UserName
}
-// SetUserName gets a reference to the given string and assigns it to the UserName field.
+// SetUserName sets field value
func (o *ScimUser) SetUserName(v string) {
- o.UserName = &v
+ o.UserName = v
}
// GetName returns the Name field value if set, zero value otherwise.
diff --git a/model_store.go b/model_store.go
index c2df17cf..515bd900 100644
--- a/model_store.go
+++ b/model_store.go
@@ -15,11 +15,11 @@ import (
"time"
)
-// Store
+// Store struct for Store
type Store struct {
// Internal ID of this entity.
Id int32 `json:"id"`
- // The time this entity was created. The time this entity was created.
+ // The time this entity was created.
Created time.Time `json:"created"`
// The name of the store.
Name string `json:"name"`
diff --git a/model_strikethrough_debug_response.go b/model_strikethrough_debug_response.go
new file mode 100644
index 00000000..07b630e5
--- /dev/null
+++ b/model_strikethrough_debug_response.go
@@ -0,0 +1,112 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// StrikethroughDebugResponse struct for StrikethroughDebugResponse
+type StrikethroughDebugResponse struct {
+ // The campaign IDs that got fetched for the evaluation process.
+ CampaignsIDs *[]int32 `json:"campaignsIDs,omitempty"`
+ // The strikethrough effects that are returned from the evaluation process.
+ Effects *[]StrikethroughEffect `json:"effects,omitempty"`
+}
+
+// GetCampaignsIDs returns the CampaignsIDs field value if set, zero value otherwise.
+func (o *StrikethroughDebugResponse) GetCampaignsIDs() []int32 {
+ if o == nil || o.CampaignsIDs == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.CampaignsIDs
+}
+
+// GetCampaignsIDsOk returns a tuple with the CampaignsIDs field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *StrikethroughDebugResponse) GetCampaignsIDsOk() ([]int32, bool) {
+ if o == nil || o.CampaignsIDs == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.CampaignsIDs, true
+}
+
+// HasCampaignsIDs returns a boolean if a field has been set.
+func (o *StrikethroughDebugResponse) HasCampaignsIDs() bool {
+ if o != nil && o.CampaignsIDs != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCampaignsIDs gets a reference to the given []int32 and assigns it to the CampaignsIDs field.
+func (o *StrikethroughDebugResponse) SetCampaignsIDs(v []int32) {
+ o.CampaignsIDs = &v
+}
+
+// GetEffects returns the Effects field value if set, zero value otherwise.
+func (o *StrikethroughDebugResponse) GetEffects() []StrikethroughEffect {
+ if o == nil || o.Effects == nil {
+ var ret []StrikethroughEffect
+ return ret
+ }
+ return *o.Effects
+}
+
+// GetEffectsOk returns a tuple with the Effects field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *StrikethroughDebugResponse) GetEffectsOk() ([]StrikethroughEffect, bool) {
+ if o == nil || o.Effects == nil {
+ var ret []StrikethroughEffect
+ return ret, false
+ }
+ return *o.Effects, true
+}
+
+// HasEffects returns a boolean if a field has been set.
+func (o *StrikethroughDebugResponse) HasEffects() bool {
+ if o != nil && o.Effects != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEffects gets a reference to the given []StrikethroughEffect and assigns it to the Effects field.
+func (o *StrikethroughDebugResponse) SetEffects(v []StrikethroughEffect) {
+ o.Effects = &v
+}
+
+type NullableStrikethroughDebugResponse struct {
+ Value StrikethroughDebugResponse
+ ExplicitNull bool
+}
+
+func (v NullableStrikethroughDebugResponse) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableStrikethroughDebugResponse) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_summary_campaign_store_budget.go b/model_summary_campaign_store_budget.go
new file mode 100644
index 00000000..85fd7ddd
--- /dev/null
+++ b/model_summary_campaign_store_budget.go
@@ -0,0 +1,108 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// SummaryCampaignStoreBudget struct for SummaryCampaignStoreBudget
+type SummaryCampaignStoreBudget struct {
+ Action string `json:"action"`
+ Period *string `json:"period,omitempty"`
+ StoreCount int32 `json:"storeCount"`
+}
+
+// GetAction returns the Action field value
+func (o *SummaryCampaignStoreBudget) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// SetAction sets field value
+func (o *SummaryCampaignStoreBudget) SetAction(v string) {
+ o.Action = v
+}
+
+// GetPeriod returns the Period field value if set, zero value otherwise.
+func (o *SummaryCampaignStoreBudget) GetPeriod() string {
+ if o == nil || o.Period == nil {
+ var ret string
+ return ret
+ }
+ return *o.Period
+}
+
+// GetPeriodOk returns a tuple with the Period field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *SummaryCampaignStoreBudget) GetPeriodOk() (string, bool) {
+ if o == nil || o.Period == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Period, true
+}
+
+// HasPeriod returns a boolean if a field has been set.
+func (o *SummaryCampaignStoreBudget) HasPeriod() bool {
+ if o != nil && o.Period != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPeriod gets a reference to the given string and assigns it to the Period field.
+func (o *SummaryCampaignStoreBudget) SetPeriod(v string) {
+ o.Period = &v
+}
+
+// GetStoreCount returns the StoreCount field value
+func (o *SummaryCampaignStoreBudget) GetStoreCount() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.StoreCount
+}
+
+// SetStoreCount sets field value
+func (o *SummaryCampaignStoreBudget) SetStoreCount(v int32) {
+ o.StoreCount = v
+}
+
+type NullableSummaryCampaignStoreBudget struct {
+ Value SummaryCampaignStoreBudget
+ ExplicitNull bool
+}
+
+func (v NullableSummaryCampaignStoreBudget) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableSummaryCampaignStoreBudget) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_talang_attribute.go b/model_talang_attribute.go
index c477aa32..e7c01081 100644
--- a/model_talang_attribute.go
+++ b/model_talang_attribute.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// TalangAttribute
+// TalangAttribute struct for TalangAttribute
type TalangAttribute struct {
// The name of the entity of the attribute.
Entity *string `json:"entity,omitempty"`
diff --git a/model_template_arg_def.go b/model_template_arg_def.go
index 404d29ea..c32f794b 100644
--- a/model_template_arg_def.go
+++ b/model_template_arg_def.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// TemplateArgDef
+// TemplateArgDef struct for TemplateArgDef
type TemplateArgDef struct {
// The type of value this argument expects.
Type string `json:"type"`
@@ -24,6 +24,8 @@ type TemplateArgDef struct {
Title string `json:"title"`
// Arbitrary metadata that may be used to render an input for this argument.
Ui map[string]interface{} `json:"ui"`
+ // The identifier for the associated value within the JSON object.
+ Key *string `json:"key,omitempty"`
// ID of the picklist linked to a template.
PicklistID *int32 `json:"picklistID,omitempty"`
// Whether or not this attribute's value is restricted by picklist (`picklist` property)
@@ -108,6 +110,39 @@ func (o *TemplateArgDef) SetUi(v map[string]interface{}) {
o.Ui = v
}
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *TemplateArgDef) GetKey() string {
+ if o == nil || o.Key == nil {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TemplateArgDef) GetKeyOk() (string, bool) {
+ if o == nil || o.Key == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *TemplateArgDef) HasKey() bool {
+ if o != nil && o.Key != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *TemplateArgDef) SetKey(v string) {
+ o.Key = &v
+}
+
// GetPicklistID returns the PicklistID field value if set, zero value otherwise.
func (o *TemplateArgDef) GetPicklistID() int32 {
if o == nil || o.PicklistID == nil {
diff --git a/model_template_def.go b/model_template_def.go
index 61712310..cb472a0a 100644
--- a/model_template_def.go
+++ b/model_template_def.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// TemplateDef
+// TemplateDef struct for TemplateDef
type TemplateDef struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -32,7 +32,7 @@ type TemplateDef struct {
// Used for grouping templates in the rule editor sidebar.
Category string `json:"category"`
// A Talang expression that contains variable bindings referring to args.
- Expr []interface{} `json:"expr"`
+ Expr []map[string]interface{} `json:"expr"`
// An array of argument definitions.
Args []TemplateArgDef `json:"args"`
// A flag to control exposure in Rule Builder.
@@ -147,9 +147,9 @@ func (o *TemplateDef) SetCategory(v string) {
}
// GetExpr returns the Expr field value
-func (o *TemplateDef) GetExpr() []interface{} {
+func (o *TemplateDef) GetExpr() []map[string]interface{} {
if o == nil {
- var ret []interface{}
+ var ret []map[string]interface{}
return ret
}
@@ -157,7 +157,7 @@ func (o *TemplateDef) GetExpr() []interface{} {
}
// SetExpr sets field value
-func (o *TemplateDef) SetExpr(v []interface{}) {
+func (o *TemplateDef) SetExpr(v []map[string]interface{}) {
o.Expr = v
}
diff --git a/model_template_limit_config.go b/model_template_limit_config.go
index db6498ef..4c4f85c4 100644
--- a/model_template_limit_config.go
+++ b/model_template_limit_config.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// TemplateLimitConfig
+// TemplateLimitConfig struct for TemplateLimitConfig
type TemplateLimitConfig struct {
// The limitable action to which this limit applies. For example: - `setDiscount` - `setDiscountEffect` - `redeemCoupon` - `createCoupon`
Action string `json:"action"`
diff --git a/model_update_achievement.go b/model_update_achievement.go
index a014b17f..8ba96ed2 100644
--- a/model_update_achievement.go
+++ b/model_update_achievement.go
@@ -12,6 +12,7 @@ package talon
import (
"bytes"
"encoding/json"
+ "time"
)
// UpdateAchievement struct for UpdateAchievement
@@ -27,6 +28,14 @@ type UpdateAchievement struct {
// The relative duration after which the achievement ends and resets for a particular customer profile.
Period *string `json:"period,omitempty"`
PeriodEndOverride *TimePoint `json:"periodEndOverride,omitempty"`
+ // The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again.
+ RecurrencePolicy *string `json:"recurrencePolicy,omitempty"`
+ // The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ ActivationPolicy *string `json:"activationPolicy,omitempty"`
+ // The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string.
+ FixedStartDate *time.Time `json:"fixedStartDate,omitempty"`
+ // The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string.
+ EndDate *time.Time `json:"endDate,omitempty"`
}
// GetName returns the Name field value if set, zero value otherwise.
@@ -227,6 +236,138 @@ func (o *UpdateAchievement) SetPeriodEndOverride(v TimePoint) {
o.PeriodEndOverride = &v
}
+// GetRecurrencePolicy returns the RecurrencePolicy field value if set, zero value otherwise.
+func (o *UpdateAchievement) GetRecurrencePolicy() string {
+ if o == nil || o.RecurrencePolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.RecurrencePolicy
+}
+
+// GetRecurrencePolicyOk returns a tuple with the RecurrencePolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateAchievement) GetRecurrencePolicyOk() (string, bool) {
+ if o == nil || o.RecurrencePolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.RecurrencePolicy, true
+}
+
+// HasRecurrencePolicy returns a boolean if a field has been set.
+func (o *UpdateAchievement) HasRecurrencePolicy() bool {
+ if o != nil && o.RecurrencePolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRecurrencePolicy gets a reference to the given string and assigns it to the RecurrencePolicy field.
+func (o *UpdateAchievement) SetRecurrencePolicy(v string) {
+ o.RecurrencePolicy = &v
+}
+
+// GetActivationPolicy returns the ActivationPolicy field value if set, zero value otherwise.
+func (o *UpdateAchievement) GetActivationPolicy() string {
+ if o == nil || o.ActivationPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ActivationPolicy
+}
+
+// GetActivationPolicyOk returns a tuple with the ActivationPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateAchievement) GetActivationPolicyOk() (string, bool) {
+ if o == nil || o.ActivationPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ActivationPolicy, true
+}
+
+// HasActivationPolicy returns a boolean if a field has been set.
+func (o *UpdateAchievement) HasActivationPolicy() bool {
+ if o != nil && o.ActivationPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActivationPolicy gets a reference to the given string and assigns it to the ActivationPolicy field.
+func (o *UpdateAchievement) SetActivationPolicy(v string) {
+ o.ActivationPolicy = &v
+}
+
+// GetFixedStartDate returns the FixedStartDate field value if set, zero value otherwise.
+func (o *UpdateAchievement) GetFixedStartDate() time.Time {
+ if o == nil || o.FixedStartDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.FixedStartDate
+}
+
+// GetFixedStartDateOk returns a tuple with the FixedStartDate field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateAchievement) GetFixedStartDateOk() (time.Time, bool) {
+ if o == nil || o.FixedStartDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.FixedStartDate, true
+}
+
+// HasFixedStartDate returns a boolean if a field has been set.
+func (o *UpdateAchievement) HasFixedStartDate() bool {
+ if o != nil && o.FixedStartDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFixedStartDate gets a reference to the given time.Time and assigns it to the FixedStartDate field.
+func (o *UpdateAchievement) SetFixedStartDate(v time.Time) {
+ o.FixedStartDate = &v
+}
+
+// GetEndDate returns the EndDate field value if set, zero value otherwise.
+func (o *UpdateAchievement) GetEndDate() time.Time {
+ if o == nil || o.EndDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.EndDate
+}
+
+// GetEndDateOk returns a tuple with the EndDate field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateAchievement) GetEndDateOk() (time.Time, bool) {
+ if o == nil || o.EndDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.EndDate, true
+}
+
+// HasEndDate returns a boolean if a field has been set.
+func (o *UpdateAchievement) HasEndDate() bool {
+ if o != nil && o.EndDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
+func (o *UpdateAchievement) SetEndDate(v time.Time) {
+ o.EndDate = &v
+}
+
type NullableUpdateAchievement struct {
Value UpdateAchievement
ExplicitNull bool
diff --git a/model_update_campaign_evaluation_group.go b/model_update_campaign_evaluation_group.go
index 79106aa6..15ffa72c 100644
--- a/model_update_campaign_evaluation_group.go
+++ b/model_update_campaign_evaluation_group.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// UpdateCampaignEvaluationGroup
+// UpdateCampaignEvaluationGroup struct for UpdateCampaignEvaluationGroup
type UpdateCampaignEvaluationGroup struct {
// The name of the campaign evaluation group.
Name string `json:"name"`
diff --git a/model_update_campaign_group.go b/model_update_campaign_group.go
index fea08478..084b95c3 100644
--- a/model_update_campaign_group.go
+++ b/model_update_campaign_group.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// UpdateCampaignGroup
+// UpdateCampaignGroup struct for UpdateCampaignGroup
type UpdateCampaignGroup struct {
// The name of the campaign access group.
Name string `json:"name"`
diff --git a/model_update_campaign_template.go b/model_update_campaign_template.go
index 9d0301fe..ea0e48d5 100644
--- a/model_update_campaign_template.go
+++ b/model_update_campaign_template.go
@@ -33,9 +33,10 @@ type UpdateCampaignTemplate struct {
// A list of tags for the campaign template.
Tags *[]string `json:"tags,omitempty"`
// A list of features for the campaign template.
- Features *[]string `json:"features,omitempty"`
- CouponSettings *CodeGeneratorSettings `json:"couponSettings,omitempty"`
- ReferralSettings *CodeGeneratorSettings `json:"referralSettings,omitempty"`
+ Features *[]string `json:"features,omitempty"`
+ CouponSettings *CodeGeneratorSettings `json:"couponSettings,omitempty"`
+ CouponReservationSettings *CampaignTemplateCouponReservationSettings `json:"couponReservationSettings,omitempty"`
+ ReferralSettings *CodeGeneratorSettings `json:"referralSettings,omitempty"`
// The set of limits that operate for this campaign template.
Limits *[]TemplateLimitConfig `json:"limits,omitempty"`
// Fields which can be used to replace values in a rule.
@@ -308,6 +309,39 @@ func (o *UpdateCampaignTemplate) SetCouponSettings(v CodeGeneratorSettings) {
o.CouponSettings = &v
}
+// GetCouponReservationSettings returns the CouponReservationSettings field value if set, zero value otherwise.
+func (o *UpdateCampaignTemplate) GetCouponReservationSettings() CampaignTemplateCouponReservationSettings {
+ if o == nil || o.CouponReservationSettings == nil {
+ var ret CampaignTemplateCouponReservationSettings
+ return ret
+ }
+ return *o.CouponReservationSettings
+}
+
+// GetCouponReservationSettingsOk returns a tuple with the CouponReservationSettings field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateCampaignTemplate) GetCouponReservationSettingsOk() (CampaignTemplateCouponReservationSettings, bool) {
+ if o == nil || o.CouponReservationSettings == nil {
+ var ret CampaignTemplateCouponReservationSettings
+ return ret, false
+ }
+ return *o.CouponReservationSettings, true
+}
+
+// HasCouponReservationSettings returns a boolean if a field has been set.
+func (o *UpdateCampaignTemplate) HasCouponReservationSettings() bool {
+ if o != nil && o.CouponReservationSettings != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCouponReservationSettings gets a reference to the given CampaignTemplateCouponReservationSettings and assigns it to the CouponReservationSettings field.
+func (o *UpdateCampaignTemplate) SetCouponReservationSettings(v CampaignTemplateCouponReservationSettings) {
+ o.CouponReservationSettings = &v
+}
+
// GetReferralSettings returns the ReferralSettings field value if set, zero value otherwise.
func (o *UpdateCampaignTemplate) GetReferralSettings() CodeGeneratorSettings {
if o == nil || o.ReferralSettings == nil {
diff --git a/model_update_coupon.go b/model_update_coupon.go
index b2e610f8..69307a3b 100644
--- a/model_update_coupon.go
+++ b/model_update_coupon.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// UpdateCoupon
+// UpdateCoupon struct for UpdateCoupon
type UpdateCoupon struct {
// The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
UsageLimit *int32 `json:"usageLimit,omitempty"`
diff --git a/model_update_coupon_batch.go b/model_update_coupon_batch.go
index 5ff34e45..c6ea2082 100644
--- a/model_update_coupon_batch.go
+++ b/model_update_coupon_batch.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// UpdateCouponBatch
+// UpdateCouponBatch struct for UpdateCouponBatch
type UpdateCouponBatch struct {
// The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
UsageLimit *int32 `json:"usageLimit,omitempty"`
diff --git a/model_update_custom_effect.go b/model_update_custom_effect.go
index e2dd384f..9cf2e152 100644
--- a/model_update_custom_effect.go
+++ b/model_update_custom_effect.go
@@ -14,198 +14,8 @@ import (
"encoding/json"
)
-// UpdateCustomEffect
+// UpdateCustomEffect struct for UpdateCustomEffect
type UpdateCustomEffect struct {
- // The IDs of the Applications that are related to this entity.
- ApplicationIds []int32 `json:"applicationIds"`
- // Indicates if this effect is per item or not.
- IsPerItem *bool `json:"isPerItem,omitempty"`
- // The name of this effect.
- Name string `json:"name"`
- // The title of this effect.
- Title string `json:"title"`
- // The JSON payload of this effect.
- Payload string `json:"payload"`
- // The description of this effect.
- Description *string `json:"description,omitempty"`
- // Determines if this effect is active.
- Enabled bool `json:"enabled"`
- // Array of template argument definitions.
- Params *[]TemplateArgDef `json:"params,omitempty"`
-}
-
-// GetApplicationIds returns the ApplicationIds field value
-func (o *UpdateCustomEffect) GetApplicationIds() []int32 {
- if o == nil {
- var ret []int32
- return ret
- }
-
- return o.ApplicationIds
-}
-
-// SetApplicationIds sets field value
-func (o *UpdateCustomEffect) SetApplicationIds(v []int32) {
- o.ApplicationIds = v
-}
-
-// GetIsPerItem returns the IsPerItem field value if set, zero value otherwise.
-func (o *UpdateCustomEffect) GetIsPerItem() bool {
- if o == nil || o.IsPerItem == nil {
- var ret bool
- return ret
- }
- return *o.IsPerItem
-}
-
-// GetIsPerItemOk returns a tuple with the IsPerItem field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *UpdateCustomEffect) GetIsPerItemOk() (bool, bool) {
- if o == nil || o.IsPerItem == nil {
- var ret bool
- return ret, false
- }
- return *o.IsPerItem, true
-}
-
-// HasIsPerItem returns a boolean if a field has been set.
-func (o *UpdateCustomEffect) HasIsPerItem() bool {
- if o != nil && o.IsPerItem != nil {
- return true
- }
-
- return false
-}
-
-// SetIsPerItem gets a reference to the given bool and assigns it to the IsPerItem field.
-func (o *UpdateCustomEffect) SetIsPerItem(v bool) {
- o.IsPerItem = &v
-}
-
-// GetName returns the Name field value
-func (o *UpdateCustomEffect) GetName() string {
- if o == nil {
- var ret string
- return ret
- }
-
- return o.Name
-}
-
-// SetName sets field value
-func (o *UpdateCustomEffect) SetName(v string) {
- o.Name = v
-}
-
-// GetTitle returns the Title field value
-func (o *UpdateCustomEffect) GetTitle() string {
- if o == nil {
- var ret string
- return ret
- }
-
- return o.Title
-}
-
-// SetTitle sets field value
-func (o *UpdateCustomEffect) SetTitle(v string) {
- o.Title = v
-}
-
-// GetPayload returns the Payload field value
-func (o *UpdateCustomEffect) GetPayload() string {
- if o == nil {
- var ret string
- return ret
- }
-
- return o.Payload
-}
-
-// SetPayload sets field value
-func (o *UpdateCustomEffect) SetPayload(v string) {
- o.Payload = v
-}
-
-// GetDescription returns the Description field value if set, zero value otherwise.
-func (o *UpdateCustomEffect) GetDescription() string {
- if o == nil || o.Description == nil {
- var ret string
- return ret
- }
- return *o.Description
-}
-
-// GetDescriptionOk returns a tuple with the Description field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *UpdateCustomEffect) GetDescriptionOk() (string, bool) {
- if o == nil || o.Description == nil {
- var ret string
- return ret, false
- }
- return *o.Description, true
-}
-
-// HasDescription returns a boolean if a field has been set.
-func (o *UpdateCustomEffect) HasDescription() bool {
- if o != nil && o.Description != nil {
- return true
- }
-
- return false
-}
-
-// SetDescription gets a reference to the given string and assigns it to the Description field.
-func (o *UpdateCustomEffect) SetDescription(v string) {
- o.Description = &v
-}
-
-// GetEnabled returns the Enabled field value
-func (o *UpdateCustomEffect) GetEnabled() bool {
- if o == nil {
- var ret bool
- return ret
- }
-
- return o.Enabled
-}
-
-// SetEnabled sets field value
-func (o *UpdateCustomEffect) SetEnabled(v bool) {
- o.Enabled = v
-}
-
-// GetParams returns the Params field value if set, zero value otherwise.
-func (o *UpdateCustomEffect) GetParams() []TemplateArgDef {
- if o == nil || o.Params == nil {
- var ret []TemplateArgDef
- return ret
- }
- return *o.Params
-}
-
-// GetParamsOk returns a tuple with the Params field value if set, zero value otherwise
-// and a boolean to check if the value has been set.
-func (o *UpdateCustomEffect) GetParamsOk() ([]TemplateArgDef, bool) {
- if o == nil || o.Params == nil {
- var ret []TemplateArgDef
- return ret, false
- }
- return *o.Params, true
-}
-
-// HasParams returns a boolean if a field has been set.
-func (o *UpdateCustomEffect) HasParams() bool {
- if o != nil && o.Params != nil {
- return true
- }
-
- return false
-}
-
-// SetParams gets a reference to the given []TemplateArgDef and assigns it to the Params field.
-func (o *UpdateCustomEffect) SetParams(v []TemplateArgDef) {
- o.Params = &v
}
type NullableUpdateCustomEffect struct {
diff --git a/model_update_loyalty_program.go b/model_update_loyalty_program.go
index 216bbfe0..3e051db2 100644
--- a/model_update_loyalty_program.go
+++ b/model_update_loyalty_program.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// UpdateLoyaltyProgram
+// UpdateLoyaltyProgram An updated loyalty program.
type UpdateLoyaltyProgram struct {
// The display title for the Loyalty Program.
Title *string `json:"title,omitempty"`
@@ -44,6 +44,8 @@ type UpdateLoyaltyProgram struct {
// The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment.
TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"`
CardCodeSettings *CodeGeneratorSettings `json:"cardCodeSettings,omitempty"`
+ // The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
+ ReturnPolicy *string `json:"returnPolicy,omitempty"`
// The tiers in this loyalty program.
Tiers *[]NewLoyaltyTier `json:"tiers,omitempty"`
}
@@ -510,6 +512,39 @@ func (o *UpdateLoyaltyProgram) SetCardCodeSettings(v CodeGeneratorSettings) {
o.CardCodeSettings = &v
}
+// GetReturnPolicy returns the ReturnPolicy field value if set, zero value otherwise.
+func (o *UpdateLoyaltyProgram) GetReturnPolicy() string {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnPolicy
+}
+
+// GetReturnPolicyOk returns a tuple with the ReturnPolicy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateLoyaltyProgram) GetReturnPolicyOk() (string, bool) {
+ if o == nil || o.ReturnPolicy == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ReturnPolicy, true
+}
+
+// HasReturnPolicy returns a boolean if a field has been set.
+func (o *UpdateLoyaltyProgram) HasReturnPolicy() bool {
+ if o != nil && o.ReturnPolicy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnPolicy gets a reference to the given string and assigns it to the ReturnPolicy field.
+func (o *UpdateLoyaltyProgram) SetReturnPolicy(v string) {
+ o.ReturnPolicy = &v
+}
+
// GetTiers returns the Tiers field value if set, zero value otherwise.
func (o *UpdateLoyaltyProgram) GetTiers() []NewLoyaltyTier {
if o == nil || o.Tiers == nil {
diff --git a/model_update_loyalty_program_tier.go b/model_update_loyalty_program_tier.go
new file mode 100644
index 00000000..1708316d
--- /dev/null
+++ b/model_update_loyalty_program_tier.go
@@ -0,0 +1,129 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+)
+
+// UpdateLoyaltyProgramTier Update a tier in a specified loyalty program.
+type UpdateLoyaltyProgramTier struct {
+ // The internal ID of the tier.
+ Id int32 `json:"id"`
+ // The name of the tier.
+ Name *string `json:"name,omitempty"`
+ // The minimum amount of points required to enter the tier.
+ MinPoints *float32 `json:"minPoints,omitempty"`
+}
+
+// GetId returns the Id field value
+func (o *UpdateLoyaltyProgramTier) GetId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Id
+}
+
+// SetId sets field value
+func (o *UpdateLoyaltyProgramTier) SetId(v int32) {
+ o.Id = v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *UpdateLoyaltyProgramTier) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateLoyaltyProgramTier) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *UpdateLoyaltyProgramTier) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *UpdateLoyaltyProgramTier) SetName(v string) {
+ o.Name = &v
+}
+
+// GetMinPoints returns the MinPoints field value if set, zero value otherwise.
+func (o *UpdateLoyaltyProgramTier) GetMinPoints() float32 {
+ if o == nil || o.MinPoints == nil {
+ var ret float32
+ return ret
+ }
+ return *o.MinPoints
+}
+
+// GetMinPointsOk returns a tuple with the MinPoints field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateLoyaltyProgramTier) GetMinPointsOk() (float32, bool) {
+ if o == nil || o.MinPoints == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.MinPoints, true
+}
+
+// HasMinPoints returns a boolean if a field has been set.
+func (o *UpdateLoyaltyProgramTier) HasMinPoints() bool {
+ if o != nil && o.MinPoints != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMinPoints gets a reference to the given float32 and assigns it to the MinPoints field.
+func (o *UpdateLoyaltyProgramTier) SetMinPoints(v float32) {
+ o.MinPoints = &v
+}
+
+type NullableUpdateLoyaltyProgramTier struct {
+ Value UpdateLoyaltyProgramTier
+ ExplicitNull bool
+}
+
+func (v NullableUpdateLoyaltyProgramTier) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableUpdateLoyaltyProgramTier) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_update_picklist.go b/model_update_picklist.go
index 4e8e7c6c..96472c0b 100644
--- a/model_update_picklist.go
+++ b/model_update_picklist.go
@@ -14,7 +14,7 @@ import (
"encoding/json"
)
-// UpdatePicklist
+// UpdatePicklist struct for UpdatePicklist
type UpdatePicklist struct {
// The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string.
Type string `json:"type"`
diff --git a/model_user.go b/model_user.go
index aba1f9f7..12621240 100644
--- a/model_user.go
+++ b/model_user.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// User
+// User struct for User
type User struct {
// Internal ID of this entity.
Id int32 `json:"id"`
diff --git a/model_value_map.go b/model_value_map.go
new file mode 100644
index 00000000..bb0a0684
--- /dev/null
+++ b/model_value_map.go
@@ -0,0 +1,145 @@
+/*
+ * Talon.One API
+ *
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
+ *
+ * API version:
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package talon
+
+import (
+ "bytes"
+ "encoding/json"
+ "time"
+)
+
+// ValueMap struct for ValueMap
+type ValueMap struct {
+ // Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.
+ Id int32 `json:"id"`
+ Created *time.Time `json:"created,omitempty"`
+ // The ID of the user who created the value map.
+ CreatedBy *int32 `json:"createdBy,omitempty"`
+ CampaignId int32 `json:"campaignId"`
+}
+
+// GetId returns the Id field value
+func (o *ValueMap) GetId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Id
+}
+
+// SetId sets field value
+func (o *ValueMap) SetId(v int32) {
+ o.Id = v
+}
+
+// GetCreated returns the Created field value if set, zero value otherwise.
+func (o *ValueMap) GetCreated() time.Time {
+ if o == nil || o.Created == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.Created
+}
+
+// GetCreatedOk returns a tuple with the Created field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ValueMap) GetCreatedOk() (time.Time, bool) {
+ if o == nil || o.Created == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.Created, true
+}
+
+// HasCreated returns a boolean if a field has been set.
+func (o *ValueMap) HasCreated() bool {
+ if o != nil && o.Created != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreated gets a reference to the given time.Time and assigns it to the Created field.
+func (o *ValueMap) SetCreated(v time.Time) {
+ o.Created = &v
+}
+
+// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise.
+func (o *ValueMap) GetCreatedBy() int32 {
+ if o == nil || o.CreatedBy == nil {
+ var ret int32
+ return ret
+ }
+ return *o.CreatedBy
+}
+
+// GetCreatedByOk returns a tuple with the CreatedBy field value if set, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ValueMap) GetCreatedByOk() (int32, bool) {
+ if o == nil || o.CreatedBy == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.CreatedBy, true
+}
+
+// HasCreatedBy returns a boolean if a field has been set.
+func (o *ValueMap) HasCreatedBy() bool {
+ if o != nil && o.CreatedBy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedBy gets a reference to the given int32 and assigns it to the CreatedBy field.
+func (o *ValueMap) SetCreatedBy(v int32) {
+ o.CreatedBy = &v
+}
+
+// GetCampaignId returns the CampaignId field value
+func (o *ValueMap) GetCampaignId() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.CampaignId
+}
+
+// SetCampaignId sets field value
+func (o *ValueMap) SetCampaignId(v int32) {
+ o.CampaignId = v
+}
+
+type NullableValueMap struct {
+ Value ValueMap
+ ExplicitNull bool
+}
+
+func (v NullableValueMap) MarshalJSON() ([]byte, error) {
+ switch {
+ case v.ExplicitNull:
+ return []byte("null"), nil
+ default:
+ return json.Marshal(v.Value)
+ }
+}
+
+func (v *NullableValueMap) UnmarshalJSON(src []byte) error {
+ if bytes.Equal(src, []byte("null")) {
+ v.ExplicitNull = true
+ return nil
+ }
+
+ return json.Unmarshal(src, &v.Value)
+}
diff --git a/model_webhook.go b/model_webhook.go
index fa816b51..10de048b 100644
--- a/model_webhook.go
+++ b/model_webhook.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// Webhook
+// Webhook struct for Webhook
type Webhook struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -23,7 +23,7 @@ type Webhook struct {
Created time.Time `json:"created"`
// The time this entity was last modified.
Modified time.Time `json:"modified"`
- // The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity.
+ // The IDs of the Applications in which this webhook is available. An empty array means the webhook is available in `All Applications`.
ApplicationIds []int32 `json:"applicationIds"`
// Name or title for this webhook.
Title string `json:"title"`
diff --git a/model_webhook_log_entry.go b/model_webhook_log_entry.go
index 15bb7da2..69146f8e 100644
--- a/model_webhook_log_entry.go
+++ b/model_webhook_log_entry.go
@@ -25,7 +25,7 @@ type WebhookLogEntry struct {
WebhookId int32 `json:"webhookId"`
// ID of the application that triggered the webhook.
ApplicationId *int32 `json:"applicationId,omitempty"`
- // Target url of request
+ // The target URL of the request.
Url string `json:"url"`
// Request message
Request string `json:"request"`
diff --git a/model_webhook_with_outgoing_integration_details.go b/model_webhook_with_outgoing_integration_details.go
index 3e72a522..5216fc6e 100644
--- a/model_webhook_with_outgoing_integration_details.go
+++ b/model_webhook_with_outgoing_integration_details.go
@@ -15,7 +15,7 @@ import (
"time"
)
-// WebhookWithOutgoingIntegrationDetails
+// WebhookWithOutgoingIntegrationDetails struct for WebhookWithOutgoingIntegrationDetails
type WebhookWithOutgoingIntegrationDetails struct {
// Internal ID of this entity.
Id int32 `json:"id"`
@@ -23,7 +23,7 @@ type WebhookWithOutgoingIntegrationDetails struct {
Created time.Time `json:"created"`
// The time this entity was last modified.
Modified time.Time `json:"modified"`
- // The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity.
+ // The IDs of the Applications in which this webhook is available. An empty array means the webhook is available in `All Applications`.
ApplicationIds []int32 `json:"applicationIds"`
// Name or title for this webhook.
Title string `json:"title"`
diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS
new file mode 100644
index 00000000..15167cd7
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS
new file mode 100644
index 00000000..1c4577e9
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE
new file mode 100644
index 00000000..0f646931
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/LICENSE
@@ -0,0 +1,28 @@
+Copyright 2010 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go
new file mode 100644
index 00000000..3cd3249f
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/clone.go
@@ -0,0 +1,253 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2011 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Protocol buffer deep copy and merge.
+// TODO: RawMessage.
+
+package proto
+
+import (
+ "fmt"
+ "log"
+ "reflect"
+ "strings"
+)
+
+// Clone returns a deep copy of a protocol buffer.
+func Clone(src Message) Message {
+ in := reflect.ValueOf(src)
+ if in.IsNil() {
+ return src
+ }
+ out := reflect.New(in.Type().Elem())
+ dst := out.Interface().(Message)
+ Merge(dst, src)
+ return dst
+}
+
+// Merger is the interface representing objects that can merge messages of the same type.
+type Merger interface {
+ // Merge merges src into this message.
+ // Required and optional fields that are set in src will be set to that value in dst.
+ // Elements of repeated fields will be appended.
+ //
+ // Merge may panic if called with a different argument type than the receiver.
+ Merge(src Message)
+}
+
+// generatedMerger is the custom merge method that generated protos will have.
+// We must add this method since a generate Merge method will conflict with
+// many existing protos that have a Merge data field already defined.
+type generatedMerger interface {
+ XXX_Merge(src Message)
+}
+
+// Merge merges src into dst.
+// Required and optional fields that are set in src will be set to that value in dst.
+// Elements of repeated fields will be appended.
+// Merge panics if src and dst are not the same type, or if dst is nil.
+func Merge(dst, src Message) {
+ if m, ok := dst.(Merger); ok {
+ m.Merge(src)
+ return
+ }
+
+ in := reflect.ValueOf(src)
+ out := reflect.ValueOf(dst)
+ if out.IsNil() {
+ panic("proto: nil destination")
+ }
+ if in.Type() != out.Type() {
+ panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src))
+ }
+ if in.IsNil() {
+ return // Merge from nil src is a noop
+ }
+ if m, ok := dst.(generatedMerger); ok {
+ m.XXX_Merge(src)
+ return
+ }
+ mergeStruct(out.Elem(), in.Elem())
+}
+
+func mergeStruct(out, in reflect.Value) {
+ sprop := GetProperties(in.Type())
+ for i := 0; i < in.NumField(); i++ {
+ f := in.Type().Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i])
+ }
+
+ if emIn, err := extendable(in.Addr().Interface()); err == nil {
+ emOut, _ := extendable(out.Addr().Interface())
+ mIn, muIn := emIn.extensionsRead()
+ if mIn != nil {
+ mOut := emOut.extensionsWrite()
+ muIn.Lock()
+ mergeExtension(mOut, mIn)
+ muIn.Unlock()
+ }
+ }
+
+ uf := in.FieldByName("XXX_unrecognized")
+ if !uf.IsValid() {
+ return
+ }
+ uin := uf.Bytes()
+ if len(uin) > 0 {
+ out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...))
+ }
+}
+
+// mergeAny performs a merge between two values of the same type.
+// viaPtr indicates whether the values were indirected through a pointer (implying proto2).
+// prop is set if this is a struct field (it may be nil).
+func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) {
+ if in.Type() == protoMessageType {
+ if !in.IsNil() {
+ if out.IsNil() {
+ out.Set(reflect.ValueOf(Clone(in.Interface().(Message))))
+ } else {
+ Merge(out.Interface().(Message), in.Interface().(Message))
+ }
+ }
+ return
+ }
+ switch in.Kind() {
+ case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
+ reflect.String, reflect.Uint32, reflect.Uint64:
+ if !viaPtr && isProto3Zero(in) {
+ return
+ }
+ out.Set(in)
+ case reflect.Interface:
+ // Probably a oneof field; copy non-nil values.
+ if in.IsNil() {
+ return
+ }
+ // Allocate destination if it is not set, or set to a different type.
+ // Otherwise we will merge as normal.
+ if out.IsNil() || out.Elem().Type() != in.Elem().Type() {
+ out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T)
+ }
+ mergeAny(out.Elem(), in.Elem(), false, nil)
+ case reflect.Map:
+ if in.Len() == 0 {
+ return
+ }
+ if out.IsNil() {
+ out.Set(reflect.MakeMap(in.Type()))
+ }
+ // For maps with value types of *T or []byte we need to deep copy each value.
+ elemKind := in.Type().Elem().Kind()
+ for _, key := range in.MapKeys() {
+ var val reflect.Value
+ switch elemKind {
+ case reflect.Ptr:
+ val = reflect.New(in.Type().Elem().Elem())
+ mergeAny(val, in.MapIndex(key), false, nil)
+ case reflect.Slice:
+ val = in.MapIndex(key)
+ val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
+ default:
+ val = in.MapIndex(key)
+ }
+ out.SetMapIndex(key, val)
+ }
+ case reflect.Ptr:
+ if in.IsNil() {
+ return
+ }
+ if out.IsNil() {
+ out.Set(reflect.New(in.Elem().Type()))
+ }
+ mergeAny(out.Elem(), in.Elem(), true, nil)
+ case reflect.Slice:
+ if in.IsNil() {
+ return
+ }
+ if in.Type().Elem().Kind() == reflect.Uint8 {
+ // []byte is a scalar bytes field, not a repeated field.
+
+ // Edge case: if this is in a proto3 message, a zero length
+ // bytes field is considered the zero value, and should not
+ // be merged.
+ if prop != nil && prop.proto3 && in.Len() == 0 {
+ return
+ }
+
+ // Make a deep copy.
+ // Append to []byte{} instead of []byte(nil) so that we never end up
+ // with a nil result.
+ out.SetBytes(append([]byte{}, in.Bytes()...))
+ return
+ }
+ n := in.Len()
+ if out.IsNil() {
+ out.Set(reflect.MakeSlice(in.Type(), 0, n))
+ }
+ switch in.Type().Elem().Kind() {
+ case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
+ reflect.String, reflect.Uint32, reflect.Uint64:
+ out.Set(reflect.AppendSlice(out, in))
+ default:
+ for i := 0; i < n; i++ {
+ x := reflect.Indirect(reflect.New(in.Type().Elem()))
+ mergeAny(x, in.Index(i), false, nil)
+ out.Set(reflect.Append(out, x))
+ }
+ }
+ case reflect.Struct:
+ mergeStruct(out, in)
+ default:
+ // unknown type, so not a protocol buffer
+ log.Printf("proto: don't know how to copy %v", in)
+ }
+}
+
+func mergeExtension(out, in map[int32]Extension) {
+ for extNum, eIn := range in {
+ eOut := Extension{desc: eIn.desc}
+ if eIn.value != nil {
+ v := reflect.New(reflect.TypeOf(eIn.value)).Elem()
+ mergeAny(v, reflect.ValueOf(eIn.value), false, nil)
+ eOut.value = v.Interface()
+ }
+ if eIn.enc != nil {
+ eOut.enc = make([]byte, len(eIn.enc))
+ copy(eOut.enc, eIn.enc)
+ }
+
+ out[extNum] = eOut
+ }
+}
diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go
new file mode 100644
index 00000000..d9aa3c42
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/decode.go
@@ -0,0 +1,428 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+/*
+ * Routines for decoding protocol buffer data to construct in-memory representations.
+ */
+
+import (
+ "errors"
+ "fmt"
+ "io"
+)
+
+// errOverflow is returned when an integer is too large to be represented.
+var errOverflow = errors.New("proto: integer overflow")
+
+// ErrInternalBadWireType is returned by generated code when an incorrect
+// wire type is encountered. It does not get returned to user code.
+var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
+
+// DecodeVarint reads a varint-encoded integer from the slice.
+// It returns the integer and the number of bytes consumed, or
+// zero if there is not enough.
+// This is the format for the
+// int32, int64, uint32, uint64, bool, and enum
+// protocol buffer types.
+func DecodeVarint(buf []byte) (x uint64, n int) {
+ for shift := uint(0); shift < 64; shift += 7 {
+ if n >= len(buf) {
+ return 0, 0
+ }
+ b := uint64(buf[n])
+ n++
+ x |= (b & 0x7F) << shift
+ if (b & 0x80) == 0 {
+ return x, n
+ }
+ }
+
+ // The number is too large to represent in a 64-bit value.
+ return 0, 0
+}
+
+func (p *Buffer) decodeVarintSlow() (x uint64, err error) {
+ i := p.index
+ l := len(p.buf)
+
+ for shift := uint(0); shift < 64; shift += 7 {
+ if i >= l {
+ err = io.ErrUnexpectedEOF
+ return
+ }
+ b := p.buf[i]
+ i++
+ x |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ p.index = i
+ return
+ }
+ }
+
+ // The number is too large to represent in a 64-bit value.
+ err = errOverflow
+ return
+}
+
+// DecodeVarint reads a varint-encoded integer from the Buffer.
+// This is the format for the
+// int32, int64, uint32, uint64, bool, and enum
+// protocol buffer types.
+func (p *Buffer) DecodeVarint() (x uint64, err error) {
+ i := p.index
+ buf := p.buf
+
+ if i >= len(buf) {
+ return 0, io.ErrUnexpectedEOF
+ } else if buf[i] < 0x80 {
+ p.index++
+ return uint64(buf[i]), nil
+ } else if len(buf)-i < 10 {
+ return p.decodeVarintSlow()
+ }
+
+ var b uint64
+ // we already checked the first byte
+ x = uint64(buf[i]) - 0x80
+ i++
+
+ b = uint64(buf[i])
+ i++
+ x += b << 7
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 7
+
+ b = uint64(buf[i])
+ i++
+ x += b << 14
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 14
+
+ b = uint64(buf[i])
+ i++
+ x += b << 21
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 21
+
+ b = uint64(buf[i])
+ i++
+ x += b << 28
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 28
+
+ b = uint64(buf[i])
+ i++
+ x += b << 35
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 35
+
+ b = uint64(buf[i])
+ i++
+ x += b << 42
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 42
+
+ b = uint64(buf[i])
+ i++
+ x += b << 49
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 49
+
+ b = uint64(buf[i])
+ i++
+ x += b << 56
+ if b&0x80 == 0 {
+ goto done
+ }
+ x -= 0x80 << 56
+
+ b = uint64(buf[i])
+ i++
+ x += b << 63
+ if b&0x80 == 0 {
+ goto done
+ }
+ // x -= 0x80 << 63 // Always zero.
+
+ return 0, errOverflow
+
+done:
+ p.index = i
+ return x, nil
+}
+
+// DecodeFixed64 reads a 64-bit integer from the Buffer.
+// This is the format for the
+// fixed64, sfixed64, and double protocol buffer types.
+func (p *Buffer) DecodeFixed64() (x uint64, err error) {
+ // x, err already 0
+ i := p.index + 8
+ if i < 0 || i > len(p.buf) {
+ err = io.ErrUnexpectedEOF
+ return
+ }
+ p.index = i
+
+ x = uint64(p.buf[i-8])
+ x |= uint64(p.buf[i-7]) << 8
+ x |= uint64(p.buf[i-6]) << 16
+ x |= uint64(p.buf[i-5]) << 24
+ x |= uint64(p.buf[i-4]) << 32
+ x |= uint64(p.buf[i-3]) << 40
+ x |= uint64(p.buf[i-2]) << 48
+ x |= uint64(p.buf[i-1]) << 56
+ return
+}
+
+// DecodeFixed32 reads a 32-bit integer from the Buffer.
+// This is the format for the
+// fixed32, sfixed32, and float protocol buffer types.
+func (p *Buffer) DecodeFixed32() (x uint64, err error) {
+ // x, err already 0
+ i := p.index + 4
+ if i < 0 || i > len(p.buf) {
+ err = io.ErrUnexpectedEOF
+ return
+ }
+ p.index = i
+
+ x = uint64(p.buf[i-4])
+ x |= uint64(p.buf[i-3]) << 8
+ x |= uint64(p.buf[i-2]) << 16
+ x |= uint64(p.buf[i-1]) << 24
+ return
+}
+
+// DecodeZigzag64 reads a zigzag-encoded 64-bit integer
+// from the Buffer.
+// This is the format used for the sint64 protocol buffer type.
+func (p *Buffer) DecodeZigzag64() (x uint64, err error) {
+ x, err = p.DecodeVarint()
+ if err != nil {
+ return
+ }
+ x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63)
+ return
+}
+
+// DecodeZigzag32 reads a zigzag-encoded 32-bit integer
+// from the Buffer.
+// This is the format used for the sint32 protocol buffer type.
+func (p *Buffer) DecodeZigzag32() (x uint64, err error) {
+ x, err = p.DecodeVarint()
+ if err != nil {
+ return
+ }
+ x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31))
+ return
+}
+
+// DecodeRawBytes reads a count-delimited byte buffer from the Buffer.
+// This is the format used for the bytes protocol buffer
+// type and for embedded messages.
+func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) {
+ n, err := p.DecodeVarint()
+ if err != nil {
+ return nil, err
+ }
+
+ nb := int(n)
+ if nb < 0 {
+ return nil, fmt.Errorf("proto: bad byte length %d", nb)
+ }
+ end := p.index + nb
+ if end < p.index || end > len(p.buf) {
+ return nil, io.ErrUnexpectedEOF
+ }
+
+ if !alloc {
+ // todo: check if can get more uses of alloc=false
+ buf = p.buf[p.index:end]
+ p.index += nb
+ return
+ }
+
+ buf = make([]byte, nb)
+ copy(buf, p.buf[p.index:])
+ p.index += nb
+ return
+}
+
+// DecodeStringBytes reads an encoded string from the Buffer.
+// This is the format used for the proto2 string type.
+func (p *Buffer) DecodeStringBytes() (s string, err error) {
+ buf, err := p.DecodeRawBytes(false)
+ if err != nil {
+ return
+ }
+ return string(buf), nil
+}
+
+// Unmarshaler is the interface representing objects that can
+// unmarshal themselves. The argument points to data that may be
+// overwritten, so implementations should not keep references to the
+// buffer.
+// Unmarshal implementations should not clear the receiver.
+// Any unmarshaled data should be merged into the receiver.
+// Callers of Unmarshal that do not want to retain existing data
+// should Reset the receiver before calling Unmarshal.
+type Unmarshaler interface {
+ Unmarshal([]byte) error
+}
+
+// newUnmarshaler is the interface representing objects that can
+// unmarshal themselves. The semantics are identical to Unmarshaler.
+//
+// This exists to support protoc-gen-go generated messages.
+// The proto package will stop type-asserting to this interface in the future.
+//
+// DO NOT DEPEND ON THIS.
+type newUnmarshaler interface {
+ XXX_Unmarshal([]byte) error
+}
+
+// Unmarshal parses the protocol buffer representation in buf and places the
+// decoded result in pb. If the struct underlying pb does not match
+// the data in buf, the results can be unpredictable.
+//
+// Unmarshal resets pb before starting to unmarshal, so any
+// existing data in pb is always removed. Use UnmarshalMerge
+// to preserve and append to existing data.
+func Unmarshal(buf []byte, pb Message) error {
+ pb.Reset()
+ if u, ok := pb.(newUnmarshaler); ok {
+ return u.XXX_Unmarshal(buf)
+ }
+ if u, ok := pb.(Unmarshaler); ok {
+ return u.Unmarshal(buf)
+ }
+ return NewBuffer(buf).Unmarshal(pb)
+}
+
+// UnmarshalMerge parses the protocol buffer representation in buf and
+// writes the decoded result to pb. If the struct underlying pb does not match
+// the data in buf, the results can be unpredictable.
+//
+// UnmarshalMerge merges into existing data in pb.
+// Most code should use Unmarshal instead.
+func UnmarshalMerge(buf []byte, pb Message) error {
+ if u, ok := pb.(newUnmarshaler); ok {
+ return u.XXX_Unmarshal(buf)
+ }
+ if u, ok := pb.(Unmarshaler); ok {
+ // NOTE: The history of proto have unfortunately been inconsistent
+ // whether Unmarshaler should or should not implicitly clear itself.
+ // Some implementations do, most do not.
+ // Thus, calling this here may or may not do what people want.
+ //
+ // See https://github.com/golang/protobuf/issues/424
+ return u.Unmarshal(buf)
+ }
+ return NewBuffer(buf).Unmarshal(pb)
+}
+
+// DecodeMessage reads a count-delimited message from the Buffer.
+func (p *Buffer) DecodeMessage(pb Message) error {
+ enc, err := p.DecodeRawBytes(false)
+ if err != nil {
+ return err
+ }
+ return NewBuffer(enc).Unmarshal(pb)
+}
+
+// DecodeGroup reads a tag-delimited group from the Buffer.
+// StartGroup tag is already consumed. This function consumes
+// EndGroup tag.
+func (p *Buffer) DecodeGroup(pb Message) error {
+ b := p.buf[p.index:]
+ x, y := findEndGroup(b)
+ if x < 0 {
+ return io.ErrUnexpectedEOF
+ }
+ err := Unmarshal(b[:x], pb)
+ p.index += y
+ return err
+}
+
+// Unmarshal parses the protocol buffer representation in the
+// Buffer and places the decoded result in pb. If the struct
+// underlying pb does not match the data in the buffer, the results can be
+// unpredictable.
+//
+// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal.
+func (p *Buffer) Unmarshal(pb Message) error {
+ // If the object can unmarshal itself, let it.
+ if u, ok := pb.(newUnmarshaler); ok {
+ err := u.XXX_Unmarshal(p.buf[p.index:])
+ p.index = len(p.buf)
+ return err
+ }
+ if u, ok := pb.(Unmarshaler); ok {
+ // NOTE: The history of proto have unfortunately been inconsistent
+ // whether Unmarshaler should or should not implicitly clear itself.
+ // Some implementations do, most do not.
+ // Thus, calling this here may or may not do what people want.
+ //
+ // See https://github.com/golang/protobuf/issues/424
+ err := u.Unmarshal(p.buf[p.index:])
+ p.index = len(p.buf)
+ return err
+ }
+
+ // Slow workaround for messages that aren't Unmarshalers.
+ // This includes some hand-coded .pb.go files and
+ // bootstrap protos.
+ // TODO: fix all of those and then add Unmarshal to
+ // the Message interface. Then:
+ // The cast above and code below can be deleted.
+ // The old unmarshaler can be deleted.
+ // Clients can call Unmarshal directly (can already do that, actually).
+ var info InternalMessageInfo
+ err := info.Unmarshal(pb, p.buf[p.index:])
+ p.index = len(p.buf)
+ return err
+}
diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go
new file mode 100644
index 00000000..dea2617c
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/discard.go
@@ -0,0 +1,350 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2017 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+ "sync"
+ "sync/atomic"
+)
+
+type generatedDiscarder interface {
+ XXX_DiscardUnknown()
+}
+
+// DiscardUnknown recursively discards all unknown fields from this message
+// and all embedded messages.
+//
+// When unmarshaling a message with unrecognized fields, the tags and values
+// of such fields are preserved in the Message. This allows a later call to
+// marshal to be able to produce a message that continues to have those
+// unrecognized fields. To avoid this, DiscardUnknown is used to
+// explicitly clear the unknown fields after unmarshaling.
+//
+// For proto2 messages, the unknown fields of message extensions are only
+// discarded from messages that have been accessed via GetExtension.
+func DiscardUnknown(m Message) {
+ if m, ok := m.(generatedDiscarder); ok {
+ m.XXX_DiscardUnknown()
+ return
+ }
+ // TODO: Dynamically populate a InternalMessageInfo for legacy messages,
+ // but the master branch has no implementation for InternalMessageInfo,
+ // so it would be more work to replicate that approach.
+ discardLegacy(m)
+}
+
+// DiscardUnknown recursively discards all unknown fields.
+func (a *InternalMessageInfo) DiscardUnknown(m Message) {
+ di := atomicLoadDiscardInfo(&a.discard)
+ if di == nil {
+ di = getDiscardInfo(reflect.TypeOf(m).Elem())
+ atomicStoreDiscardInfo(&a.discard, di)
+ }
+ di.discard(toPointer(&m))
+}
+
+type discardInfo struct {
+ typ reflect.Type
+
+ initialized int32 // 0: only typ is valid, 1: everything is valid
+ lock sync.Mutex
+
+ fields []discardFieldInfo
+ unrecognized field
+}
+
+type discardFieldInfo struct {
+ field field // Offset of field, guaranteed to be valid
+ discard func(src pointer)
+}
+
+var (
+ discardInfoMap = map[reflect.Type]*discardInfo{}
+ discardInfoLock sync.Mutex
+)
+
+func getDiscardInfo(t reflect.Type) *discardInfo {
+ discardInfoLock.Lock()
+ defer discardInfoLock.Unlock()
+ di := discardInfoMap[t]
+ if di == nil {
+ di = &discardInfo{typ: t}
+ discardInfoMap[t] = di
+ }
+ return di
+}
+
+func (di *discardInfo) discard(src pointer) {
+ if src.isNil() {
+ return // Nothing to do.
+ }
+
+ if atomic.LoadInt32(&di.initialized) == 0 {
+ di.computeDiscardInfo()
+ }
+
+ for _, fi := range di.fields {
+ sfp := src.offset(fi.field)
+ fi.discard(sfp)
+ }
+
+ // For proto2 messages, only discard unknown fields in message extensions
+ // that have been accessed via GetExtension.
+ if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil {
+ // Ignore lock since DiscardUnknown is not concurrency safe.
+ emm, _ := em.extensionsRead()
+ for _, mx := range emm {
+ if m, ok := mx.value.(Message); ok {
+ DiscardUnknown(m)
+ }
+ }
+ }
+
+ if di.unrecognized.IsValid() {
+ *src.offset(di.unrecognized).toBytes() = nil
+ }
+}
+
+func (di *discardInfo) computeDiscardInfo() {
+ di.lock.Lock()
+ defer di.lock.Unlock()
+ if di.initialized != 0 {
+ return
+ }
+ t := di.typ
+ n := t.NumField()
+
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+
+ dfi := discardFieldInfo{field: toField(&f)}
+ tf := f.Type
+
+ // Unwrap tf to get its most basic type.
+ var isPointer, isSlice bool
+ if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
+ isSlice = true
+ tf = tf.Elem()
+ }
+ if tf.Kind() == reflect.Ptr {
+ isPointer = true
+ tf = tf.Elem()
+ }
+ if isPointer && isSlice && tf.Kind() != reflect.Struct {
+ panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name))
+ }
+
+ switch tf.Kind() {
+ case reflect.Struct:
+ switch {
+ case !isPointer:
+ panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name))
+ case isSlice: // E.g., []*pb.T
+ di := getDiscardInfo(tf)
+ dfi.discard = func(src pointer) {
+ sps := src.getPointerSlice()
+ for _, sp := range sps {
+ if !sp.isNil() {
+ di.discard(sp)
+ }
+ }
+ }
+ default: // E.g., *pb.T
+ di := getDiscardInfo(tf)
+ dfi.discard = func(src pointer) {
+ sp := src.getPointer()
+ if !sp.isNil() {
+ di.discard(sp)
+ }
+ }
+ }
+ case reflect.Map:
+ switch {
+ case isPointer || isSlice:
+ panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name))
+ default: // E.g., map[K]V
+ if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T)
+ dfi.discard = func(src pointer) {
+ sm := src.asPointerTo(tf).Elem()
+ if sm.Len() == 0 {
+ return
+ }
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ DiscardUnknown(val.Interface().(Message))
+ }
+ }
+ } else {
+ dfi.discard = func(pointer) {} // Noop
+ }
+ }
+ case reflect.Interface:
+ // Must be oneof field.
+ switch {
+ case isPointer || isSlice:
+ panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name))
+ default: // E.g., interface{}
+ // TODO: Make this faster?
+ dfi.discard = func(src pointer) {
+ su := src.asPointerTo(tf).Elem()
+ if !su.IsNil() {
+ sv := su.Elem().Elem().Field(0)
+ if sv.Kind() == reflect.Ptr && sv.IsNil() {
+ return
+ }
+ switch sv.Type().Kind() {
+ case reflect.Ptr: // Proto struct (e.g., *T)
+ DiscardUnknown(sv.Interface().(Message))
+ }
+ }
+ }
+ }
+ default:
+ continue
+ }
+ di.fields = append(di.fields, dfi)
+ }
+
+ di.unrecognized = invalidField
+ if f, ok := t.FieldByName("XXX_unrecognized"); ok {
+ if f.Type != reflect.TypeOf([]byte{}) {
+ panic("expected XXX_unrecognized to be of type []byte")
+ }
+ di.unrecognized = toField(&f)
+ }
+
+ atomic.StoreInt32(&di.initialized, 1)
+}
+
+func discardLegacy(m Message) {
+ v := reflect.ValueOf(m)
+ if v.Kind() != reflect.Ptr || v.IsNil() {
+ return
+ }
+ v = v.Elem()
+ if v.Kind() != reflect.Struct {
+ return
+ }
+ t := v.Type()
+
+ for i := 0; i < v.NumField(); i++ {
+ f := t.Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ vf := v.Field(i)
+ tf := f.Type
+
+ // Unwrap tf to get its most basic type.
+ var isPointer, isSlice bool
+ if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
+ isSlice = true
+ tf = tf.Elem()
+ }
+ if tf.Kind() == reflect.Ptr {
+ isPointer = true
+ tf = tf.Elem()
+ }
+ if isPointer && isSlice && tf.Kind() != reflect.Struct {
+ panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name))
+ }
+
+ switch tf.Kind() {
+ case reflect.Struct:
+ switch {
+ case !isPointer:
+ panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name))
+ case isSlice: // E.g., []*pb.T
+ for j := 0; j < vf.Len(); j++ {
+ discardLegacy(vf.Index(j).Interface().(Message))
+ }
+ default: // E.g., *pb.T
+ discardLegacy(vf.Interface().(Message))
+ }
+ case reflect.Map:
+ switch {
+ case isPointer || isSlice:
+ panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name))
+ default: // E.g., map[K]V
+ tv := vf.Type().Elem()
+ if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T)
+ for _, key := range vf.MapKeys() {
+ val := vf.MapIndex(key)
+ discardLegacy(val.Interface().(Message))
+ }
+ }
+ }
+ case reflect.Interface:
+ // Must be oneof field.
+ switch {
+ case isPointer || isSlice:
+ panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name))
+ default: // E.g., test_proto.isCommunique_Union interface
+ if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" {
+ vf = vf.Elem() // E.g., *test_proto.Communique_Msg
+ if !vf.IsNil() {
+ vf = vf.Elem() // E.g., test_proto.Communique_Msg
+ vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value
+ if vf.Kind() == reflect.Ptr {
+ discardLegacy(vf.Interface().(Message))
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() {
+ if vf.Type() != reflect.TypeOf([]byte{}) {
+ panic("expected XXX_unrecognized to be of type []byte")
+ }
+ vf.Set(reflect.ValueOf([]byte(nil)))
+ }
+
+ // For proto2 messages, only discard unknown fields in message extensions
+ // that have been accessed via GetExtension.
+ if em, err := extendable(m); err == nil {
+ // Ignore lock since discardLegacy is not concurrency safe.
+ emm, _ := em.extensionsRead()
+ for _, mx := range emm {
+ if m, ok := mx.value.(Message); ok {
+ discardLegacy(m)
+ }
+ }
+ }
+}
diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go
new file mode 100644
index 00000000..3abfed2c
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/encode.go
@@ -0,0 +1,203 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+/*
+ * Routines for encoding data into the wire format for protocol buffers.
+ */
+
+import (
+ "errors"
+ "reflect"
+)
+
+var (
+ // errRepeatedHasNil is the error returned if Marshal is called with
+ // a struct with a repeated field containing a nil element.
+ errRepeatedHasNil = errors.New("proto: repeated field has nil element")
+
+ // errOneofHasNil is the error returned if Marshal is called with
+ // a struct with a oneof field containing a nil element.
+ errOneofHasNil = errors.New("proto: oneof field has nil value")
+
+ // ErrNil is the error returned if Marshal is called with nil.
+ ErrNil = errors.New("proto: Marshal called with nil")
+
+ // ErrTooLarge is the error returned if Marshal is called with a
+ // message that encodes to >2GB.
+ ErrTooLarge = errors.New("proto: message encodes to over 2 GB")
+)
+
+// The fundamental encoders that put bytes on the wire.
+// Those that take integer types all accept uint64 and are
+// therefore of type valueEncoder.
+
+const maxVarintBytes = 10 // maximum length of a varint
+
+// EncodeVarint returns the varint encoding of x.
+// This is the format for the
+// int32, int64, uint32, uint64, bool, and enum
+// protocol buffer types.
+// Not used by the package itself, but helpful to clients
+// wishing to use the same encoding.
+func EncodeVarint(x uint64) []byte {
+ var buf [maxVarintBytes]byte
+ var n int
+ for n = 0; x > 127; n++ {
+ buf[n] = 0x80 | uint8(x&0x7F)
+ x >>= 7
+ }
+ buf[n] = uint8(x)
+ n++
+ return buf[0:n]
+}
+
+// EncodeVarint writes a varint-encoded integer to the Buffer.
+// This is the format for the
+// int32, int64, uint32, uint64, bool, and enum
+// protocol buffer types.
+func (p *Buffer) EncodeVarint(x uint64) error {
+ for x >= 1<<7 {
+ p.buf = append(p.buf, uint8(x&0x7f|0x80))
+ x >>= 7
+ }
+ p.buf = append(p.buf, uint8(x))
+ return nil
+}
+
+// SizeVarint returns the varint encoding size of an integer.
+func SizeVarint(x uint64) int {
+ switch {
+ case x < 1<<7:
+ return 1
+ case x < 1<<14:
+ return 2
+ case x < 1<<21:
+ return 3
+ case x < 1<<28:
+ return 4
+ case x < 1<<35:
+ return 5
+ case x < 1<<42:
+ return 6
+ case x < 1<<49:
+ return 7
+ case x < 1<<56:
+ return 8
+ case x < 1<<63:
+ return 9
+ }
+ return 10
+}
+
+// EncodeFixed64 writes a 64-bit integer to the Buffer.
+// This is the format for the
+// fixed64, sfixed64, and double protocol buffer types.
+func (p *Buffer) EncodeFixed64(x uint64) error {
+ p.buf = append(p.buf,
+ uint8(x),
+ uint8(x>>8),
+ uint8(x>>16),
+ uint8(x>>24),
+ uint8(x>>32),
+ uint8(x>>40),
+ uint8(x>>48),
+ uint8(x>>56))
+ return nil
+}
+
+// EncodeFixed32 writes a 32-bit integer to the Buffer.
+// This is the format for the
+// fixed32, sfixed32, and float protocol buffer types.
+func (p *Buffer) EncodeFixed32(x uint64) error {
+ p.buf = append(p.buf,
+ uint8(x),
+ uint8(x>>8),
+ uint8(x>>16),
+ uint8(x>>24))
+ return nil
+}
+
+// EncodeZigzag64 writes a zigzag-encoded 64-bit integer
+// to the Buffer.
+// This is the format used for the sint64 protocol buffer type.
+func (p *Buffer) EncodeZigzag64(x uint64) error {
+ // use signed number to get arithmetic right shift.
+ return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+
+// EncodeZigzag32 writes a zigzag-encoded 32-bit integer
+// to the Buffer.
+// This is the format used for the sint32 protocol buffer type.
+func (p *Buffer) EncodeZigzag32(x uint64) error {
+ // use signed number to get arithmetic right shift.
+ return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
+}
+
+// EncodeRawBytes writes a count-delimited byte buffer to the Buffer.
+// This is the format used for the bytes protocol buffer
+// type and for embedded messages.
+func (p *Buffer) EncodeRawBytes(b []byte) error {
+ p.EncodeVarint(uint64(len(b)))
+ p.buf = append(p.buf, b...)
+ return nil
+}
+
+// EncodeStringBytes writes an encoded string to the Buffer.
+// This is the format used for the proto2 string type.
+func (p *Buffer) EncodeStringBytes(s string) error {
+ p.EncodeVarint(uint64(len(s)))
+ p.buf = append(p.buf, s...)
+ return nil
+}
+
+// Marshaler is the interface representing objects that can marshal themselves.
+type Marshaler interface {
+ Marshal() ([]byte, error)
+}
+
+// EncodeMessage writes the protocol buffer to the Buffer,
+// prefixed by a varint-encoded length.
+func (p *Buffer) EncodeMessage(pb Message) error {
+ siz := Size(pb)
+ p.EncodeVarint(uint64(siz))
+ return p.Marshal(pb)
+}
+
+// All protocol buffer fields are nillable, but be careful.
+func isNil(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
+ return v.IsNil()
+ }
+ return false
+}
diff --git a/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/golang/protobuf/proto/equal.go
new file mode 100644
index 00000000..d4db5a1c
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/equal.go
@@ -0,0 +1,300 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2011 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Protocol buffer comparison.
+
+package proto
+
+import (
+ "bytes"
+ "log"
+ "reflect"
+ "strings"
+)
+
+/*
+Equal returns true iff protocol buffers a and b are equal.
+The arguments must both be pointers to protocol buffer structs.
+
+Equality is defined in this way:
+ - Two messages are equal iff they are the same type,
+ corresponding fields are equal, unknown field sets
+ are equal, and extensions sets are equal.
+ - Two set scalar fields are equal iff their values are equal.
+ If the fields are of a floating-point type, remember that
+ NaN != x for all x, including NaN. If the message is defined
+ in a proto3 .proto file, fields are not "set"; specifically,
+ zero length proto3 "bytes" fields are equal (nil == {}).
+ - Two repeated fields are equal iff their lengths are the same,
+ and their corresponding elements are equal. Note a "bytes" field,
+ although represented by []byte, is not a repeated field and the
+ rule for the scalar fields described above applies.
+ - Two unset fields are equal.
+ - Two unknown field sets are equal if their current
+ encoded state is equal.
+ - Two extension sets are equal iff they have corresponding
+ elements that are pairwise equal.
+ - Two map fields are equal iff their lengths are the same,
+ and they contain the same set of elements. Zero-length map
+ fields are equal.
+ - Every other combination of things are not equal.
+
+The return value is undefined if a and b are not protocol buffers.
+*/
+func Equal(a, b Message) bool {
+ if a == nil || b == nil {
+ return a == b
+ }
+ v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b)
+ if v1.Type() != v2.Type() {
+ return false
+ }
+ if v1.Kind() == reflect.Ptr {
+ if v1.IsNil() {
+ return v2.IsNil()
+ }
+ if v2.IsNil() {
+ return false
+ }
+ v1, v2 = v1.Elem(), v2.Elem()
+ }
+ if v1.Kind() != reflect.Struct {
+ return false
+ }
+ return equalStruct(v1, v2)
+}
+
+// v1 and v2 are known to have the same type.
+func equalStruct(v1, v2 reflect.Value) bool {
+ sprop := GetProperties(v1.Type())
+ for i := 0; i < v1.NumField(); i++ {
+ f := v1.Type().Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ f1, f2 := v1.Field(i), v2.Field(i)
+ if f.Type.Kind() == reflect.Ptr {
+ if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 {
+ // both unset
+ continue
+ } else if n1 != n2 {
+ // set/unset mismatch
+ return false
+ }
+ f1, f2 = f1.Elem(), f2.Elem()
+ }
+ if !equalAny(f1, f2, sprop.Prop[i]) {
+ return false
+ }
+ }
+
+ if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() {
+ em2 := v2.FieldByName("XXX_InternalExtensions")
+ if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) {
+ return false
+ }
+ }
+
+ if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() {
+ em2 := v2.FieldByName("XXX_extensions")
+ if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) {
+ return false
+ }
+ }
+
+ uf := v1.FieldByName("XXX_unrecognized")
+ if !uf.IsValid() {
+ return true
+ }
+
+ u1 := uf.Bytes()
+ u2 := v2.FieldByName("XXX_unrecognized").Bytes()
+ return bytes.Equal(u1, u2)
+}
+
+// v1 and v2 are known to have the same type.
+// prop may be nil.
+func equalAny(v1, v2 reflect.Value, prop *Properties) bool {
+ if v1.Type() == protoMessageType {
+ m1, _ := v1.Interface().(Message)
+ m2, _ := v2.Interface().(Message)
+ return Equal(m1, m2)
+ }
+ switch v1.Kind() {
+ case reflect.Bool:
+ return v1.Bool() == v2.Bool()
+ case reflect.Float32, reflect.Float64:
+ return v1.Float() == v2.Float()
+ case reflect.Int32, reflect.Int64:
+ return v1.Int() == v2.Int()
+ case reflect.Interface:
+ // Probably a oneof field; compare the inner values.
+ n1, n2 := v1.IsNil(), v2.IsNil()
+ if n1 || n2 {
+ return n1 == n2
+ }
+ e1, e2 := v1.Elem(), v2.Elem()
+ if e1.Type() != e2.Type() {
+ return false
+ }
+ return equalAny(e1, e2, nil)
+ case reflect.Map:
+ if v1.Len() != v2.Len() {
+ return false
+ }
+ for _, key := range v1.MapKeys() {
+ val2 := v2.MapIndex(key)
+ if !val2.IsValid() {
+ // This key was not found in the second map.
+ return false
+ }
+ if !equalAny(v1.MapIndex(key), val2, nil) {
+ return false
+ }
+ }
+ return true
+ case reflect.Ptr:
+ // Maps may have nil values in them, so check for nil.
+ if v1.IsNil() && v2.IsNil() {
+ return true
+ }
+ if v1.IsNil() != v2.IsNil() {
+ return false
+ }
+ return equalAny(v1.Elem(), v2.Elem(), prop)
+ case reflect.Slice:
+ if v1.Type().Elem().Kind() == reflect.Uint8 {
+ // short circuit: []byte
+
+ // Edge case: if this is in a proto3 message, a zero length
+ // bytes field is considered the zero value.
+ if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 {
+ return true
+ }
+ if v1.IsNil() != v2.IsNil() {
+ return false
+ }
+ return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte))
+ }
+
+ if v1.Len() != v2.Len() {
+ return false
+ }
+ for i := 0; i < v1.Len(); i++ {
+ if !equalAny(v1.Index(i), v2.Index(i), prop) {
+ return false
+ }
+ }
+ return true
+ case reflect.String:
+ return v1.Interface().(string) == v2.Interface().(string)
+ case reflect.Struct:
+ return equalStruct(v1, v2)
+ case reflect.Uint32, reflect.Uint64:
+ return v1.Uint() == v2.Uint()
+ }
+
+ // unknown type, so not a protocol buffer
+ log.Printf("proto: don't know how to compare %v", v1)
+ return false
+}
+
+// base is the struct type that the extensions are based on.
+// x1 and x2 are InternalExtensions.
+func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool {
+ em1, _ := x1.extensionsRead()
+ em2, _ := x2.extensionsRead()
+ return equalExtMap(base, em1, em2)
+}
+
+func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool {
+ if len(em1) != len(em2) {
+ return false
+ }
+
+ for extNum, e1 := range em1 {
+ e2, ok := em2[extNum]
+ if !ok {
+ return false
+ }
+
+ m1, m2 := e1.value, e2.value
+
+ if m1 == nil && m2 == nil {
+ // Both have only encoded form.
+ if bytes.Equal(e1.enc, e2.enc) {
+ continue
+ }
+ // The bytes are different, but the extensions might still be
+ // equal. We need to decode them to compare.
+ }
+
+ if m1 != nil && m2 != nil {
+ // Both are unencoded.
+ if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
+ return false
+ }
+ continue
+ }
+
+ // At least one is encoded. To do a semantically correct comparison
+ // we need to unmarshal them first.
+ var desc *ExtensionDesc
+ if m := extensionMaps[base]; m != nil {
+ desc = m[extNum]
+ }
+ if desc == nil {
+ // If both have only encoded form and the bytes are the same,
+ // it is handled above. We get here when the bytes are different.
+ // We don't know how to decode it, so just compare them as byte
+ // slices.
+ log.Printf("proto: don't know how to compare extension %d of %v", extNum, base)
+ return false
+ }
+ var err error
+ if m1 == nil {
+ m1, err = decodeExtension(e1.enc, desc)
+ }
+ if m2 == nil && err == nil {
+ m2, err = decodeExtension(e2.enc, desc)
+ }
+ if err != nil {
+ // The encoded form is invalid.
+ log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err)
+ return false
+ }
+ if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go
new file mode 100644
index 00000000..816a3b9d
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/extensions.go
@@ -0,0 +1,543 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+/*
+ * Types and routines for supporting protocol buffer extensions.
+ */
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "reflect"
+ "strconv"
+ "sync"
+)
+
+// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message.
+var ErrMissingExtension = errors.New("proto: missing extension")
+
+// ExtensionRange represents a range of message extensions for a protocol buffer.
+// Used in code generated by the protocol compiler.
+type ExtensionRange struct {
+ Start, End int32 // both inclusive
+}
+
+// extendableProto is an interface implemented by any protocol buffer generated by the current
+// proto compiler that may be extended.
+type extendableProto interface {
+ Message
+ ExtensionRangeArray() []ExtensionRange
+ extensionsWrite() map[int32]Extension
+ extensionsRead() (map[int32]Extension, sync.Locker)
+}
+
+// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous
+// version of the proto compiler that may be extended.
+type extendableProtoV1 interface {
+ Message
+ ExtensionRangeArray() []ExtensionRange
+ ExtensionMap() map[int32]Extension
+}
+
+// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto.
+type extensionAdapter struct {
+ extendableProtoV1
+}
+
+func (e extensionAdapter) extensionsWrite() map[int32]Extension {
+ return e.ExtensionMap()
+}
+
+func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) {
+ return e.ExtensionMap(), notLocker{}
+}
+
+// notLocker is a sync.Locker whose Lock and Unlock methods are nops.
+type notLocker struct{}
+
+func (n notLocker) Lock() {}
+func (n notLocker) Unlock() {}
+
+// extendable returns the extendableProto interface for the given generated proto message.
+// If the proto message has the old extension format, it returns a wrapper that implements
+// the extendableProto interface.
+func extendable(p interface{}) (extendableProto, error) {
+ switch p := p.(type) {
+ case extendableProto:
+ if isNilPtr(p) {
+ return nil, fmt.Errorf("proto: nil %T is not extendable", p)
+ }
+ return p, nil
+ case extendableProtoV1:
+ if isNilPtr(p) {
+ return nil, fmt.Errorf("proto: nil %T is not extendable", p)
+ }
+ return extensionAdapter{p}, nil
+ }
+ // Don't allocate a specific error containing %T:
+ // this is the hot path for Clone and MarshalText.
+ return nil, errNotExtendable
+}
+
+var errNotExtendable = errors.New("proto: not an extendable proto.Message")
+
+func isNilPtr(x interface{}) bool {
+ v := reflect.ValueOf(x)
+ return v.Kind() == reflect.Ptr && v.IsNil()
+}
+
+// XXX_InternalExtensions is an internal representation of proto extensions.
+//
+// Each generated message struct type embeds an anonymous XXX_InternalExtensions field,
+// thus gaining the unexported 'extensions' method, which can be called only from the proto package.
+//
+// The methods of XXX_InternalExtensions are not concurrency safe in general,
+// but calls to logically read-only methods such as has and get may be executed concurrently.
+type XXX_InternalExtensions struct {
+ // The struct must be indirect so that if a user inadvertently copies a
+ // generated message and its embedded XXX_InternalExtensions, they
+ // avoid the mayhem of a copied mutex.
+ //
+ // The mutex serializes all logically read-only operations to p.extensionMap.
+ // It is up to the client to ensure that write operations to p.extensionMap are
+ // mutually exclusive with other accesses.
+ p *struct {
+ mu sync.Mutex
+ extensionMap map[int32]Extension
+ }
+}
+
+// extensionsWrite returns the extension map, creating it on first use.
+func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension {
+ if e.p == nil {
+ e.p = new(struct {
+ mu sync.Mutex
+ extensionMap map[int32]Extension
+ })
+ e.p.extensionMap = make(map[int32]Extension)
+ }
+ return e.p.extensionMap
+}
+
+// extensionsRead returns the extensions map for read-only use. It may be nil.
+// The caller must hold the returned mutex's lock when accessing Elements within the map.
+func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) {
+ if e.p == nil {
+ return nil, nil
+ }
+ return e.p.extensionMap, &e.p.mu
+}
+
+// ExtensionDesc represents an extension specification.
+// Used in generated code from the protocol compiler.
+type ExtensionDesc struct {
+ ExtendedType Message // nil pointer to the type that is being extended
+ ExtensionType interface{} // nil pointer to the extension type
+ Field int32 // field number
+ Name string // fully-qualified name of extension, for text formatting
+ Tag string // protobuf tag style
+ Filename string // name of the file in which the extension is defined
+}
+
+func (ed *ExtensionDesc) repeated() bool {
+ t := reflect.TypeOf(ed.ExtensionType)
+ return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
+}
+
+// Extension represents an extension in a message.
+type Extension struct {
+ // When an extension is stored in a message using SetExtension
+ // only desc and value are set. When the message is marshaled
+ // enc will be set to the encoded form of the message.
+ //
+ // When a message is unmarshaled and contains extensions, each
+ // extension will have only enc set. When such an extension is
+ // accessed using GetExtension (or GetExtensions) desc and value
+ // will be set.
+ desc *ExtensionDesc
+ value interface{}
+ enc []byte
+}
+
+// SetRawExtension is for testing only.
+func SetRawExtension(base Message, id int32, b []byte) {
+ epb, err := extendable(base)
+ if err != nil {
+ return
+ }
+ extmap := epb.extensionsWrite()
+ extmap[id] = Extension{enc: b}
+}
+
+// isExtensionField returns true iff the given field number is in an extension range.
+func isExtensionField(pb extendableProto, field int32) bool {
+ for _, er := range pb.ExtensionRangeArray() {
+ if er.Start <= field && field <= er.End {
+ return true
+ }
+ }
+ return false
+}
+
+// checkExtensionTypes checks that the given extension is valid for pb.
+func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error {
+ var pbi interface{} = pb
+ // Check the extended type.
+ if ea, ok := pbi.(extensionAdapter); ok {
+ pbi = ea.extendableProtoV1
+ }
+ if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
+ return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a)
+ }
+ // Check the range.
+ if !isExtensionField(pb, extension.Field) {
+ return errors.New("proto: bad extension number; not in declared ranges")
+ }
+ return nil
+}
+
+// extPropKey is sufficient to uniquely identify an extension.
+type extPropKey struct {
+ base reflect.Type
+ field int32
+}
+
+var extProp = struct {
+ sync.RWMutex
+ m map[extPropKey]*Properties
+}{
+ m: make(map[extPropKey]*Properties),
+}
+
+func extensionProperties(ed *ExtensionDesc) *Properties {
+ key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field}
+
+ extProp.RLock()
+ if prop, ok := extProp.m[key]; ok {
+ extProp.RUnlock()
+ return prop
+ }
+ extProp.RUnlock()
+
+ extProp.Lock()
+ defer extProp.Unlock()
+ // Check again.
+ if prop, ok := extProp.m[key]; ok {
+ return prop
+ }
+
+ prop := new(Properties)
+ prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil)
+ extProp.m[key] = prop
+ return prop
+}
+
+// HasExtension returns whether the given extension is present in pb.
+func HasExtension(pb Message, extension *ExtensionDesc) bool {
+ // TODO: Check types, field numbers, etc.?
+ epb, err := extendable(pb)
+ if err != nil {
+ return false
+ }
+ extmap, mu := epb.extensionsRead()
+ if extmap == nil {
+ return false
+ }
+ mu.Lock()
+ _, ok := extmap[extension.Field]
+ mu.Unlock()
+ return ok
+}
+
+// ClearExtension removes the given extension from pb.
+func ClearExtension(pb Message, extension *ExtensionDesc) {
+ epb, err := extendable(pb)
+ if err != nil {
+ return
+ }
+ // TODO: Check types, field numbers, etc.?
+ extmap := epb.extensionsWrite()
+ delete(extmap, extension.Field)
+}
+
+// GetExtension retrieves a proto2 extended field from pb.
+//
+// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),
+// then GetExtension parses the encoded field and returns a Go value of the specified type.
+// If the field is not present, then the default value is returned (if one is specified),
+// otherwise ErrMissingExtension is reported.
+//
+// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil),
+// then GetExtension returns the raw encoded bytes of the field extension.
+func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
+ epb, err := extendable(pb)
+ if err != nil {
+ return nil, err
+ }
+
+ if extension.ExtendedType != nil {
+ // can only check type if this is a complete descriptor
+ if err := checkExtensionTypes(epb, extension); err != nil {
+ return nil, err
+ }
+ }
+
+ emap, mu := epb.extensionsRead()
+ if emap == nil {
+ return defaultExtensionValue(extension)
+ }
+ mu.Lock()
+ defer mu.Unlock()
+ e, ok := emap[extension.Field]
+ if !ok {
+ // defaultExtensionValue returns the default value or
+ // ErrMissingExtension if there is no default.
+ return defaultExtensionValue(extension)
+ }
+
+ if e.value != nil {
+ // Already decoded. Check the descriptor, though.
+ if e.desc != extension {
+ // This shouldn't happen. If it does, it means that
+ // GetExtension was called twice with two different
+ // descriptors with the same field number.
+ return nil, errors.New("proto: descriptor conflict")
+ }
+ return e.value, nil
+ }
+
+ if extension.ExtensionType == nil {
+ // incomplete descriptor
+ return e.enc, nil
+ }
+
+ v, err := decodeExtension(e.enc, extension)
+ if err != nil {
+ return nil, err
+ }
+
+ // Remember the decoded version and drop the encoded version.
+ // That way it is safe to mutate what we return.
+ e.value = v
+ e.desc = extension
+ e.enc = nil
+ emap[extension.Field] = e
+ return e.value, nil
+}
+
+// defaultExtensionValue returns the default value for extension.
+// If no default for an extension is defined ErrMissingExtension is returned.
+func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) {
+ if extension.ExtensionType == nil {
+ // incomplete descriptor, so no default
+ return nil, ErrMissingExtension
+ }
+
+ t := reflect.TypeOf(extension.ExtensionType)
+ props := extensionProperties(extension)
+
+ sf, _, err := fieldDefault(t, props)
+ if err != nil {
+ return nil, err
+ }
+
+ if sf == nil || sf.value == nil {
+ // There is no default value.
+ return nil, ErrMissingExtension
+ }
+
+ if t.Kind() != reflect.Ptr {
+ // We do not need to return a Ptr, we can directly return sf.value.
+ return sf.value, nil
+ }
+
+ // We need to return an interface{} that is a pointer to sf.value.
+ value := reflect.New(t).Elem()
+ value.Set(reflect.New(value.Type().Elem()))
+ if sf.kind == reflect.Int32 {
+ // We may have an int32 or an enum, but the underlying data is int32.
+ // Since we can't set an int32 into a non int32 reflect.value directly
+ // set it as a int32.
+ value.Elem().SetInt(int64(sf.value.(int32)))
+ } else {
+ value.Elem().Set(reflect.ValueOf(sf.value))
+ }
+ return value.Interface(), nil
+}
+
+// decodeExtension decodes an extension encoded in b.
+func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) {
+ t := reflect.TypeOf(extension.ExtensionType)
+ unmarshal := typeUnmarshaler(t, extension.Tag)
+
+ // t is a pointer to a struct, pointer to basic type or a slice.
+ // Allocate space to store the pointer/slice.
+ value := reflect.New(t).Elem()
+
+ var err error
+ for {
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ wire := int(x) & 7
+
+ b, err = unmarshal(b, valToPointer(value.Addr()), wire)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(b) == 0 {
+ break
+ }
+ }
+ return value.Interface(), nil
+}
+
+// GetExtensions returns a slice of the extensions present in pb that are also listed in es.
+// The returned slice has the same length as es; missing extensions will appear as nil elements.
+func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) {
+ epb, err := extendable(pb)
+ if err != nil {
+ return nil, err
+ }
+ extensions = make([]interface{}, len(es))
+ for i, e := range es {
+ extensions[i], err = GetExtension(epb, e)
+ if err == ErrMissingExtension {
+ err = nil
+ }
+ if err != nil {
+ return
+ }
+ }
+ return
+}
+
+// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order.
+// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing
+// just the Field field, which defines the extension's field number.
+func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
+ epb, err := extendable(pb)
+ if err != nil {
+ return nil, err
+ }
+ registeredExtensions := RegisteredExtensions(pb)
+
+ emap, mu := epb.extensionsRead()
+ if emap == nil {
+ return nil, nil
+ }
+ mu.Lock()
+ defer mu.Unlock()
+ extensions := make([]*ExtensionDesc, 0, len(emap))
+ for extid, e := range emap {
+ desc := e.desc
+ if desc == nil {
+ desc = registeredExtensions[extid]
+ if desc == nil {
+ desc = &ExtensionDesc{Field: extid}
+ }
+ }
+
+ extensions = append(extensions, desc)
+ }
+ return extensions, nil
+}
+
+// SetExtension sets the specified extension of pb to the specified value.
+func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error {
+ epb, err := extendable(pb)
+ if err != nil {
+ return err
+ }
+ if err := checkExtensionTypes(epb, extension); err != nil {
+ return err
+ }
+ typ := reflect.TypeOf(extension.ExtensionType)
+ if typ != reflect.TypeOf(value) {
+ return errors.New("proto: bad extension value type")
+ }
+ // nil extension values need to be caught early, because the
+ // encoder can't distinguish an ErrNil due to a nil extension
+ // from an ErrNil due to a missing field. Extensions are
+ // always optional, so the encoder would just swallow the error
+ // and drop all the extensions from the encoded message.
+ if reflect.ValueOf(value).IsNil() {
+ return fmt.Errorf("proto: SetExtension called with nil value of type %T", value)
+ }
+
+ extmap := epb.extensionsWrite()
+ extmap[extension.Field] = Extension{desc: extension, value: value}
+ return nil
+}
+
+// ClearAllExtensions clears all extensions from pb.
+func ClearAllExtensions(pb Message) {
+ epb, err := extendable(pb)
+ if err != nil {
+ return
+ }
+ m := epb.extensionsWrite()
+ for k := range m {
+ delete(m, k)
+ }
+}
+
+// A global registry of extensions.
+// The generated code will register the generated descriptors by calling RegisterExtension.
+
+var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc)
+
+// RegisterExtension is called from the generated code.
+func RegisterExtension(desc *ExtensionDesc) {
+ st := reflect.TypeOf(desc.ExtendedType).Elem()
+ m := extensionMaps[st]
+ if m == nil {
+ m = make(map[int32]*ExtensionDesc)
+ extensionMaps[st] = m
+ }
+ if _, ok := m[desc.Field]; ok {
+ panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field)))
+ }
+ m[desc.Field] = desc
+}
+
+// RegisteredExtensions returns a map of the registered extensions of a
+// protocol buffer struct, indexed by the extension number.
+// The argument pb should be a nil pointer to the struct type.
+func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc {
+ return extensionMaps[reflect.TypeOf(pb).Elem()]
+}
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
new file mode 100644
index 00000000..75565cc6
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/lib.go
@@ -0,0 +1,979 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Package proto converts data structures to and from the wire format of
+protocol buffers. It works in concert with the Go source code generated
+for .proto files by the protocol compiler.
+
+A summary of the properties of the protocol buffer interface
+for a protocol buffer variable v:
+
+ - Names are turned from camel_case to CamelCase for export.
+ - There are no methods on v to set fields; just treat
+ them as structure fields.
+ - There are getters that return a field's value if set,
+ and return the field's default value if unset.
+ The getters work even if the receiver is a nil message.
+ - The zero value for a struct is its correct initialization state.
+ All desired fields must be set before marshaling.
+ - A Reset() method will restore a protobuf struct to its zero state.
+ - Non-repeated fields are pointers to the values; nil means unset.
+ That is, optional or required field int32 f becomes F *int32.
+ - Repeated fields are slices.
+ - Helper functions are available to aid the setting of fields.
+ msg.Foo = proto.String("hello") // set field
+ - Constants are defined to hold the default values of all fields that
+ have them. They have the form Default_StructName_FieldName.
+ Because the getter methods handle defaulted values,
+ direct use of these constants should be rare.
+ - Enums are given type names and maps from names to values.
+ Enum values are prefixed by the enclosing message's name, or by the
+ enum's type name if it is a top-level enum. Enum types have a String
+ method, and a Enum method to assist in message construction.
+ - Nested messages, groups and enums have type names prefixed with the name of
+ the surrounding message type.
+ - Extensions are given descriptor names that start with E_,
+ followed by an underscore-delimited list of the nested messages
+ that contain it (if any) followed by the CamelCased name of the
+ extension field itself. HasExtension, ClearExtension, GetExtension
+ and SetExtension are functions for manipulating extensions.
+ - Oneof field sets are given a single field in their message,
+ with distinguished wrapper types for each possible field value.
+ - Marshal and Unmarshal are functions to encode and decode the wire format.
+
+When the .proto file specifies `syntax="proto3"`, there are some differences:
+
+ - Non-repeated fields of non-message type are values instead of pointers.
+ - Enum types do not get an Enum method.
+
+The simplest way to describe this is to see an example.
+Given file test.proto, containing
+
+ package example;
+
+ enum FOO { X = 17; }
+
+ message Test {
+ required string label = 1;
+ optional int32 type = 2 [default=77];
+ repeated int64 reps = 3;
+ optional group OptionalGroup = 4 {
+ required string RequiredField = 5;
+ }
+ oneof union {
+ int32 number = 6;
+ string name = 7;
+ }
+ }
+
+The resulting file, test.pb.go, is:
+
+ package example
+
+ import proto "github.com/golang/protobuf/proto"
+ import math "math"
+
+ type FOO int32
+ const (
+ FOO_X FOO = 17
+ )
+ var FOO_name = map[int32]string{
+ 17: "X",
+ }
+ var FOO_value = map[string]int32{
+ "X": 17,
+ }
+
+ func (x FOO) Enum() *FOO {
+ p := new(FOO)
+ *p = x
+ return p
+ }
+ func (x FOO) String() string {
+ return proto.EnumName(FOO_name, int32(x))
+ }
+ func (x *FOO) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(FOO_value, data)
+ if err != nil {
+ return err
+ }
+ *x = FOO(value)
+ return nil
+ }
+
+ type Test struct {
+ Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
+ Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"`
+ Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"`
+ Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
+ // Types that are valid to be assigned to Union:
+ // *Test_Number
+ // *Test_Name
+ Union isTest_Union `protobuf_oneof:"union"`
+ XXX_unrecognized []byte `json:"-"`
+ }
+ func (m *Test) Reset() { *m = Test{} }
+ func (m *Test) String() string { return proto.CompactTextString(m) }
+ func (*Test) ProtoMessage() {}
+
+ type isTest_Union interface {
+ isTest_Union()
+ }
+
+ type Test_Number struct {
+ Number int32 `protobuf:"varint,6,opt,name=number"`
+ }
+ type Test_Name struct {
+ Name string `protobuf:"bytes,7,opt,name=name"`
+ }
+
+ func (*Test_Number) isTest_Union() {}
+ func (*Test_Name) isTest_Union() {}
+
+ func (m *Test) GetUnion() isTest_Union {
+ if m != nil {
+ return m.Union
+ }
+ return nil
+ }
+ const Default_Test_Type int32 = 77
+
+ func (m *Test) GetLabel() string {
+ if m != nil && m.Label != nil {
+ return *m.Label
+ }
+ return ""
+ }
+
+ func (m *Test) GetType() int32 {
+ if m != nil && m.Type != nil {
+ return *m.Type
+ }
+ return Default_Test_Type
+ }
+
+ func (m *Test) GetOptionalgroup() *Test_OptionalGroup {
+ if m != nil {
+ return m.Optionalgroup
+ }
+ return nil
+ }
+
+ type Test_OptionalGroup struct {
+ RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"`
+ }
+ func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} }
+ func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) }
+
+ func (m *Test_OptionalGroup) GetRequiredField() string {
+ if m != nil && m.RequiredField != nil {
+ return *m.RequiredField
+ }
+ return ""
+ }
+
+ func (m *Test) GetNumber() int32 {
+ if x, ok := m.GetUnion().(*Test_Number); ok {
+ return x.Number
+ }
+ return 0
+ }
+
+ func (m *Test) GetName() string {
+ if x, ok := m.GetUnion().(*Test_Name); ok {
+ return x.Name
+ }
+ return ""
+ }
+
+ func init() {
+ proto.RegisterEnum("example.FOO", FOO_name, FOO_value)
+ }
+
+To create and play with a Test object:
+
+ package main
+
+ import (
+ "log"
+
+ "github.com/golang/protobuf/proto"
+ pb "./example.pb"
+ )
+
+ func main() {
+ test := &pb.Test{
+ Label: proto.String("hello"),
+ Type: proto.Int32(17),
+ Reps: []int64{1, 2, 3},
+ Optionalgroup: &pb.Test_OptionalGroup{
+ RequiredField: proto.String("good bye"),
+ },
+ Union: &pb.Test_Name{"fred"},
+ }
+ data, err := proto.Marshal(test)
+ if err != nil {
+ log.Fatal("marshaling error: ", err)
+ }
+ newTest := &pb.Test{}
+ err = proto.Unmarshal(data, newTest)
+ if err != nil {
+ log.Fatal("unmarshaling error: ", err)
+ }
+ // Now test and newTest contain the same data.
+ if test.GetLabel() != newTest.GetLabel() {
+ log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
+ }
+ // Use a type switch to determine which oneof was set.
+ switch u := test.Union.(type) {
+ case *pb.Test_Number: // u.Number contains the number.
+ case *pb.Test_Name: // u.Name contains the string.
+ }
+ // etc.
+ }
+*/
+package proto
+
+import (
+ "encoding/json"
+ "fmt"
+ "log"
+ "reflect"
+ "sort"
+ "strconv"
+ "sync"
+)
+
+// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
+// Marshal reports this when a required field is not initialized.
+// Unmarshal reports this when a required field is missing from the wire data.
+type RequiredNotSetError struct{ field string }
+
+func (e *RequiredNotSetError) Error() string {
+ if e.field == "" {
+ return fmt.Sprintf("proto: required field not set")
+ }
+ return fmt.Sprintf("proto: required field %q not set", e.field)
+}
+func (e *RequiredNotSetError) RequiredNotSet() bool {
+ return true
+}
+
+type invalidUTF8Error struct{ field string }
+
+func (e *invalidUTF8Error) Error() string {
+ if e.field == "" {
+ return "proto: invalid UTF-8 detected"
+ }
+ return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field)
+}
+func (e *invalidUTF8Error) InvalidUTF8() bool {
+ return true
+}
+
+// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8.
+// This error should not be exposed to the external API as such errors should
+// be recreated with the field information.
+var errInvalidUTF8 = &invalidUTF8Error{}
+
+// isNonFatal reports whether the error is either a RequiredNotSet error
+// or a InvalidUTF8 error.
+func isNonFatal(err error) bool {
+ if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() {
+ return true
+ }
+ if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() {
+ return true
+ }
+ return false
+}
+
+type nonFatal struct{ E error }
+
+// Merge merges err into nf and reports whether it was successful.
+// Otherwise it returns false for any fatal non-nil errors.
+func (nf *nonFatal) Merge(err error) (ok bool) {
+ if err == nil {
+ return true // not an error
+ }
+ if !isNonFatal(err) {
+ return false // fatal error
+ }
+ if nf.E == nil {
+ nf.E = err // store first instance of non-fatal error
+ }
+ return true
+}
+
+// Message is implemented by generated protocol buffer messages.
+type Message interface {
+ Reset()
+ String() string
+ ProtoMessage()
+}
+
+// Stats records allocation details about the protocol buffer encoders
+// and decoders. Useful for tuning the library itself.
+type Stats struct {
+ Emalloc uint64 // mallocs in encode
+ Dmalloc uint64 // mallocs in decode
+ Encode uint64 // number of encodes
+ Decode uint64 // number of decodes
+ Chit uint64 // number of cache hits
+ Cmiss uint64 // number of cache misses
+ Size uint64 // number of sizes
+}
+
+// Set to true to enable stats collection.
+const collectStats = false
+
+var stats Stats
+
+// GetStats returns a copy of the global Stats structure.
+func GetStats() Stats { return stats }
+
+// A Buffer is a buffer manager for marshaling and unmarshaling
+// protocol buffers. It may be reused between invocations to
+// reduce memory usage. It is not necessary to use a Buffer;
+// the global functions Marshal and Unmarshal create a
+// temporary Buffer and are fine for most applications.
+type Buffer struct {
+ buf []byte // encode/decode byte stream
+ index int // read point
+
+ deterministic bool
+}
+
+// NewBuffer allocates a new Buffer and initializes its internal data to
+// the contents of the argument slice.
+func NewBuffer(e []byte) *Buffer {
+ return &Buffer{buf: e}
+}
+
+// Reset resets the Buffer, ready for marshaling a new protocol buffer.
+func (p *Buffer) Reset() {
+ p.buf = p.buf[0:0] // for reading/writing
+ p.index = 0 // for reading
+}
+
+// SetBuf replaces the internal buffer with the slice,
+// ready for unmarshaling the contents of the slice.
+func (p *Buffer) SetBuf(s []byte) {
+ p.buf = s
+ p.index = 0
+}
+
+// Bytes returns the contents of the Buffer.
+func (p *Buffer) Bytes() []byte { return p.buf }
+
+// SetDeterministic sets whether to use deterministic serialization.
+//
+// Deterministic serialization guarantees that for a given binary, equal
+// messages will always be serialized to the same bytes. This implies:
+//
+// - Repeated serialization of a message will return the same bytes.
+// - Different processes of the same binary (which may be executing on
+// different machines) will serialize equal messages to the same bytes.
+//
+// Note that the deterministic serialization is NOT canonical across
+// languages. It is not guaranteed to remain stable over time. It is unstable
+// across different builds with schema changes due to unknown fields.
+// Users who need canonical serialization (e.g., persistent storage in a
+// canonical form, fingerprinting, etc.) should define their own
+// canonicalization specification and implement their own serializer rather
+// than relying on this API.
+//
+// If deterministic serialization is requested, map entries will be sorted
+// by keys in lexographical order. This is an implementation detail and
+// subject to change.
+func (p *Buffer) SetDeterministic(deterministic bool) {
+ p.deterministic = deterministic
+}
+
+/*
+ * Helper routines for simplifying the creation of optional fields of basic type.
+ */
+
+// Bool is a helper routine that allocates a new bool value
+// to store v and returns a pointer to it.
+func Bool(v bool) *bool {
+ return &v
+}
+
+// Int32 is a helper routine that allocates a new int32 value
+// to store v and returns a pointer to it.
+func Int32(v int32) *int32 {
+ return &v
+}
+
+// Int is a helper routine that allocates a new int32 value
+// to store v and returns a pointer to it, but unlike Int32
+// its argument value is an int.
+func Int(v int) *int32 {
+ p := new(int32)
+ *p = int32(v)
+ return p
+}
+
+// Int64 is a helper routine that allocates a new int64 value
+// to store v and returns a pointer to it.
+func Int64(v int64) *int64 {
+ return &v
+}
+
+// Float32 is a helper routine that allocates a new float32 value
+// to store v and returns a pointer to it.
+func Float32(v float32) *float32 {
+ return &v
+}
+
+// Float64 is a helper routine that allocates a new float64 value
+// to store v and returns a pointer to it.
+func Float64(v float64) *float64 {
+ return &v
+}
+
+// Uint32 is a helper routine that allocates a new uint32 value
+// to store v and returns a pointer to it.
+func Uint32(v uint32) *uint32 {
+ return &v
+}
+
+// Uint64 is a helper routine that allocates a new uint64 value
+// to store v and returns a pointer to it.
+func Uint64(v uint64) *uint64 {
+ return &v
+}
+
+// String is a helper routine that allocates a new string value
+// to store v and returns a pointer to it.
+func String(v string) *string {
+ return &v
+}
+
+// EnumName is a helper function to simplify printing protocol buffer enums
+// by name. Given an enum map and a value, it returns a useful string.
+func EnumName(m map[int32]string, v int32) string {
+ s, ok := m[v]
+ if ok {
+ return s
+ }
+ return strconv.Itoa(int(v))
+}
+
+// UnmarshalJSONEnum is a helper function to simplify recovering enum int values
+// from their JSON-encoded representation. Given a map from the enum's symbolic
+// names to its int values, and a byte buffer containing the JSON-encoded
+// value, it returns an int32 that can be cast to the enum type by the caller.
+//
+// The function can deal with both JSON representations, numeric and symbolic.
+func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {
+ if data[0] == '"' {
+ // New style: enums are strings.
+ var repr string
+ if err := json.Unmarshal(data, &repr); err != nil {
+ return -1, err
+ }
+ val, ok := m[repr]
+ if !ok {
+ return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr)
+ }
+ return val, nil
+ }
+ // Old style: enums are ints.
+ var val int32
+ if err := json.Unmarshal(data, &val); err != nil {
+ return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName)
+ }
+ return val, nil
+}
+
+// DebugPrint dumps the encoded data in b in a debugging format with a header
+// including the string s. Used in testing but made available for general debugging.
+func (p *Buffer) DebugPrint(s string, b []byte) {
+ var u uint64
+
+ obuf := p.buf
+ index := p.index
+ p.buf = b
+ p.index = 0
+ depth := 0
+
+ fmt.Printf("\n--- %s ---\n", s)
+
+out:
+ for {
+ for i := 0; i < depth; i++ {
+ fmt.Print(" ")
+ }
+
+ index := p.index
+ if index == len(p.buf) {
+ break
+ }
+
+ op, err := p.DecodeVarint()
+ if err != nil {
+ fmt.Printf("%3d: fetching op err %v\n", index, err)
+ break out
+ }
+ tag := op >> 3
+ wire := op & 7
+
+ switch wire {
+ default:
+ fmt.Printf("%3d: t=%3d unknown wire=%d\n",
+ index, tag, wire)
+ break out
+
+ case WireBytes:
+ var r []byte
+
+ r, err = p.DecodeRawBytes(false)
+ if err != nil {
+ break out
+ }
+ fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r))
+ if len(r) <= 6 {
+ for i := 0; i < len(r); i++ {
+ fmt.Printf(" %.2x", r[i])
+ }
+ } else {
+ for i := 0; i < 3; i++ {
+ fmt.Printf(" %.2x", r[i])
+ }
+ fmt.Printf(" ..")
+ for i := len(r) - 3; i < len(r); i++ {
+ fmt.Printf(" %.2x", r[i])
+ }
+ }
+ fmt.Printf("\n")
+
+ case WireFixed32:
+ u, err = p.DecodeFixed32()
+ if err != nil {
+ fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err)
+ break out
+ }
+ fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u)
+
+ case WireFixed64:
+ u, err = p.DecodeFixed64()
+ if err != nil {
+ fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err)
+ break out
+ }
+ fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u)
+
+ case WireVarint:
+ u, err = p.DecodeVarint()
+ if err != nil {
+ fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err)
+ break out
+ }
+ fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u)
+
+ case WireStartGroup:
+ fmt.Printf("%3d: t=%3d start\n", index, tag)
+ depth++
+
+ case WireEndGroup:
+ depth--
+ fmt.Printf("%3d: t=%3d end\n", index, tag)
+ }
+ }
+
+ if depth != 0 {
+ fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth)
+ }
+ fmt.Printf("\n")
+
+ p.buf = obuf
+ p.index = index
+}
+
+// SetDefaults sets unset protocol buffer fields to their default values.
+// It only modifies fields that are both unset and have defined defaults.
+// It recursively sets default values in any non-nil sub-messages.
+func SetDefaults(pb Message) {
+ setDefaults(reflect.ValueOf(pb), true, false)
+}
+
+// v is a pointer to a struct.
+func setDefaults(v reflect.Value, recur, zeros bool) {
+ v = v.Elem()
+
+ defaultMu.RLock()
+ dm, ok := defaults[v.Type()]
+ defaultMu.RUnlock()
+ if !ok {
+ dm = buildDefaultMessage(v.Type())
+ defaultMu.Lock()
+ defaults[v.Type()] = dm
+ defaultMu.Unlock()
+ }
+
+ for _, sf := range dm.scalars {
+ f := v.Field(sf.index)
+ if !f.IsNil() {
+ // field already set
+ continue
+ }
+ dv := sf.value
+ if dv == nil && !zeros {
+ // no explicit default, and don't want to set zeros
+ continue
+ }
+ fptr := f.Addr().Interface() // **T
+ // TODO: Consider batching the allocations we do here.
+ switch sf.kind {
+ case reflect.Bool:
+ b := new(bool)
+ if dv != nil {
+ *b = dv.(bool)
+ }
+ *(fptr.(**bool)) = b
+ case reflect.Float32:
+ f := new(float32)
+ if dv != nil {
+ *f = dv.(float32)
+ }
+ *(fptr.(**float32)) = f
+ case reflect.Float64:
+ f := new(float64)
+ if dv != nil {
+ *f = dv.(float64)
+ }
+ *(fptr.(**float64)) = f
+ case reflect.Int32:
+ // might be an enum
+ if ft := f.Type(); ft != int32PtrType {
+ // enum
+ f.Set(reflect.New(ft.Elem()))
+ if dv != nil {
+ f.Elem().SetInt(int64(dv.(int32)))
+ }
+ } else {
+ // int32 field
+ i := new(int32)
+ if dv != nil {
+ *i = dv.(int32)
+ }
+ *(fptr.(**int32)) = i
+ }
+ case reflect.Int64:
+ i := new(int64)
+ if dv != nil {
+ *i = dv.(int64)
+ }
+ *(fptr.(**int64)) = i
+ case reflect.String:
+ s := new(string)
+ if dv != nil {
+ *s = dv.(string)
+ }
+ *(fptr.(**string)) = s
+ case reflect.Uint8:
+ // exceptional case: []byte
+ var b []byte
+ if dv != nil {
+ db := dv.([]byte)
+ b = make([]byte, len(db))
+ copy(b, db)
+ } else {
+ b = []byte{}
+ }
+ *(fptr.(*[]byte)) = b
+ case reflect.Uint32:
+ u := new(uint32)
+ if dv != nil {
+ *u = dv.(uint32)
+ }
+ *(fptr.(**uint32)) = u
+ case reflect.Uint64:
+ u := new(uint64)
+ if dv != nil {
+ *u = dv.(uint64)
+ }
+ *(fptr.(**uint64)) = u
+ default:
+ log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind)
+ }
+ }
+
+ for _, ni := range dm.nested {
+ f := v.Field(ni)
+ // f is *T or []*T or map[T]*T
+ switch f.Kind() {
+ case reflect.Ptr:
+ if f.IsNil() {
+ continue
+ }
+ setDefaults(f, recur, zeros)
+
+ case reflect.Slice:
+ for i := 0; i < f.Len(); i++ {
+ e := f.Index(i)
+ if e.IsNil() {
+ continue
+ }
+ setDefaults(e, recur, zeros)
+ }
+
+ case reflect.Map:
+ for _, k := range f.MapKeys() {
+ e := f.MapIndex(k)
+ if e.IsNil() {
+ continue
+ }
+ setDefaults(e, recur, zeros)
+ }
+ }
+ }
+}
+
+var (
+ // defaults maps a protocol buffer struct type to a slice of the fields,
+ // with its scalar fields set to their proto-declared non-zero default values.
+ defaultMu sync.RWMutex
+ defaults = make(map[reflect.Type]defaultMessage)
+
+ int32PtrType = reflect.TypeOf((*int32)(nil))
+)
+
+// defaultMessage represents information about the default values of a message.
+type defaultMessage struct {
+ scalars []scalarField
+ nested []int // struct field index of nested messages
+}
+
+type scalarField struct {
+ index int // struct field index
+ kind reflect.Kind // element type (the T in *T or []T)
+ value interface{} // the proto-declared default value, or nil
+}
+
+// t is a struct type.
+func buildDefaultMessage(t reflect.Type) (dm defaultMessage) {
+ sprop := GetProperties(t)
+ for _, prop := range sprop.Prop {
+ fi, ok := sprop.decoderTags.get(prop.Tag)
+ if !ok {
+ // XXX_unrecognized
+ continue
+ }
+ ft := t.Field(fi).Type
+
+ sf, nested, err := fieldDefault(ft, prop)
+ switch {
+ case err != nil:
+ log.Print(err)
+ case nested:
+ dm.nested = append(dm.nested, fi)
+ case sf != nil:
+ sf.index = fi
+ dm.scalars = append(dm.scalars, *sf)
+ }
+ }
+
+ return dm
+}
+
+// fieldDefault returns the scalarField for field type ft.
+// sf will be nil if the field can not have a default.
+// nestedMessage will be true if this is a nested message.
+// Note that sf.index is not set on return.
+func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) {
+ var canHaveDefault bool
+ switch ft.Kind() {
+ case reflect.Ptr:
+ if ft.Elem().Kind() == reflect.Struct {
+ nestedMessage = true
+ } else {
+ canHaveDefault = true // proto2 scalar field
+ }
+
+ case reflect.Slice:
+ switch ft.Elem().Kind() {
+ case reflect.Ptr:
+ nestedMessage = true // repeated message
+ case reflect.Uint8:
+ canHaveDefault = true // bytes field
+ }
+
+ case reflect.Map:
+ if ft.Elem().Kind() == reflect.Ptr {
+ nestedMessage = true // map with message values
+ }
+ }
+
+ if !canHaveDefault {
+ if nestedMessage {
+ return nil, true, nil
+ }
+ return nil, false, nil
+ }
+
+ // We now know that ft is a pointer or slice.
+ sf = &scalarField{kind: ft.Elem().Kind()}
+
+ // scalar fields without defaults
+ if !prop.HasDefault {
+ return sf, false, nil
+ }
+
+ // a scalar field: either *T or []byte
+ switch ft.Elem().Kind() {
+ case reflect.Bool:
+ x, err := strconv.ParseBool(prop.Default)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err)
+ }
+ sf.value = x
+ case reflect.Float32:
+ x, err := strconv.ParseFloat(prop.Default, 32)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err)
+ }
+ sf.value = float32(x)
+ case reflect.Float64:
+ x, err := strconv.ParseFloat(prop.Default, 64)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err)
+ }
+ sf.value = x
+ case reflect.Int32:
+ x, err := strconv.ParseInt(prop.Default, 10, 32)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err)
+ }
+ sf.value = int32(x)
+ case reflect.Int64:
+ x, err := strconv.ParseInt(prop.Default, 10, 64)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err)
+ }
+ sf.value = x
+ case reflect.String:
+ sf.value = prop.Default
+ case reflect.Uint8:
+ // []byte (not *uint8)
+ sf.value = []byte(prop.Default)
+ case reflect.Uint32:
+ x, err := strconv.ParseUint(prop.Default, 10, 32)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err)
+ }
+ sf.value = uint32(x)
+ case reflect.Uint64:
+ x, err := strconv.ParseUint(prop.Default, 10, 64)
+ if err != nil {
+ return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err)
+ }
+ sf.value = x
+ default:
+ return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind())
+ }
+
+ return sf, false, nil
+}
+
+// mapKeys returns a sort.Interface to be used for sorting the map keys.
+// Map fields may have key types of non-float scalars, strings and enums.
+func mapKeys(vs []reflect.Value) sort.Interface {
+ s := mapKeySorter{vs: vs}
+
+ // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps.
+ if len(vs) == 0 {
+ return s
+ }
+ switch vs[0].Kind() {
+ case reflect.Int32, reflect.Int64:
+ s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() }
+ case reflect.Uint32, reflect.Uint64:
+ s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() }
+ case reflect.Bool:
+ s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true
+ case reflect.String:
+ s.less = func(a, b reflect.Value) bool { return a.String() < b.String() }
+ default:
+ panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind()))
+ }
+
+ return s
+}
+
+type mapKeySorter struct {
+ vs []reflect.Value
+ less func(a, b reflect.Value) bool
+}
+
+func (s mapKeySorter) Len() int { return len(s.vs) }
+func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] }
+func (s mapKeySorter) Less(i, j int) bool {
+ return s.less(s.vs[i], s.vs[j])
+}
+
+// isProto3Zero reports whether v is a zero proto3 value.
+func isProto3Zero(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Bool:
+ return !v.Bool()
+ case reflect.Int32, reflect.Int64:
+ return v.Int() == 0
+ case reflect.Uint32, reflect.Uint64:
+ return v.Uint() == 0
+ case reflect.Float32, reflect.Float64:
+ return v.Float() == 0
+ case reflect.String:
+ return v.String() == ""
+ }
+ return false
+}
+
+// ProtoPackageIsVersion2 is referenced from generated protocol buffer files
+// to assert that that code is compatible with this version of the proto package.
+const ProtoPackageIsVersion2 = true
+
+// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
+// to assert that that code is compatible with this version of the proto package.
+const ProtoPackageIsVersion1 = true
+
+// InternalMessageInfo is a type used internally by generated .pb.go files.
+// This type is not intended to be used by non-generated code.
+// This type is not subject to any compatibility guarantee.
+type InternalMessageInfo struct {
+ marshal *marshalInfo
+ unmarshal *unmarshalInfo
+ merge *mergeInfo
+ discard *discardInfo
+}
diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go
new file mode 100644
index 00000000..3b6ca41d
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/message_set.go
@@ -0,0 +1,314 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+/*
+ * Support for message sets.
+ */
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "reflect"
+ "sort"
+ "sync"
+)
+
+// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
+// A message type ID is required for storing a protocol buffer in a message set.
+var errNoMessageTypeID = errors.New("proto does not have a message type ID")
+
+// The first two types (_MessageSet_Item and messageSet)
+// model what the protocol compiler produces for the following protocol message:
+// message MessageSet {
+// repeated group Item = 1 {
+// required int32 type_id = 2;
+// required string message = 3;
+// };
+// }
+// That is the MessageSet wire format. We can't use a proto to generate these
+// because that would introduce a circular dependency between it and this package.
+
+type _MessageSet_Item struct {
+ TypeId *int32 `protobuf:"varint,2,req,name=type_id"`
+ Message []byte `protobuf:"bytes,3,req,name=message"`
+}
+
+type messageSet struct {
+ Item []*_MessageSet_Item `protobuf:"group,1,rep"`
+ XXX_unrecognized []byte
+ // TODO: caching?
+}
+
+// Make sure messageSet is a Message.
+var _ Message = (*messageSet)(nil)
+
+// messageTypeIder is an interface satisfied by a protocol buffer type
+// that may be stored in a MessageSet.
+type messageTypeIder interface {
+ MessageTypeId() int32
+}
+
+func (ms *messageSet) find(pb Message) *_MessageSet_Item {
+ mti, ok := pb.(messageTypeIder)
+ if !ok {
+ return nil
+ }
+ id := mti.MessageTypeId()
+ for _, item := range ms.Item {
+ if *item.TypeId == id {
+ return item
+ }
+ }
+ return nil
+}
+
+func (ms *messageSet) Has(pb Message) bool {
+ return ms.find(pb) != nil
+}
+
+func (ms *messageSet) Unmarshal(pb Message) error {
+ if item := ms.find(pb); item != nil {
+ return Unmarshal(item.Message, pb)
+ }
+ if _, ok := pb.(messageTypeIder); !ok {
+ return errNoMessageTypeID
+ }
+ return nil // TODO: return error instead?
+}
+
+func (ms *messageSet) Marshal(pb Message) error {
+ msg, err := Marshal(pb)
+ if err != nil {
+ return err
+ }
+ if item := ms.find(pb); item != nil {
+ // reuse existing item
+ item.Message = msg
+ return nil
+ }
+
+ mti, ok := pb.(messageTypeIder)
+ if !ok {
+ return errNoMessageTypeID
+ }
+
+ mtid := mti.MessageTypeId()
+ ms.Item = append(ms.Item, &_MessageSet_Item{
+ TypeId: &mtid,
+ Message: msg,
+ })
+ return nil
+}
+
+func (ms *messageSet) Reset() { *ms = messageSet{} }
+func (ms *messageSet) String() string { return CompactTextString(ms) }
+func (*messageSet) ProtoMessage() {}
+
+// Support for the message_set_wire_format message option.
+
+func skipVarint(buf []byte) []byte {
+ i := 0
+ for ; buf[i]&0x80 != 0; i++ {
+ }
+ return buf[i+1:]
+}
+
+// MarshalMessageSet encodes the extension map represented by m in the message set wire format.
+// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
+func MarshalMessageSet(exts interface{}) ([]byte, error) {
+ return marshalMessageSet(exts, false)
+}
+
+// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal.
+func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) {
+ switch exts := exts.(type) {
+ case *XXX_InternalExtensions:
+ var u marshalInfo
+ siz := u.sizeMessageSet(exts)
+ b := make([]byte, 0, siz)
+ return u.appendMessageSet(b, exts, deterministic)
+
+ case map[int32]Extension:
+ // This is an old-style extension map.
+ // Wrap it in a new-style XXX_InternalExtensions.
+ ie := XXX_InternalExtensions{
+ p: &struct {
+ mu sync.Mutex
+ extensionMap map[int32]Extension
+ }{
+ extensionMap: exts,
+ },
+ }
+
+ var u marshalInfo
+ siz := u.sizeMessageSet(&ie)
+ b := make([]byte, 0, siz)
+ return u.appendMessageSet(b, &ie, deterministic)
+
+ default:
+ return nil, errors.New("proto: not an extension map")
+ }
+}
+
+// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
+// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
+func UnmarshalMessageSet(buf []byte, exts interface{}) error {
+ var m map[int32]Extension
+ switch exts := exts.(type) {
+ case *XXX_InternalExtensions:
+ m = exts.extensionsWrite()
+ case map[int32]Extension:
+ m = exts
+ default:
+ return errors.New("proto: not an extension map")
+ }
+
+ ms := new(messageSet)
+ if err := Unmarshal(buf, ms); err != nil {
+ return err
+ }
+ for _, item := range ms.Item {
+ id := *item.TypeId
+ msg := item.Message
+
+ // Restore wire type and field number varint, plus length varint.
+ // Be careful to preserve duplicate items.
+ b := EncodeVarint(uint64(id)<<3 | WireBytes)
+ if ext, ok := m[id]; ok {
+ // Existing data; rip off the tag and length varint
+ // so we join the new data correctly.
+ // We can assume that ext.enc is set because we are unmarshaling.
+ o := ext.enc[len(b):] // skip wire type and field number
+ _, n := DecodeVarint(o) // calculate length of length varint
+ o = o[n:] // skip length varint
+ msg = append(o, msg...) // join old data and new data
+ }
+ b = append(b, EncodeVarint(uint64(len(msg)))...)
+ b = append(b, msg...)
+
+ m[id] = Extension{enc: b}
+ }
+ return nil
+}
+
+// MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
+// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
+func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
+ var m map[int32]Extension
+ switch exts := exts.(type) {
+ case *XXX_InternalExtensions:
+ var mu sync.Locker
+ m, mu = exts.extensionsRead()
+ if m != nil {
+ // Keep the extensions map locked until we're done marshaling to prevent
+ // races between marshaling and unmarshaling the lazily-{en,de}coded
+ // values.
+ mu.Lock()
+ defer mu.Unlock()
+ }
+ case map[int32]Extension:
+ m = exts
+ default:
+ return nil, errors.New("proto: not an extension map")
+ }
+ var b bytes.Buffer
+ b.WriteByte('{')
+
+ // Process the map in key order for deterministic output.
+ ids := make([]int32, 0, len(m))
+ for id := range m {
+ ids = append(ids, id)
+ }
+ sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
+
+ for i, id := range ids {
+ ext := m[id]
+ msd, ok := messageSetMap[id]
+ if !ok {
+ // Unknown type; we can't render it, so skip it.
+ continue
+ }
+
+ if i > 0 && b.Len() > 1 {
+ b.WriteByte(',')
+ }
+
+ fmt.Fprintf(&b, `"[%s]":`, msd.name)
+
+ x := ext.value
+ if x == nil {
+ x = reflect.New(msd.t.Elem()).Interface()
+ if err := Unmarshal(ext.enc, x.(Message)); err != nil {
+ return nil, err
+ }
+ }
+ d, err := json.Marshal(x)
+ if err != nil {
+ return nil, err
+ }
+ b.Write(d)
+ }
+ b.WriteByte('}')
+ return b.Bytes(), nil
+}
+
+// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
+// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
+func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
+ // Common-case fast path.
+ if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
+ return nil
+ }
+
+ // This is fairly tricky, and it's not clear that it is needed.
+ return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
+}
+
+// A global registry of types that can be used in a MessageSet.
+
+var messageSetMap = make(map[int32]messageSetDesc)
+
+type messageSetDesc struct {
+ t reflect.Type // pointer to struct
+ name string
+}
+
+// RegisterMessageSetType is called from the generated code.
+func RegisterMessageSetType(m Message, fieldNum int32, name string) {
+ messageSetMap[fieldNum] = messageSetDesc{
+ t: reflect.TypeOf(m),
+ name: name,
+ }
+}
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
new file mode 100644
index 00000000..b6cad908
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
@@ -0,0 +1,357 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2012 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// +build purego appengine js
+
+// This file contains an implementation of proto field accesses using package reflect.
+// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can
+// be used on App Engine.
+
+package proto
+
+import (
+ "reflect"
+ "sync"
+)
+
+const unsafeAllowed = false
+
+// A field identifies a field in a struct, accessible from a pointer.
+// In this implementation, a field is identified by the sequence of field indices
+// passed to reflect's FieldByIndex.
+type field []int
+
+// toField returns a field equivalent to the given reflect field.
+func toField(f *reflect.StructField) field {
+ return f.Index
+}
+
+// invalidField is an invalid field identifier.
+var invalidField = field(nil)
+
+// zeroField is a noop when calling pointer.offset.
+var zeroField = field([]int{})
+
+// IsValid reports whether the field identifier is valid.
+func (f field) IsValid() bool { return f != nil }
+
+// The pointer type is for the table-driven decoder.
+// The implementation here uses a reflect.Value of pointer type to
+// create a generic pointer. In pointer_unsafe.go we use unsafe
+// instead of reflect to implement the same (but faster) interface.
+type pointer struct {
+ v reflect.Value
+}
+
+// toPointer converts an interface of pointer type to a pointer
+// that points to the same target.
+func toPointer(i *Message) pointer {
+ return pointer{v: reflect.ValueOf(*i)}
+}
+
+// toAddrPointer converts an interface to a pointer that points to
+// the interface data.
+func toAddrPointer(i *interface{}, isptr bool) pointer {
+ v := reflect.ValueOf(*i)
+ u := reflect.New(v.Type())
+ u.Elem().Set(v)
+ return pointer{v: u}
+}
+
+// valToPointer converts v to a pointer. v must be of pointer type.
+func valToPointer(v reflect.Value) pointer {
+ return pointer{v: v}
+}
+
+// offset converts from a pointer to a structure to a pointer to
+// one of its fields.
+func (p pointer) offset(f field) pointer {
+ return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
+}
+
+func (p pointer) isNil() bool {
+ return p.v.IsNil()
+}
+
+// grow updates the slice s in place to make it one element longer.
+// s must be addressable.
+// Returns the (addressable) new element.
+func grow(s reflect.Value) reflect.Value {
+ n, m := s.Len(), s.Cap()
+ if n < m {
+ s.SetLen(n + 1)
+ } else {
+ s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem())))
+ }
+ return s.Index(n)
+}
+
+func (p pointer) toInt64() *int64 {
+ return p.v.Interface().(*int64)
+}
+func (p pointer) toInt64Ptr() **int64 {
+ return p.v.Interface().(**int64)
+}
+func (p pointer) toInt64Slice() *[]int64 {
+ return p.v.Interface().(*[]int64)
+}
+
+var int32ptr = reflect.TypeOf((*int32)(nil))
+
+func (p pointer) toInt32() *int32 {
+ return p.v.Convert(int32ptr).Interface().(*int32)
+}
+
+// The toInt32Ptr/Slice methods don't work because of enums.
+// Instead, we must use set/get methods for the int32ptr/slice case.
+/*
+ func (p pointer) toInt32Ptr() **int32 {
+ return p.v.Interface().(**int32)
+}
+ func (p pointer) toInt32Slice() *[]int32 {
+ return p.v.Interface().(*[]int32)
+}
+*/
+func (p pointer) getInt32Ptr() *int32 {
+ if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
+ // raw int32 type
+ return p.v.Elem().Interface().(*int32)
+ }
+ // an enum
+ return p.v.Elem().Convert(int32PtrType).Interface().(*int32)
+}
+func (p pointer) setInt32Ptr(v int32) {
+ // Allocate value in a *int32. Possibly convert that to a *enum.
+ // Then assign it to a **int32 or **enum.
+ // Note: we can convert *int32 to *enum, but we can't convert
+ // **int32 to **enum!
+ p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem()))
+}
+
+// getInt32Slice copies []int32 from p as a new slice.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) getInt32Slice() []int32 {
+ if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
+ // raw int32 type
+ return p.v.Elem().Interface().([]int32)
+ }
+ // an enum
+ // Allocate a []int32, then assign []enum's values into it.
+ // Note: we can't convert []enum to []int32.
+ slice := p.v.Elem()
+ s := make([]int32, slice.Len())
+ for i := 0; i < slice.Len(); i++ {
+ s[i] = int32(slice.Index(i).Int())
+ }
+ return s
+}
+
+// setInt32Slice copies []int32 into p as a new slice.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) setInt32Slice(v []int32) {
+ if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
+ // raw int32 type
+ p.v.Elem().Set(reflect.ValueOf(v))
+ return
+ }
+ // an enum
+ // Allocate a []enum, then assign []int32's values into it.
+ // Note: we can't convert []enum to []int32.
+ slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v))
+ for i, x := range v {
+ slice.Index(i).SetInt(int64(x))
+ }
+ p.v.Elem().Set(slice)
+}
+func (p pointer) appendInt32Slice(v int32) {
+ grow(p.v.Elem()).SetInt(int64(v))
+}
+
+func (p pointer) toUint64() *uint64 {
+ return p.v.Interface().(*uint64)
+}
+func (p pointer) toUint64Ptr() **uint64 {
+ return p.v.Interface().(**uint64)
+}
+func (p pointer) toUint64Slice() *[]uint64 {
+ return p.v.Interface().(*[]uint64)
+}
+func (p pointer) toUint32() *uint32 {
+ return p.v.Interface().(*uint32)
+}
+func (p pointer) toUint32Ptr() **uint32 {
+ return p.v.Interface().(**uint32)
+}
+func (p pointer) toUint32Slice() *[]uint32 {
+ return p.v.Interface().(*[]uint32)
+}
+func (p pointer) toBool() *bool {
+ return p.v.Interface().(*bool)
+}
+func (p pointer) toBoolPtr() **bool {
+ return p.v.Interface().(**bool)
+}
+func (p pointer) toBoolSlice() *[]bool {
+ return p.v.Interface().(*[]bool)
+}
+func (p pointer) toFloat64() *float64 {
+ return p.v.Interface().(*float64)
+}
+func (p pointer) toFloat64Ptr() **float64 {
+ return p.v.Interface().(**float64)
+}
+func (p pointer) toFloat64Slice() *[]float64 {
+ return p.v.Interface().(*[]float64)
+}
+func (p pointer) toFloat32() *float32 {
+ return p.v.Interface().(*float32)
+}
+func (p pointer) toFloat32Ptr() **float32 {
+ return p.v.Interface().(**float32)
+}
+func (p pointer) toFloat32Slice() *[]float32 {
+ return p.v.Interface().(*[]float32)
+}
+func (p pointer) toString() *string {
+ return p.v.Interface().(*string)
+}
+func (p pointer) toStringPtr() **string {
+ return p.v.Interface().(**string)
+}
+func (p pointer) toStringSlice() *[]string {
+ return p.v.Interface().(*[]string)
+}
+func (p pointer) toBytes() *[]byte {
+ return p.v.Interface().(*[]byte)
+}
+func (p pointer) toBytesSlice() *[][]byte {
+ return p.v.Interface().(*[][]byte)
+}
+func (p pointer) toExtensions() *XXX_InternalExtensions {
+ return p.v.Interface().(*XXX_InternalExtensions)
+}
+func (p pointer) toOldExtensions() *map[int32]Extension {
+ return p.v.Interface().(*map[int32]Extension)
+}
+func (p pointer) getPointer() pointer {
+ return pointer{v: p.v.Elem()}
+}
+func (p pointer) setPointer(q pointer) {
+ p.v.Elem().Set(q.v)
+}
+func (p pointer) appendPointer(q pointer) {
+ grow(p.v.Elem()).Set(q.v)
+}
+
+// getPointerSlice copies []*T from p as a new []pointer.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) getPointerSlice() []pointer {
+ if p.v.IsNil() {
+ return nil
+ }
+ n := p.v.Elem().Len()
+ s := make([]pointer, n)
+ for i := 0; i < n; i++ {
+ s[i] = pointer{v: p.v.Elem().Index(i)}
+ }
+ return s
+}
+
+// setPointerSlice copies []pointer into p as a new []*T.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) setPointerSlice(v []pointer) {
+ if v == nil {
+ p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem())
+ return
+ }
+ s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v))
+ for _, p := range v {
+ s = reflect.Append(s, p.v)
+ }
+ p.v.Elem().Set(s)
+}
+
+// getInterfacePointer returns a pointer that points to the
+// interface data of the interface pointed by p.
+func (p pointer) getInterfacePointer() pointer {
+ if p.v.Elem().IsNil() {
+ return pointer{v: p.v.Elem()}
+ }
+ return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct
+}
+
+func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
+ // TODO: check that p.v.Type().Elem() == t?
+ return p.v
+}
+
+func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+
+var atomicLock sync.Mutex
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
new file mode 100644
index 00000000..d55a335d
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
@@ -0,0 +1,308 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2012 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// +build !purego,!appengine,!js
+
+// This file contains the implementation of the proto field accesses using package unsafe.
+
+package proto
+
+import (
+ "reflect"
+ "sync/atomic"
+ "unsafe"
+)
+
+const unsafeAllowed = true
+
+// A field identifies a field in a struct, accessible from a pointer.
+// In this implementation, a field is identified by its byte offset from the start of the struct.
+type field uintptr
+
+// toField returns a field equivalent to the given reflect field.
+func toField(f *reflect.StructField) field {
+ return field(f.Offset)
+}
+
+// invalidField is an invalid field identifier.
+const invalidField = ^field(0)
+
+// zeroField is a noop when calling pointer.offset.
+const zeroField = field(0)
+
+// IsValid reports whether the field identifier is valid.
+func (f field) IsValid() bool {
+ return f != invalidField
+}
+
+// The pointer type below is for the new table-driven encoder/decoder.
+// The implementation here uses unsafe.Pointer to create a generic pointer.
+// In pointer_reflect.go we use reflect instead of unsafe to implement
+// the same (but slower) interface.
+type pointer struct {
+ p unsafe.Pointer
+}
+
+// size of pointer
+var ptrSize = unsafe.Sizeof(uintptr(0))
+
+// toPointer converts an interface of pointer type to a pointer
+// that points to the same target.
+func toPointer(i *Message) pointer {
+ // Super-tricky - read pointer out of data word of interface value.
+ // Saves ~25ns over the equivalent:
+ // return valToPointer(reflect.ValueOf(*i))
+ return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
+}
+
+// toAddrPointer converts an interface to a pointer that points to
+// the interface data.
+func toAddrPointer(i *interface{}, isptr bool) pointer {
+ // Super-tricky - read or get the address of data word of interface value.
+ if isptr {
+ // The interface is of pointer type, thus it is a direct interface.
+ // The data word is the pointer data itself. We take its address.
+ return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
+ }
+ // The interface is not of pointer type. The data word is the pointer
+ // to the data.
+ return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
+}
+
+// valToPointer converts v to a pointer. v must be of pointer type.
+func valToPointer(v reflect.Value) pointer {
+ return pointer{p: unsafe.Pointer(v.Pointer())}
+}
+
+// offset converts from a pointer to a structure to a pointer to
+// one of its fields.
+func (p pointer) offset(f field) pointer {
+ // For safety, we should panic if !f.IsValid, however calling panic causes
+ // this to no longer be inlineable, which is a serious performance cost.
+ /*
+ if !f.IsValid() {
+ panic("invalid field")
+ }
+ */
+ return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))}
+}
+
+func (p pointer) isNil() bool {
+ return p.p == nil
+}
+
+func (p pointer) toInt64() *int64 {
+ return (*int64)(p.p)
+}
+func (p pointer) toInt64Ptr() **int64 {
+ return (**int64)(p.p)
+}
+func (p pointer) toInt64Slice() *[]int64 {
+ return (*[]int64)(p.p)
+}
+func (p pointer) toInt32() *int32 {
+ return (*int32)(p.p)
+}
+
+// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist.
+/*
+ func (p pointer) toInt32Ptr() **int32 {
+ return (**int32)(p.p)
+ }
+ func (p pointer) toInt32Slice() *[]int32 {
+ return (*[]int32)(p.p)
+ }
+*/
+func (p pointer) getInt32Ptr() *int32 {
+ return *(**int32)(p.p)
+}
+func (p pointer) setInt32Ptr(v int32) {
+ *(**int32)(p.p) = &v
+}
+
+// getInt32Slice loads a []int32 from p.
+// The value returned is aliased with the original slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) getInt32Slice() []int32 {
+ return *(*[]int32)(p.p)
+}
+
+// setInt32Slice stores a []int32 to p.
+// The value set is aliased with the input slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) setInt32Slice(v []int32) {
+ *(*[]int32)(p.p) = v
+}
+
+// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead?
+func (p pointer) appendInt32Slice(v int32) {
+ s := (*[]int32)(p.p)
+ *s = append(*s, v)
+}
+
+func (p pointer) toUint64() *uint64 {
+ return (*uint64)(p.p)
+}
+func (p pointer) toUint64Ptr() **uint64 {
+ return (**uint64)(p.p)
+}
+func (p pointer) toUint64Slice() *[]uint64 {
+ return (*[]uint64)(p.p)
+}
+func (p pointer) toUint32() *uint32 {
+ return (*uint32)(p.p)
+}
+func (p pointer) toUint32Ptr() **uint32 {
+ return (**uint32)(p.p)
+}
+func (p pointer) toUint32Slice() *[]uint32 {
+ return (*[]uint32)(p.p)
+}
+func (p pointer) toBool() *bool {
+ return (*bool)(p.p)
+}
+func (p pointer) toBoolPtr() **bool {
+ return (**bool)(p.p)
+}
+func (p pointer) toBoolSlice() *[]bool {
+ return (*[]bool)(p.p)
+}
+func (p pointer) toFloat64() *float64 {
+ return (*float64)(p.p)
+}
+func (p pointer) toFloat64Ptr() **float64 {
+ return (**float64)(p.p)
+}
+func (p pointer) toFloat64Slice() *[]float64 {
+ return (*[]float64)(p.p)
+}
+func (p pointer) toFloat32() *float32 {
+ return (*float32)(p.p)
+}
+func (p pointer) toFloat32Ptr() **float32 {
+ return (**float32)(p.p)
+}
+func (p pointer) toFloat32Slice() *[]float32 {
+ return (*[]float32)(p.p)
+}
+func (p pointer) toString() *string {
+ return (*string)(p.p)
+}
+func (p pointer) toStringPtr() **string {
+ return (**string)(p.p)
+}
+func (p pointer) toStringSlice() *[]string {
+ return (*[]string)(p.p)
+}
+func (p pointer) toBytes() *[]byte {
+ return (*[]byte)(p.p)
+}
+func (p pointer) toBytesSlice() *[][]byte {
+ return (*[][]byte)(p.p)
+}
+func (p pointer) toExtensions() *XXX_InternalExtensions {
+ return (*XXX_InternalExtensions)(p.p)
+}
+func (p pointer) toOldExtensions() *map[int32]Extension {
+ return (*map[int32]Extension)(p.p)
+}
+
+// getPointerSlice loads []*T from p as a []pointer.
+// The value returned is aliased with the original slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) getPointerSlice() []pointer {
+ // Super-tricky - p should point to a []*T where T is a
+ // message type. We load it as []pointer.
+ return *(*[]pointer)(p.p)
+}
+
+// setPointerSlice stores []pointer into p as a []*T.
+// The value set is aliased with the input slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) setPointerSlice(v []pointer) {
+ // Super-tricky - p should point to a []*T where T is a
+ // message type. We store it as []pointer.
+ *(*[]pointer)(p.p) = v
+}
+
+// getPointer loads the pointer at p and returns it.
+func (p pointer) getPointer() pointer {
+ return pointer{p: *(*unsafe.Pointer)(p.p)}
+}
+
+// setPointer stores the pointer q at p.
+func (p pointer) setPointer(q pointer) {
+ *(*unsafe.Pointer)(p.p) = q.p
+}
+
+// append q to the slice pointed to by p.
+func (p pointer) appendPointer(q pointer) {
+ s := (*[]unsafe.Pointer)(p.p)
+ *s = append(*s, q.p)
+}
+
+// getInterfacePointer returns a pointer that points to the
+// interface data of the interface pointed by p.
+func (p pointer) getInterfacePointer() pointer {
+ // Super-tricky - read pointer out of data word of interface value.
+ return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]}
+}
+
+// asPointerTo returns a reflect.Value that is a pointer to an
+// object of type t stored at p.
+func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
+ return reflect.NewAt(t, p.p)
+}
+
+func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
+ return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
+func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
+ return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
+func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
+ return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
+func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
+ return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
new file mode 100644
index 00000000..50b99b83
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/properties.go
@@ -0,0 +1,544 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+/*
+ * Routines for encoding data into the wire format for protocol buffers.
+ */
+
+import (
+ "fmt"
+ "log"
+ "os"
+ "reflect"
+ "sort"
+ "strconv"
+ "strings"
+ "sync"
+)
+
+const debug bool = false
+
+// Constants that identify the encoding of a value on the wire.
+const (
+ WireVarint = 0
+ WireFixed64 = 1
+ WireBytes = 2
+ WireStartGroup = 3
+ WireEndGroup = 4
+ WireFixed32 = 5
+)
+
+// tagMap is an optimization over map[int]int for typical protocol buffer
+// use-cases. Encoded protocol buffers are often in tag order with small tag
+// numbers.
+type tagMap struct {
+ fastTags []int
+ slowTags map[int]int
+}
+
+// tagMapFastLimit is the upper bound on the tag number that will be stored in
+// the tagMap slice rather than its map.
+const tagMapFastLimit = 1024
+
+func (p *tagMap) get(t int) (int, bool) {
+ if t > 0 && t < tagMapFastLimit {
+ if t >= len(p.fastTags) {
+ return 0, false
+ }
+ fi := p.fastTags[t]
+ return fi, fi >= 0
+ }
+ fi, ok := p.slowTags[t]
+ return fi, ok
+}
+
+func (p *tagMap) put(t int, fi int) {
+ if t > 0 && t < tagMapFastLimit {
+ for len(p.fastTags) < t+1 {
+ p.fastTags = append(p.fastTags, -1)
+ }
+ p.fastTags[t] = fi
+ return
+ }
+ if p.slowTags == nil {
+ p.slowTags = make(map[int]int)
+ }
+ p.slowTags[t] = fi
+}
+
+// StructProperties represents properties for all the fields of a struct.
+// decoderTags and decoderOrigNames should only be used by the decoder.
+type StructProperties struct {
+ Prop []*Properties // properties for each field
+ reqCount int // required count
+ decoderTags tagMap // map from proto tag to struct field number
+ decoderOrigNames map[string]int // map from original name to struct field number
+ order []int // list of struct field numbers in tag order
+
+ // OneofTypes contains information about the oneof fields in this message.
+ // It is keyed by the original name of a field.
+ OneofTypes map[string]*OneofProperties
+}
+
+// OneofProperties represents information about a specific field in a oneof.
+type OneofProperties struct {
+ Type reflect.Type // pointer to generated struct type for this oneof field
+ Field int // struct field number of the containing oneof in the message
+ Prop *Properties
+}
+
+// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec.
+// See encode.go, (*Buffer).enc_struct.
+
+func (sp *StructProperties) Len() int { return len(sp.order) }
+func (sp *StructProperties) Less(i, j int) bool {
+ return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag
+}
+func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] }
+
+// Properties represents the protocol-specific behavior of a single struct field.
+type Properties struct {
+ Name string // name of the field, for error messages
+ OrigName string // original name before protocol compiler (always set)
+ JSONName string // name to use for JSON; determined by protoc
+ Wire string
+ WireType int
+ Tag int
+ Required bool
+ Optional bool
+ Repeated bool
+ Packed bool // relevant for repeated primitives only
+ Enum string // set for enum types only
+ proto3 bool // whether this is known to be a proto3 field
+ oneof bool // whether this is a oneof field
+
+ Default string // default value
+ HasDefault bool // whether an explicit default was provided
+
+ stype reflect.Type // set for struct types only
+ sprop *StructProperties // set for struct types only
+
+ mtype reflect.Type // set for map types only
+ MapKeyProp *Properties // set for map types only
+ MapValProp *Properties // set for map types only
+}
+
+// String formats the properties in the protobuf struct field tag style.
+func (p *Properties) String() string {
+ s := p.Wire
+ s += ","
+ s += strconv.Itoa(p.Tag)
+ if p.Required {
+ s += ",req"
+ }
+ if p.Optional {
+ s += ",opt"
+ }
+ if p.Repeated {
+ s += ",rep"
+ }
+ if p.Packed {
+ s += ",packed"
+ }
+ s += ",name=" + p.OrigName
+ if p.JSONName != p.OrigName {
+ s += ",json=" + p.JSONName
+ }
+ if p.proto3 {
+ s += ",proto3"
+ }
+ if p.oneof {
+ s += ",oneof"
+ }
+ if len(p.Enum) > 0 {
+ s += ",enum=" + p.Enum
+ }
+ if p.HasDefault {
+ s += ",def=" + p.Default
+ }
+ return s
+}
+
+// Parse populates p by parsing a string in the protobuf struct field tag style.
+func (p *Properties) Parse(s string) {
+ // "bytes,49,opt,name=foo,def=hello!"
+ fields := strings.Split(s, ",") // breaks def=, but handled below.
+ if len(fields) < 2 {
+ fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s)
+ return
+ }
+
+ p.Wire = fields[0]
+ switch p.Wire {
+ case "varint":
+ p.WireType = WireVarint
+ case "fixed32":
+ p.WireType = WireFixed32
+ case "fixed64":
+ p.WireType = WireFixed64
+ case "zigzag32":
+ p.WireType = WireVarint
+ case "zigzag64":
+ p.WireType = WireVarint
+ case "bytes", "group":
+ p.WireType = WireBytes
+ // no numeric converter for non-numeric types
+ default:
+ fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s)
+ return
+ }
+
+ var err error
+ p.Tag, err = strconv.Atoi(fields[1])
+ if err != nil {
+ return
+ }
+
+outer:
+ for i := 2; i < len(fields); i++ {
+ f := fields[i]
+ switch {
+ case f == "req":
+ p.Required = true
+ case f == "opt":
+ p.Optional = true
+ case f == "rep":
+ p.Repeated = true
+ case f == "packed":
+ p.Packed = true
+ case strings.HasPrefix(f, "name="):
+ p.OrigName = f[5:]
+ case strings.HasPrefix(f, "json="):
+ p.JSONName = f[5:]
+ case strings.HasPrefix(f, "enum="):
+ p.Enum = f[5:]
+ case f == "proto3":
+ p.proto3 = true
+ case f == "oneof":
+ p.oneof = true
+ case strings.HasPrefix(f, "def="):
+ p.HasDefault = true
+ p.Default = f[4:] // rest of string
+ if i+1 < len(fields) {
+ // Commas aren't escaped, and def is always last.
+ p.Default += "," + strings.Join(fields[i+1:], ",")
+ break outer
+ }
+ }
+ }
+}
+
+var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()
+
+// setFieldProps initializes the field properties for submessages and maps.
+func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
+ switch t1 := typ; t1.Kind() {
+ case reflect.Ptr:
+ if t1.Elem().Kind() == reflect.Struct {
+ p.stype = t1.Elem()
+ }
+
+ case reflect.Slice:
+ if t2 := t1.Elem(); t2.Kind() == reflect.Ptr && t2.Elem().Kind() == reflect.Struct {
+ p.stype = t2.Elem()
+ }
+
+ case reflect.Map:
+ p.mtype = t1
+ p.MapKeyProp = &Properties{}
+ p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
+ p.MapValProp = &Properties{}
+ vtype := p.mtype.Elem()
+ if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
+ // The value type is not a message (*T) or bytes ([]byte),
+ // so we need encoders for the pointer to this type.
+ vtype = reflect.PtrTo(vtype)
+ }
+ p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
+ }
+
+ if p.stype != nil {
+ if lockGetProp {
+ p.sprop = GetProperties(p.stype)
+ } else {
+ p.sprop = getPropertiesLocked(p.stype)
+ }
+ }
+}
+
+var (
+ marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
+)
+
+// Init populates the properties from a protocol buffer struct tag.
+func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
+ p.init(typ, name, tag, f, true)
+}
+
+func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) {
+ // "bytes,49,opt,def=hello!"
+ p.Name = name
+ p.OrigName = name
+ if tag == "" {
+ return
+ }
+ p.Parse(tag)
+ p.setFieldProps(typ, f, lockGetProp)
+}
+
+var (
+ propertiesMu sync.RWMutex
+ propertiesMap = make(map[reflect.Type]*StructProperties)
+)
+
+// GetProperties returns the list of properties for the type represented by t.
+// t must represent a generated struct type of a protocol message.
+func GetProperties(t reflect.Type) *StructProperties {
+ if t.Kind() != reflect.Struct {
+ panic("proto: type must have kind struct")
+ }
+
+ // Most calls to GetProperties in a long-running program will be
+ // retrieving details for types we have seen before.
+ propertiesMu.RLock()
+ sprop, ok := propertiesMap[t]
+ propertiesMu.RUnlock()
+ if ok {
+ if collectStats {
+ stats.Chit++
+ }
+ return sprop
+ }
+
+ propertiesMu.Lock()
+ sprop = getPropertiesLocked(t)
+ propertiesMu.Unlock()
+ return sprop
+}
+
+// getPropertiesLocked requires that propertiesMu is held.
+func getPropertiesLocked(t reflect.Type) *StructProperties {
+ if prop, ok := propertiesMap[t]; ok {
+ if collectStats {
+ stats.Chit++
+ }
+ return prop
+ }
+ if collectStats {
+ stats.Cmiss++
+ }
+
+ prop := new(StructProperties)
+ // in case of recursive protos, fill this in now.
+ propertiesMap[t] = prop
+
+ // build properties
+ prop.Prop = make([]*Properties, t.NumField())
+ prop.order = make([]int, t.NumField())
+
+ for i := 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+ p := new(Properties)
+ name := f.Name
+ p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false)
+
+ oneof := f.Tag.Get("protobuf_oneof") // special case
+ if oneof != "" {
+ // Oneof fields don't use the traditional protobuf tag.
+ p.OrigName = oneof
+ }
+ prop.Prop[i] = p
+ prop.order[i] = i
+ if debug {
+ print(i, " ", f.Name, " ", t.String(), " ")
+ if p.Tag > 0 {
+ print(p.String())
+ }
+ print("\n")
+ }
+ }
+
+ // Re-order prop.order.
+ sort.Sort(prop)
+
+ type oneofMessage interface {
+ XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
+ }
+ if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
+ var oots []interface{}
+ _, _, _, oots = om.XXX_OneofFuncs()
+
+ // Interpret oneof metadata.
+ prop.OneofTypes = make(map[string]*OneofProperties)
+ for _, oot := range oots {
+ oop := &OneofProperties{
+ Type: reflect.ValueOf(oot).Type(), // *T
+ Prop: new(Properties),
+ }
+ sft := oop.Type.Elem().Field(0)
+ oop.Prop.Name = sft.Name
+ oop.Prop.Parse(sft.Tag.Get("protobuf"))
+ // There will be exactly one interface field that
+ // this new value is assignable to.
+ for i := 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+ if f.Type.Kind() != reflect.Interface {
+ continue
+ }
+ if !oop.Type.AssignableTo(f.Type) {
+ continue
+ }
+ oop.Field = i
+ break
+ }
+ prop.OneofTypes[oop.Prop.OrigName] = oop
+ }
+ }
+
+ // build required counts
+ // build tags
+ reqCount := 0
+ prop.decoderOrigNames = make(map[string]int)
+ for i, p := range prop.Prop {
+ if strings.HasPrefix(p.Name, "XXX_") {
+ // Internal fields should not appear in tags/origNames maps.
+ // They are handled specially when encoding and decoding.
+ continue
+ }
+ if p.Required {
+ reqCount++
+ }
+ prop.decoderTags.put(p.Tag, i)
+ prop.decoderOrigNames[p.OrigName] = i
+ }
+ prop.reqCount = reqCount
+
+ return prop
+}
+
+// A global registry of enum types.
+// The generated code will register the generated maps by calling RegisterEnum.
+
+var enumValueMaps = make(map[string]map[string]int32)
+
+// RegisterEnum is called from the generated code to install the enum descriptor
+// maps into the global table to aid parsing text format protocol buffers.
+func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) {
+ if _, ok := enumValueMaps[typeName]; ok {
+ panic("proto: duplicate enum registered: " + typeName)
+ }
+ enumValueMaps[typeName] = valueMap
+}
+
+// EnumValueMap returns the mapping from names to integers of the
+// enum type enumType, or a nil if not found.
+func EnumValueMap(enumType string) map[string]int32 {
+ return enumValueMaps[enumType]
+}
+
+// A registry of all linked message types.
+// The string is a fully-qualified proto name ("pkg.Message").
+var (
+ protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers
+ protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types
+ revProtoTypes = make(map[reflect.Type]string)
+)
+
+// RegisterType is called from generated code and maps from the fully qualified
+// proto name to the type (pointer to struct) of the protocol buffer.
+func RegisterType(x Message, name string) {
+ if _, ok := protoTypedNils[name]; ok {
+ // TODO: Some day, make this a panic.
+ log.Printf("proto: duplicate proto type registered: %s", name)
+ return
+ }
+ t := reflect.TypeOf(x)
+ if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 {
+ // Generated code always calls RegisterType with nil x.
+ // This check is just for extra safety.
+ protoTypedNils[name] = x
+ } else {
+ protoTypedNils[name] = reflect.Zero(t).Interface().(Message)
+ }
+ revProtoTypes[t] = name
+}
+
+// RegisterMapType is called from generated code and maps from the fully qualified
+// proto name to the native map type of the proto map definition.
+func RegisterMapType(x interface{}, name string) {
+ if reflect.TypeOf(x).Kind() != reflect.Map {
+ panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name))
+ }
+ if _, ok := protoMapTypes[name]; ok {
+ log.Printf("proto: duplicate proto type registered: %s", name)
+ return
+ }
+ t := reflect.TypeOf(x)
+ protoMapTypes[name] = t
+ revProtoTypes[t] = name
+}
+
+// MessageName returns the fully-qualified proto name for the given message type.
+func MessageName(x Message) string {
+ type xname interface {
+ XXX_MessageName() string
+ }
+ if m, ok := x.(xname); ok {
+ return m.XXX_MessageName()
+ }
+ return revProtoTypes[reflect.TypeOf(x)]
+}
+
+// MessageType returns the message type (pointer to struct) for a named message.
+// The type is not guaranteed to implement proto.Message if the name refers to a
+// map entry.
+func MessageType(name string) reflect.Type {
+ if t, ok := protoTypedNils[name]; ok {
+ return reflect.TypeOf(t)
+ }
+ return protoMapTypes[name]
+}
+
+// A registry of all linked proto files.
+var (
+ protoFiles = make(map[string][]byte) // file name => fileDescriptor
+)
+
+// RegisterFile is called from generated code and maps from the
+// full file name of a .proto file to its compressed FileDescriptorProto.
+func RegisterFile(filename string, fileDescriptor []byte) {
+ protoFiles[filename] = fileDescriptor
+}
+
+// FileDescriptor returns the compressed FileDescriptorProto for a .proto file.
+func FileDescriptor(filename string) []byte { return protoFiles[filename] }
diff --git a/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go
new file mode 100644
index 00000000..b1679449
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/table_marshal.go
@@ -0,0 +1,2767 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2016 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "errors"
+ "fmt"
+ "math"
+ "reflect"
+ "sort"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "unicode/utf8"
+)
+
+// a sizer takes a pointer to a field and the size of its tag, computes the size of
+// the encoded data.
+type sizer func(pointer, int) int
+
+// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format),
+// marshals the field to the end of the slice, returns the slice and error (if any).
+type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error)
+
+// marshalInfo is the information used for marshaling a message.
+type marshalInfo struct {
+ typ reflect.Type
+ fields []*marshalFieldInfo
+ unrecognized field // offset of XXX_unrecognized
+ extensions field // offset of XXX_InternalExtensions
+ v1extensions field // offset of XXX_extensions
+ sizecache field // offset of XXX_sizecache
+ initialized int32 // 0 -- only typ is set, 1 -- fully initialized
+ messageset bool // uses message set wire format
+ hasmarshaler bool // has custom marshaler
+ sync.RWMutex // protect extElems map, also for initialization
+ extElems map[int32]*marshalElemInfo // info of extension elements
+}
+
+// marshalFieldInfo is the information used for marshaling a field of a message.
+type marshalFieldInfo struct {
+ field field
+ wiretag uint64 // tag in wire format
+ tagsize int // size of tag in wire format
+ sizer sizer
+ marshaler marshaler
+ isPointer bool
+ required bool // field is required
+ name string // name of the field, for error reporting
+ oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements
+}
+
+// marshalElemInfo is the information used for marshaling an extension or oneof element.
+type marshalElemInfo struct {
+ wiretag uint64 // tag in wire format
+ tagsize int // size of tag in wire format
+ sizer sizer
+ marshaler marshaler
+ isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only)
+}
+
+var (
+ marshalInfoMap = map[reflect.Type]*marshalInfo{}
+ marshalInfoLock sync.Mutex
+)
+
+// getMarshalInfo returns the information to marshal a given type of message.
+// The info it returns may not necessarily initialized.
+// t is the type of the message (NOT the pointer to it).
+func getMarshalInfo(t reflect.Type) *marshalInfo {
+ marshalInfoLock.Lock()
+ u, ok := marshalInfoMap[t]
+ if !ok {
+ u = &marshalInfo{typ: t}
+ marshalInfoMap[t] = u
+ }
+ marshalInfoLock.Unlock()
+ return u
+}
+
+// Size is the entry point from generated code,
+// and should be ONLY called by generated code.
+// It computes the size of encoded data of msg.
+// a is a pointer to a place to store cached marshal info.
+func (a *InternalMessageInfo) Size(msg Message) int {
+ u := getMessageMarshalInfo(msg, a)
+ ptr := toPointer(&msg)
+ if ptr.isNil() {
+ // We get here if msg is a typed nil ((*SomeMessage)(nil)),
+ // so it satisfies the interface, and msg == nil wouldn't
+ // catch it. We don't want crash in this case.
+ return 0
+ }
+ return u.size(ptr)
+}
+
+// Marshal is the entry point from generated code,
+// and should be ONLY called by generated code.
+// It marshals msg to the end of b.
+// a is a pointer to a place to store cached marshal info.
+func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) {
+ u := getMessageMarshalInfo(msg, a)
+ ptr := toPointer(&msg)
+ if ptr.isNil() {
+ // We get here if msg is a typed nil ((*SomeMessage)(nil)),
+ // so it satisfies the interface, and msg == nil wouldn't
+ // catch it. We don't want crash in this case.
+ return b, ErrNil
+ }
+ return u.marshal(b, ptr, deterministic)
+}
+
+func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo {
+ // u := a.marshal, but atomically.
+ // We use an atomic here to ensure memory consistency.
+ u := atomicLoadMarshalInfo(&a.marshal)
+ if u == nil {
+ // Get marshal information from type of message.
+ t := reflect.ValueOf(msg).Type()
+ if t.Kind() != reflect.Ptr {
+ panic(fmt.Sprintf("cannot handle non-pointer message type %v", t))
+ }
+ u = getMarshalInfo(t.Elem())
+ // Store it in the cache for later users.
+ // a.marshal = u, but atomically.
+ atomicStoreMarshalInfo(&a.marshal, u)
+ }
+ return u
+}
+
+// size is the main function to compute the size of the encoded data of a message.
+// ptr is the pointer to the message.
+func (u *marshalInfo) size(ptr pointer) int {
+ if atomic.LoadInt32(&u.initialized) == 0 {
+ u.computeMarshalInfo()
+ }
+
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ if u.hasmarshaler {
+ m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
+ b, _ := m.Marshal()
+ return len(b)
+ }
+
+ n := 0
+ for _, f := range u.fields {
+ if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
+ // nil pointer always marshals to nothing
+ continue
+ }
+ n += f.sizer(ptr.offset(f.field), f.tagsize)
+ }
+ if u.extensions.IsValid() {
+ e := ptr.offset(u.extensions).toExtensions()
+ if u.messageset {
+ n += u.sizeMessageSet(e)
+ } else {
+ n += u.sizeExtensions(e)
+ }
+ }
+ if u.v1extensions.IsValid() {
+ m := *ptr.offset(u.v1extensions).toOldExtensions()
+ n += u.sizeV1Extensions(m)
+ }
+ if u.unrecognized.IsValid() {
+ s := *ptr.offset(u.unrecognized).toBytes()
+ n += len(s)
+ }
+ // cache the result for use in marshal
+ if u.sizecache.IsValid() {
+ atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n))
+ }
+ return n
+}
+
+// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated),
+// fall back to compute the size.
+func (u *marshalInfo) cachedsize(ptr pointer) int {
+ if u.sizecache.IsValid() {
+ return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32()))
+ }
+ return u.size(ptr)
+}
+
+// marshal is the main function to marshal a message. It takes a byte slice and appends
+// the encoded data to the end of the slice, returns the slice and error (if any).
+// ptr is the pointer to the message.
+// If deterministic is true, map is marshaled in deterministic order.
+func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) {
+ if atomic.LoadInt32(&u.initialized) == 0 {
+ u.computeMarshalInfo()
+ }
+
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ if u.hasmarshaler {
+ m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
+ b1, err := m.Marshal()
+ b = append(b, b1...)
+ return b, err
+ }
+
+ var err, errLater error
+ // The old marshaler encodes extensions at beginning.
+ if u.extensions.IsValid() {
+ e := ptr.offset(u.extensions).toExtensions()
+ if u.messageset {
+ b, err = u.appendMessageSet(b, e, deterministic)
+ } else {
+ b, err = u.appendExtensions(b, e, deterministic)
+ }
+ if err != nil {
+ return b, err
+ }
+ }
+ if u.v1extensions.IsValid() {
+ m := *ptr.offset(u.v1extensions).toOldExtensions()
+ b, err = u.appendV1Extensions(b, m, deterministic)
+ if err != nil {
+ return b, err
+ }
+ }
+ for _, f := range u.fields {
+ if f.required {
+ if ptr.offset(f.field).getPointer().isNil() {
+ // Required field is not set.
+ // We record the error but keep going, to give a complete marshaling.
+ if errLater == nil {
+ errLater = &RequiredNotSetError{f.name}
+ }
+ continue
+ }
+ }
+ if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
+ // nil pointer always marshals to nothing
+ continue
+ }
+ b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic)
+ if err != nil {
+ if err1, ok := err.(*RequiredNotSetError); ok {
+ // Required field in submessage is not set.
+ // We record the error but keep going, to give a complete marshaling.
+ if errLater == nil {
+ errLater = &RequiredNotSetError{f.name + "." + err1.field}
+ }
+ continue
+ }
+ if err == errRepeatedHasNil {
+ err = errors.New("proto: repeated field " + f.name + " has nil element")
+ }
+ if err == errInvalidUTF8 {
+ if errLater == nil {
+ fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+ errLater = &invalidUTF8Error{fullName}
+ }
+ continue
+ }
+ return b, err
+ }
+ }
+ if u.unrecognized.IsValid() {
+ s := *ptr.offset(u.unrecognized).toBytes()
+ b = append(b, s...)
+ }
+ return b, errLater
+}
+
+// computeMarshalInfo initializes the marshal info.
+func (u *marshalInfo) computeMarshalInfo() {
+ u.Lock()
+ defer u.Unlock()
+ if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock
+ return
+ }
+
+ t := u.typ
+ u.unrecognized = invalidField
+ u.extensions = invalidField
+ u.v1extensions = invalidField
+ u.sizecache = invalidField
+
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ if reflect.PtrTo(t).Implements(marshalerType) {
+ u.hasmarshaler = true
+ atomic.StoreInt32(&u.initialized, 1)
+ return
+ }
+
+ // get oneof implementers
+ var oneofImplementers []interface{}
+ if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
+ _, _, _, oneofImplementers = m.XXX_OneofFuncs()
+ }
+
+ n := t.NumField()
+
+ // deal with XXX fields first
+ for i := 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+ if !strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ switch f.Name {
+ case "XXX_sizecache":
+ u.sizecache = toField(&f)
+ case "XXX_unrecognized":
+ u.unrecognized = toField(&f)
+ case "XXX_InternalExtensions":
+ u.extensions = toField(&f)
+ u.messageset = f.Tag.Get("protobuf_messageset") == "1"
+ case "XXX_extensions":
+ u.v1extensions = toField(&f)
+ case "XXX_NoUnkeyedLiteral":
+ // nothing to do
+ default:
+ panic("unknown XXX field: " + f.Name)
+ }
+ n--
+ }
+
+ // normal fields
+ fields := make([]marshalFieldInfo, n) // batch allocation
+ u.fields = make([]*marshalFieldInfo, 0, n)
+ for i, j := 0, 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ field := &fields[j]
+ j++
+ field.name = f.Name
+ u.fields = append(u.fields, field)
+ if f.Tag.Get("protobuf_oneof") != "" {
+ field.computeOneofFieldInfo(&f, oneofImplementers)
+ continue
+ }
+ if f.Tag.Get("protobuf") == "" {
+ // field has no tag (not in generated message), ignore it
+ u.fields = u.fields[:len(u.fields)-1]
+ j--
+ continue
+ }
+ field.computeMarshalFieldInfo(&f)
+ }
+
+ // fields are marshaled in tag order on the wire.
+ sort.Sort(byTag(u.fields))
+
+ atomic.StoreInt32(&u.initialized, 1)
+}
+
+// helper for sorting fields by tag
+type byTag []*marshalFieldInfo
+
+func (a byTag) Len() int { return len(a) }
+func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag }
+
+// getExtElemInfo returns the information to marshal an extension element.
+// The info it returns is initialized.
+func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo {
+ // get from cache first
+ u.RLock()
+ e, ok := u.extElems[desc.Field]
+ u.RUnlock()
+ if ok {
+ return e
+ }
+
+ t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct
+ tags := strings.Split(desc.Tag, ",")
+ tag, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("tag is not an integer")
+ }
+ wt := wiretype(tags[0])
+ sizer, marshaler := typeMarshaler(t, tags, false, false)
+ e = &marshalElemInfo{
+ wiretag: uint64(tag)<<3 | wt,
+ tagsize: SizeVarint(uint64(tag) << 3),
+ sizer: sizer,
+ marshaler: marshaler,
+ isptr: t.Kind() == reflect.Ptr,
+ }
+
+ // update cache
+ u.Lock()
+ if u.extElems == nil {
+ u.extElems = make(map[int32]*marshalElemInfo)
+ }
+ u.extElems[desc.Field] = e
+ u.Unlock()
+ return e
+}
+
+// computeMarshalFieldInfo fills up the information to marshal a field.
+func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) {
+ // parse protobuf tag of the field.
+ // tag has format of "bytes,49,opt,name=foo,def=hello!"
+ tags := strings.Split(f.Tag.Get("protobuf"), ",")
+ if tags[0] == "" {
+ return
+ }
+ tag, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("tag is not an integer")
+ }
+ wt := wiretype(tags[0])
+ if tags[2] == "req" {
+ fi.required = true
+ }
+ fi.setTag(f, tag, wt)
+ fi.setMarshaler(f, tags)
+}
+
+func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) {
+ fi.field = toField(f)
+ fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
+ fi.isPointer = true
+ fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f)
+ fi.oneofElems = make(map[reflect.Type]*marshalElemInfo)
+
+ ityp := f.Type // interface type
+ for _, o := range oneofImplementers {
+ t := reflect.TypeOf(o)
+ if !t.Implements(ityp) {
+ continue
+ }
+ sf := t.Elem().Field(0) // oneof implementer is a struct with a single field
+ tags := strings.Split(sf.Tag.Get("protobuf"), ",")
+ tag, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("tag is not an integer")
+ }
+ wt := wiretype(tags[0])
+ sizer, marshaler := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value
+ fi.oneofElems[t.Elem()] = &marshalElemInfo{
+ wiretag: uint64(tag)<<3 | wt,
+ tagsize: SizeVarint(uint64(tag) << 3),
+ sizer: sizer,
+ marshaler: marshaler,
+ }
+ }
+}
+
+type oneofMessage interface {
+ XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
+}
+
+// wiretype returns the wire encoding of the type.
+func wiretype(encoding string) uint64 {
+ switch encoding {
+ case "fixed32":
+ return WireFixed32
+ case "fixed64":
+ return WireFixed64
+ case "varint", "zigzag32", "zigzag64":
+ return WireVarint
+ case "bytes":
+ return WireBytes
+ case "group":
+ return WireStartGroup
+ }
+ panic("unknown wire type " + encoding)
+}
+
+// setTag fills up the tag (in wire format) and its size in the info of a field.
+func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) {
+ fi.field = toField(f)
+ fi.wiretag = uint64(tag)<<3 | wt
+ fi.tagsize = SizeVarint(uint64(tag) << 3)
+}
+
+// setMarshaler fills up the sizer and marshaler in the info of a field.
+func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) {
+ switch f.Type.Kind() {
+ case reflect.Map:
+ // map field
+ fi.isPointer = true
+ fi.sizer, fi.marshaler = makeMapMarshaler(f)
+ return
+ case reflect.Ptr, reflect.Slice:
+ fi.isPointer = true
+ }
+ fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false)
+}
+
+// typeMarshaler returns the sizer and marshaler of a given field.
+// t is the type of the field.
+// tags is the generated "protobuf" tag of the field.
+// If nozero is true, zero value is not marshaled to the wire.
+// If oneof is true, it is a oneof field.
+func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) {
+ encoding := tags[0]
+
+ pointer := false
+ slice := false
+ if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
+ slice = true
+ t = t.Elem()
+ }
+ if t.Kind() == reflect.Ptr {
+ pointer = true
+ t = t.Elem()
+ }
+
+ packed := false
+ proto3 := false
+ validateUTF8 := true
+ for i := 2; i < len(tags); i++ {
+ if tags[i] == "packed" {
+ packed = true
+ }
+ if tags[i] == "proto3" {
+ proto3 = true
+ }
+ }
+ validateUTF8 = validateUTF8 && proto3
+
+ switch t.Kind() {
+ case reflect.Bool:
+ if pointer {
+ return sizeBoolPtr, appendBoolPtr
+ }
+ if slice {
+ if packed {
+ return sizeBoolPackedSlice, appendBoolPackedSlice
+ }
+ return sizeBoolSlice, appendBoolSlice
+ }
+ if nozero {
+ return sizeBoolValueNoZero, appendBoolValueNoZero
+ }
+ return sizeBoolValue, appendBoolValue
+ case reflect.Uint32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return sizeFixed32Ptr, appendFixed32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixed32PackedSlice, appendFixed32PackedSlice
+ }
+ return sizeFixed32Slice, appendFixed32Slice
+ }
+ if nozero {
+ return sizeFixed32ValueNoZero, appendFixed32ValueNoZero
+ }
+ return sizeFixed32Value, appendFixed32Value
+ case "varint":
+ if pointer {
+ return sizeVarint32Ptr, appendVarint32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarint32PackedSlice, appendVarint32PackedSlice
+ }
+ return sizeVarint32Slice, appendVarint32Slice
+ }
+ if nozero {
+ return sizeVarint32ValueNoZero, appendVarint32ValueNoZero
+ }
+ return sizeVarint32Value, appendVarint32Value
+ }
+ case reflect.Int32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return sizeFixedS32Ptr, appendFixedS32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixedS32PackedSlice, appendFixedS32PackedSlice
+ }
+ return sizeFixedS32Slice, appendFixedS32Slice
+ }
+ if nozero {
+ return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero
+ }
+ return sizeFixedS32Value, appendFixedS32Value
+ case "varint":
+ if pointer {
+ return sizeVarintS32Ptr, appendVarintS32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarintS32PackedSlice, appendVarintS32PackedSlice
+ }
+ return sizeVarintS32Slice, appendVarintS32Slice
+ }
+ if nozero {
+ return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero
+ }
+ return sizeVarintS32Value, appendVarintS32Value
+ case "zigzag32":
+ if pointer {
+ return sizeZigzag32Ptr, appendZigzag32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeZigzag32PackedSlice, appendZigzag32PackedSlice
+ }
+ return sizeZigzag32Slice, appendZigzag32Slice
+ }
+ if nozero {
+ return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero
+ }
+ return sizeZigzag32Value, appendZigzag32Value
+ }
+ case reflect.Uint64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return sizeFixed64Ptr, appendFixed64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixed64PackedSlice, appendFixed64PackedSlice
+ }
+ return sizeFixed64Slice, appendFixed64Slice
+ }
+ if nozero {
+ return sizeFixed64ValueNoZero, appendFixed64ValueNoZero
+ }
+ return sizeFixed64Value, appendFixed64Value
+ case "varint":
+ if pointer {
+ return sizeVarint64Ptr, appendVarint64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarint64PackedSlice, appendVarint64PackedSlice
+ }
+ return sizeVarint64Slice, appendVarint64Slice
+ }
+ if nozero {
+ return sizeVarint64ValueNoZero, appendVarint64ValueNoZero
+ }
+ return sizeVarint64Value, appendVarint64Value
+ }
+ case reflect.Int64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return sizeFixedS64Ptr, appendFixedS64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixedS64PackedSlice, appendFixedS64PackedSlice
+ }
+ return sizeFixedS64Slice, appendFixedS64Slice
+ }
+ if nozero {
+ return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero
+ }
+ return sizeFixedS64Value, appendFixedS64Value
+ case "varint":
+ if pointer {
+ return sizeVarintS64Ptr, appendVarintS64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarintS64PackedSlice, appendVarintS64PackedSlice
+ }
+ return sizeVarintS64Slice, appendVarintS64Slice
+ }
+ if nozero {
+ return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero
+ }
+ return sizeVarintS64Value, appendVarintS64Value
+ case "zigzag64":
+ if pointer {
+ return sizeZigzag64Ptr, appendZigzag64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeZigzag64PackedSlice, appendZigzag64PackedSlice
+ }
+ return sizeZigzag64Slice, appendZigzag64Slice
+ }
+ if nozero {
+ return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero
+ }
+ return sizeZigzag64Value, appendZigzag64Value
+ }
+ case reflect.Float32:
+ if pointer {
+ return sizeFloat32Ptr, appendFloat32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFloat32PackedSlice, appendFloat32PackedSlice
+ }
+ return sizeFloat32Slice, appendFloat32Slice
+ }
+ if nozero {
+ return sizeFloat32ValueNoZero, appendFloat32ValueNoZero
+ }
+ return sizeFloat32Value, appendFloat32Value
+ case reflect.Float64:
+ if pointer {
+ return sizeFloat64Ptr, appendFloat64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFloat64PackedSlice, appendFloat64PackedSlice
+ }
+ return sizeFloat64Slice, appendFloat64Slice
+ }
+ if nozero {
+ return sizeFloat64ValueNoZero, appendFloat64ValueNoZero
+ }
+ return sizeFloat64Value, appendFloat64Value
+ case reflect.String:
+ if validateUTF8 {
+ if pointer {
+ return sizeStringPtr, appendUTF8StringPtr
+ }
+ if slice {
+ return sizeStringSlice, appendUTF8StringSlice
+ }
+ if nozero {
+ return sizeStringValueNoZero, appendUTF8StringValueNoZero
+ }
+ return sizeStringValue, appendUTF8StringValue
+ }
+ if pointer {
+ return sizeStringPtr, appendStringPtr
+ }
+ if slice {
+ return sizeStringSlice, appendStringSlice
+ }
+ if nozero {
+ return sizeStringValueNoZero, appendStringValueNoZero
+ }
+ return sizeStringValue, appendStringValue
+ case reflect.Slice:
+ if slice {
+ return sizeBytesSlice, appendBytesSlice
+ }
+ if oneof {
+ // Oneof bytes field may also have "proto3" tag.
+ // We want to marshal it as a oneof field. Do this
+ // check before the proto3 check.
+ return sizeBytesOneof, appendBytesOneof
+ }
+ if proto3 {
+ return sizeBytes3, appendBytes3
+ }
+ return sizeBytes, appendBytes
+ case reflect.Struct:
+ switch encoding {
+ case "group":
+ if slice {
+ return makeGroupSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeGroupMarshaler(getMarshalInfo(t))
+ case "bytes":
+ if slice {
+ return makeMessageSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeMessageMarshaler(getMarshalInfo(t))
+ }
+ }
+ panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding))
+}
+
+// Below are functions to size/marshal a specific type of a field.
+// They are stored in the field's info, and called by function pointers.
+// They have type sizer or marshaler.
+
+func sizeFixed32Value(_ pointer, tagsize int) int {
+ return 4 + tagsize
+}
+func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixed32Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixed32Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ return (4 + tagsize) * len(s)
+}
+func sizeFixed32PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
+}
+func sizeFixedS32Value(_ pointer, tagsize int) int {
+ return 4 + tagsize
+}
+func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixedS32Ptr(ptr pointer, tagsize int) int {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixedS32Slice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ return (4 + tagsize) * len(s)
+}
+func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
+}
+func sizeFloat32Value(_ pointer, tagsize int) int {
+ return 4 + tagsize
+}
+func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int {
+ v := math.Float32bits(*ptr.toFloat32())
+ if v == 0 {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFloat32Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toFloat32Ptr()
+ if p == nil {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFloat32Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat32Slice()
+ return (4 + tagsize) * len(s)
+}
+func sizeFloat32PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
+}
+func sizeFixed64Value(_ pointer, tagsize int) int {
+ return 8 + tagsize
+}
+func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixed64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixed64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ return (8 + tagsize) * len(s)
+}
+func sizeFixed64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
+}
+func sizeFixedS64Value(_ pointer, tagsize int) int {
+ return 8 + tagsize
+}
+func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixedS64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixedS64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ return (8 + tagsize) * len(s)
+}
+func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
+}
+func sizeFloat64Value(_ pointer, tagsize int) int {
+ return 8 + tagsize
+}
+func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int {
+ v := math.Float64bits(*ptr.toFloat64())
+ if v == 0 {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFloat64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toFloat64Ptr()
+ if p == nil {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFloat64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat64Slice()
+ return (8 + tagsize) * len(s)
+}
+func sizeFloat64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
+}
+func sizeVarint32Value(ptr pointer, tagsize int) int {
+ v := *ptr.toUint32()
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarint32Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(uint64(*p)) + tagsize
+}
+func sizeVarint32Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v)) + tagsize
+ }
+ return n
+}
+func sizeVarint32PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeVarintS32Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS32Ptr(ptr pointer, tagsize int) int {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(uint64(*p)) + tagsize
+}
+func sizeVarintS32Slice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v)) + tagsize
+ }
+ return n
+}
+func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeVarint64Value(ptr pointer, tagsize int) int {
+ v := *ptr.toUint64()
+ return SizeVarint(v) + tagsize
+}
+func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(v) + tagsize
+}
+func sizeVarint64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(*p) + tagsize
+}
+func sizeVarint64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(v) + tagsize
+ }
+ return n
+}
+func sizeVarint64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(v)
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeVarintS64Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(uint64(*p)) + tagsize
+}
+func sizeVarintS64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v)) + tagsize
+ }
+ return n
+}
+func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeZigzag32Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+}
+func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+}
+func sizeZigzag32Ptr(ptr pointer, tagsize int) int {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return 0
+ }
+ v := *p
+ return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+}
+func sizeZigzag32Slice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+ }
+ return n
+}
+func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeZigzag64Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+}
+func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+}
+func sizeZigzag64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return 0
+ }
+ v := *p
+ return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+}
+func sizeZigzag64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+ }
+ return n
+}
+func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeBoolValue(_ pointer, tagsize int) int {
+ return 1 + tagsize
+}
+func sizeBoolValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toBool()
+ if !v {
+ return 0
+ }
+ return 1 + tagsize
+}
+func sizeBoolPtr(ptr pointer, tagsize int) int {
+ p := *ptr.toBoolPtr()
+ if p == nil {
+ return 0
+ }
+ return 1 + tagsize
+}
+func sizeBoolSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toBoolSlice()
+ return (1 + tagsize) * len(s)
+}
+func sizeBoolPackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toBoolSlice()
+ if len(s) == 0 {
+ return 0
+ }
+ return len(s) + SizeVarint(uint64(len(s))) + tagsize
+}
+func sizeStringValue(ptr pointer, tagsize int) int {
+ v := *ptr.toString()
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeStringValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toString()
+ if v == "" {
+ return 0
+ }
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeStringPtr(ptr pointer, tagsize int) int {
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return 0
+ }
+ v := *p
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeStringSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toStringSlice()
+ n := 0
+ for _, v := range s {
+ n += len(v) + SizeVarint(uint64(len(v))) + tagsize
+ }
+ return n
+}
+func sizeBytes(ptr pointer, tagsize int) int {
+ v := *ptr.toBytes()
+ if v == nil {
+ return 0
+ }
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeBytes3(ptr pointer, tagsize int) int {
+ v := *ptr.toBytes()
+ if len(v) == 0 {
+ return 0
+ }
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeBytesOneof(ptr pointer, tagsize int) int {
+ v := *ptr.toBytes()
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeBytesSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toBytesSlice()
+ n := 0
+ for _, v := range s {
+ n += len(v) + SizeVarint(uint64(len(v))) + tagsize
+ }
+ return n
+}
+
+// appendFixed32 appends an encoded fixed32 to b.
+func appendFixed32(b []byte, v uint32) []byte {
+ b = append(b,
+ byte(v),
+ byte(v>>8),
+ byte(v>>16),
+ byte(v>>24))
+ return b
+}
+
+// appendFixed64 appends an encoded fixed64 to b.
+func appendFixed64(b []byte, v uint64) []byte {
+ b = append(b,
+ byte(v),
+ byte(v>>8),
+ byte(v>>16),
+ byte(v>>24),
+ byte(v>>32),
+ byte(v>>40),
+ byte(v>>48),
+ byte(v>>56))
+ return b
+}
+
+// appendVarint appends an encoded varint to b.
+func appendVarint(b []byte, v uint64) []byte {
+ // TODO: make 1-byte (maybe 2-byte) case inline-able, once we
+ // have non-leaf inliner.
+ switch {
+ case v < 1<<7:
+ b = append(b, byte(v))
+ case v < 1<<14:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte(v>>7))
+ case v < 1<<21:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte(v>>14))
+ case v < 1<<28:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte(v>>21))
+ case v < 1<<35:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte(v>>28))
+ case v < 1<<42:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte(v>>35))
+ case v < 1<<49:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte(v>>42))
+ case v < 1<<56:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte((v>>42)&0x7f|0x80),
+ byte(v>>49))
+ case v < 1<<63:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte((v>>42)&0x7f|0x80),
+ byte((v>>49)&0x7f|0x80),
+ byte(v>>56))
+ default:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte((v>>42)&0x7f|0x80),
+ byte((v>>49)&0x7f|0x80),
+ byte((v>>56)&0x7f|0x80),
+ 1)
+ }
+ return b
+}
+
+func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, *p)
+ return b, nil
+}
+func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ }
+ return b, nil
+}
+func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(4*len(s)))
+ for _, v := range s {
+ b = appendFixed32(b, v)
+ }
+ return b, nil
+}
+func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(v))
+ return b, nil
+}
+func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(v))
+ return b, nil
+}
+func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(*p))
+ return b, nil
+}
+func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(v))
+ }
+ return b, nil
+}
+func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(4*len(s)))
+ for _, v := range s {
+ b = appendFixed32(b, uint32(v))
+ }
+ return b, nil
+}
+func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float32bits(*ptr.toFloat32())
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float32bits(*ptr.toFloat32())
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toFloat32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, math.Float32bits(*p))
+ return b, nil
+}
+func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, math.Float32bits(v))
+ }
+ return b, nil
+}
+func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(4*len(s)))
+ for _, v := range s {
+ b = appendFixed32(b, math.Float32bits(v))
+ }
+ return b, nil
+}
+func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, *p)
+ return b, nil
+}
+func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ }
+ return b, nil
+}
+func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(8*len(s)))
+ for _, v := range s {
+ b = appendFixed64(b, v)
+ }
+ return b, nil
+}
+func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(v))
+ return b, nil
+}
+func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(v))
+ return b, nil
+}
+func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(*p))
+ return b, nil
+}
+func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(v))
+ }
+ return b, nil
+}
+func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(8*len(s)))
+ for _, v := range s {
+ b = appendFixed64(b, uint64(v))
+ }
+ return b, nil
+}
+func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float64bits(*ptr.toFloat64())
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float64bits(*ptr.toFloat64())
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toFloat64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, math.Float64bits(*p))
+ return b, nil
+}
+func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, math.Float64bits(v))
+ }
+ return b, nil
+}
+func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(8*len(s)))
+ for _, v := range s {
+ b = appendFixed64(b, math.Float64bits(v))
+ }
+ return b, nil
+}
+func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(*p))
+ return b, nil
+}
+func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(*p))
+ return b, nil
+}
+func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, v)
+ return b, nil
+}
+func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, v)
+ return b, nil
+}
+func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, *p)
+ return b, nil
+}
+func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, v)
+ }
+ return b, nil
+}
+func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(v)
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, v)
+ }
+ return b, nil
+}
+func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(*p))
+ return b, nil
+}
+func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ return b, nil
+}
+func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ return b, nil
+}
+func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ v := *p
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ return b, nil
+}
+func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ }
+ return b, nil
+}
+func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ }
+ return b, nil
+}
+func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ return b, nil
+}
+func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ return b, nil
+}
+func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ v := *p
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ return b, nil
+}
+func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ }
+ return b, nil
+}
+func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ }
+ return b, nil
+}
+func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBool()
+ b = appendVarint(b, wiretag)
+ if v {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ return b, nil
+}
+func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBool()
+ if !v {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = append(b, 1)
+ return b, nil
+}
+
+func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toBoolPtr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ if *p {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ return b, nil
+}
+func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toBoolSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ if v {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ }
+ return b, nil
+}
+func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toBoolSlice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(len(s)))
+ for _, v := range s {
+ if v {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ }
+ return b, nil
+}
+func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toString()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toString()
+ if v == "" {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return b, nil
+ }
+ v := *p
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toStringSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ return b, nil
+}
+func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ v := *ptr.toString()
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ v := *ptr.toString()
+ if v == "" {
+ return b, nil
+ }
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return b, nil
+ }
+ v := *p
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ s := *ptr.toStringSlice()
+ for _, v := range s {
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBytes()
+ if v == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBytes()
+ if len(v) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBytes()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toBytesSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ return b, nil
+}
+
+// makeGroupMarshaler returns the sizer and marshaler for a group.
+// u is the marshal info of the underlying message.
+func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ return u.size(p) + 2*tagsize
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return b, nil
+ }
+ var err error
+ b = appendVarint(b, wiretag) // start group
+ b, err = u.marshal(b, p, deterministic)
+ b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
+ return b, err
+ }
+}
+
+// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice.
+// u is the marshal info of the underlying message.
+func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getPointerSlice()
+ n := 0
+ for _, v := range s {
+ if v.isNil() {
+ continue
+ }
+ n += u.size(v) + 2*tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getPointerSlice()
+ var err error
+ var nerr nonFatal
+ for _, v := range s {
+ if v.isNil() {
+ return b, errRepeatedHasNil
+ }
+ b = appendVarint(b, wiretag) // start group
+ b, err = u.marshal(b, v, deterministic)
+ b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
+ if !nerr.Merge(err) {
+ if err == ErrNil {
+ err = errRepeatedHasNil
+ }
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+}
+
+// makeMessageMarshaler returns the sizer and marshaler for a message field.
+// u is the marshal info of the message.
+func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ siz := u.size(p)
+ return siz + SizeVarint(uint64(siz)) + tagsize
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ siz := u.cachedsize(p)
+ b = appendVarint(b, uint64(siz))
+ return u.marshal(b, p, deterministic)
+ }
+}
+
+// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice.
+// u is the marshal info of the message.
+func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getPointerSlice()
+ n := 0
+ for _, v := range s {
+ if v.isNil() {
+ continue
+ }
+ siz := u.size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getPointerSlice()
+ var err error
+ var nerr nonFatal
+ for _, v := range s {
+ if v.isNil() {
+ return b, errRepeatedHasNil
+ }
+ b = appendVarint(b, wiretag)
+ siz := u.cachedsize(v)
+ b = appendVarint(b, uint64(siz))
+ b, err = u.marshal(b, v, deterministic)
+
+ if !nerr.Merge(err) {
+ if err == ErrNil {
+ err = errRepeatedHasNil
+ }
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+}
+
+// makeMapMarshaler returns the sizer and marshaler for a map field.
+// f is the pointer to the reflect data structure of the field.
+func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
+ // figure out key and value type
+ t := f.Type
+ keyType := t.Key()
+ valType := t.Elem()
+ keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",")
+ valTags := strings.Split(f.Tag.Get("protobuf_val"), ",")
+ keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map
+ valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map
+ keyWireTag := 1<<3 | wiretype(keyTags[0])
+ valWireTag := 2<<3 | wiretype(valTags[0])
+
+ // We create an interface to get the addresses of the map key and value.
+ // If value is pointer-typed, the interface is a direct interface, the
+ // idata itself is the value. Otherwise, the idata is the pointer to the
+ // value.
+ // Key cannot be pointer-typed.
+ valIsPtr := valType.Kind() == reflect.Ptr
+
+ // If value is a message with nested maps, calling
+ // valSizer in marshal may be quadratic. We should use
+ // cached version in marshal (but not in size).
+ // If value is not message type, we don't have size cache,
+ // but it cannot be nested either. Just use valSizer.
+ valCachedSizer := valSizer
+ if valIsPtr && valType.Elem().Kind() == reflect.Struct {
+ u := getMarshalInfo(valType.Elem())
+ valCachedSizer = func(ptr pointer, tagsize int) int {
+ // Same as message sizer, but use cache.
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ siz := u.cachedsize(p)
+ return siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ }
+ return func(ptr pointer, tagsize int) int {
+ m := ptr.asPointerTo(t).Elem() // the map
+ n := 0
+ for _, k := range m.MapKeys() {
+ ki := k.Interface()
+ vi := m.MapIndex(k).Interface()
+ kaddr := toAddrPointer(&ki, false) // pointer to key
+ vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
+ siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) {
+ m := ptr.asPointerTo(t).Elem() // the map
+ var err error
+ keys := m.MapKeys()
+ if len(keys) > 1 && deterministic {
+ sort.Sort(mapKeys(keys))
+ }
+
+ var nerr nonFatal
+ for _, k := range keys {
+ ki := k.Interface()
+ vi := m.MapIndex(k).Interface()
+ kaddr := toAddrPointer(&ki, false) // pointer to key
+ vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
+ b = appendVarint(b, tag)
+ siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+ b = appendVarint(b, uint64(siz))
+ b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
+ if err != ErrNil && !nerr.Merge(err) { // allow nil value in map
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+}
+
+// makeOneOfMarshaler returns the sizer and marshaler for a oneof field.
+// fi is the marshal info of the field.
+// f is the pointer to the reflect data structure of the field.
+func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) {
+ // Oneof field is an interface. We need to get the actual data type on the fly.
+ t := f.Type
+ return func(ptr pointer, _ int) int {
+ p := ptr.getInterfacePointer()
+ if p.isNil() {
+ return 0
+ }
+ v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
+ telem := v.Type()
+ e := fi.oneofElems[telem]
+ return e.sizer(p, e.tagsize)
+ },
+ func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) {
+ p := ptr.getInterfacePointer()
+ if p.isNil() {
+ return b, nil
+ }
+ v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
+ telem := v.Type()
+ if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() {
+ return b, errOneofHasNil
+ }
+ e := fi.oneofElems[telem]
+ return e.marshaler(b, p, e.wiretag, deterministic)
+ }
+}
+
+// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field.
+func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return 0
+ }
+ mu.Lock()
+
+ n := 0
+ for _, e := range m {
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ n += len(e.enc)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ n += ei.sizer(p, ei.tagsize)
+ }
+ mu.Unlock()
+ return n
+}
+
+// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b.
+func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return b, nil
+ }
+ mu.Lock()
+ defer mu.Unlock()
+
+ var err error
+ var nerr nonFatal
+
+ // Fast-path for common cases: zero or one extensions.
+ // Don't bother sorting the keys.
+ if len(m) <= 1 {
+ for _, e := range m {
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ b = append(b, e.enc...)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+
+ // Sort the keys to provide a deterministic encoding.
+ // Not sure this is required, but the old code does it.
+ keys := make([]int, 0, len(m))
+ for k := range m {
+ keys = append(keys, int(k))
+ }
+ sort.Ints(keys)
+
+ for _, k := range keys {
+ e := m[int32(k)]
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ b = append(b, e.enc...)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+}
+
+// message set format is:
+// message MessageSet {
+// repeated group Item = 1 {
+// required int32 type_id = 2;
+// required string message = 3;
+// };
+// }
+
+// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field
+// in message set format (above).
+func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return 0
+ }
+ mu.Lock()
+
+ n := 0
+ for id, e := range m {
+ n += 2 // start group, end group. tag = 1 (size=1)
+ n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1)
+
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
+ siz := len(msgWithLen)
+ n += siz + 1 // message, tag = 3 (size=1)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ n += ei.sizer(p, 1) // message, tag = 3 (size=1)
+ }
+ mu.Unlock()
+ return n
+}
+
+// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above)
+// to the end of byte slice b.
+func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return b, nil
+ }
+ mu.Lock()
+ defer mu.Unlock()
+
+ var err error
+ var nerr nonFatal
+
+ // Fast-path for common cases: zero or one extensions.
+ // Don't bother sorting the keys.
+ if len(m) <= 1 {
+ for id, e := range m {
+ b = append(b, 1<<3|WireStartGroup)
+ b = append(b, 2<<3|WireVarint)
+ b = appendVarint(b, uint64(id))
+
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
+ b = append(b, 3<<3|WireBytes)
+ b = append(b, msgWithLen...)
+ b = append(b, 1<<3|WireEndGroup)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ b = append(b, 1<<3|WireEndGroup)
+ }
+ return b, nerr.E
+ }
+
+ // Sort the keys to provide a deterministic encoding.
+ keys := make([]int, 0, len(m))
+ for k := range m {
+ keys = append(keys, int(k))
+ }
+ sort.Ints(keys)
+
+ for _, id := range keys {
+ e := m[int32(id)]
+ b = append(b, 1<<3|WireStartGroup)
+ b = append(b, 2<<3|WireVarint)
+ b = appendVarint(b, uint64(id))
+
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
+ b = append(b, 3<<3|WireBytes)
+ b = append(b, msgWithLen...)
+ b = append(b, 1<<3|WireEndGroup)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
+ b = append(b, 1<<3|WireEndGroup)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+}
+
+// sizeV1Extensions computes the size of encoded data for a V1-API extension field.
+func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int {
+ if m == nil {
+ return 0
+ }
+
+ n := 0
+ for _, e := range m {
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ n += len(e.enc)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ n += ei.sizer(p, ei.tagsize)
+ }
+ return n
+}
+
+// appendV1Extensions marshals a V1-API extension field to the end of byte slice b.
+func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) {
+ if m == nil {
+ return b, nil
+ }
+
+ // Sort the keys to provide a deterministic encoding.
+ keys := make([]int, 0, len(m))
+ for k := range m {
+ keys = append(keys, int(k))
+ }
+ sort.Ints(keys)
+
+ var err error
+ var nerr nonFatal
+ for _, k := range keys {
+ e := m[int32(k)]
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ b = append(b, e.enc...)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+}
+
+// newMarshaler is the interface representing objects that can marshal themselves.
+//
+// This exists to support protoc-gen-go generated messages.
+// The proto package will stop type-asserting to this interface in the future.
+//
+// DO NOT DEPEND ON THIS.
+type newMarshaler interface {
+ XXX_Size() int
+ XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
+}
+
+// Size returns the encoded size of a protocol buffer message.
+// This is the main entry point.
+func Size(pb Message) int {
+ if m, ok := pb.(newMarshaler); ok {
+ return m.XXX_Size()
+ }
+ if m, ok := pb.(Marshaler); ok {
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ b, _ := m.Marshal()
+ return len(b)
+ }
+ // in case somehow we didn't generate the wrapper
+ if pb == nil {
+ return 0
+ }
+ var info InternalMessageInfo
+ return info.Size(pb)
+}
+
+// Marshal takes a protocol buffer message
+// and encodes it into the wire format, returning the data.
+// This is the main entry point.
+func Marshal(pb Message) ([]byte, error) {
+ if m, ok := pb.(newMarshaler); ok {
+ siz := m.XXX_Size()
+ b := make([]byte, 0, siz)
+ return m.XXX_Marshal(b, false)
+ }
+ if m, ok := pb.(Marshaler); ok {
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ return m.Marshal()
+ }
+ // in case somehow we didn't generate the wrapper
+ if pb == nil {
+ return nil, ErrNil
+ }
+ var info InternalMessageInfo
+ siz := info.Size(pb)
+ b := make([]byte, 0, siz)
+ return info.Marshal(b, pb, false)
+}
+
+// Marshal takes a protocol buffer message
+// and encodes it into the wire format, writing the result to the
+// Buffer.
+// This is an alternative entry point. It is not necessary to use
+// a Buffer for most applications.
+func (p *Buffer) Marshal(pb Message) error {
+ var err error
+ if m, ok := pb.(newMarshaler); ok {
+ siz := m.XXX_Size()
+ p.grow(siz) // make sure buf has enough capacity
+ p.buf, err = m.XXX_Marshal(p.buf, p.deterministic)
+ return err
+ }
+ if m, ok := pb.(Marshaler); ok {
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ b, err := m.Marshal()
+ p.buf = append(p.buf, b...)
+ return err
+ }
+ // in case somehow we didn't generate the wrapper
+ if pb == nil {
+ return ErrNil
+ }
+ var info InternalMessageInfo
+ siz := info.Size(pb)
+ p.grow(siz) // make sure buf has enough capacity
+ p.buf, err = info.Marshal(p.buf, pb, p.deterministic)
+ return err
+}
+
+// grow grows the buffer's capacity, if necessary, to guarantee space for
+// another n bytes. After grow(n), at least n bytes can be written to the
+// buffer without another allocation.
+func (p *Buffer) grow(n int) {
+ need := len(p.buf) + n
+ if need <= cap(p.buf) {
+ return
+ }
+ newCap := len(p.buf) * 2
+ if newCap < need {
+ newCap = need
+ }
+ p.buf = append(make([]byte, 0, newCap), p.buf...)
+}
diff --git a/vendor/github.com/golang/protobuf/proto/table_merge.go b/vendor/github.com/golang/protobuf/proto/table_merge.go
new file mode 100644
index 00000000..5525def6
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/table_merge.go
@@ -0,0 +1,654 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2016 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+ "sync"
+ "sync/atomic"
+)
+
+// Merge merges the src message into dst.
+// This assumes that dst and src of the same type and are non-nil.
+func (a *InternalMessageInfo) Merge(dst, src Message) {
+ mi := atomicLoadMergeInfo(&a.merge)
+ if mi == nil {
+ mi = getMergeInfo(reflect.TypeOf(dst).Elem())
+ atomicStoreMergeInfo(&a.merge, mi)
+ }
+ mi.merge(toPointer(&dst), toPointer(&src))
+}
+
+type mergeInfo struct {
+ typ reflect.Type
+
+ initialized int32 // 0: only typ is valid, 1: everything is valid
+ lock sync.Mutex
+
+ fields []mergeFieldInfo
+ unrecognized field // Offset of XXX_unrecognized
+}
+
+type mergeFieldInfo struct {
+ field field // Offset of field, guaranteed to be valid
+
+ // isPointer reports whether the value in the field is a pointer.
+ // This is true for the following situations:
+ // * Pointer to struct
+ // * Pointer to basic type (proto2 only)
+ // * Slice (first value in slice header is a pointer)
+ // * String (first value in string header is a pointer)
+ isPointer bool
+
+ // basicWidth reports the width of the field assuming that it is directly
+ // embedded in the struct (as is the case for basic types in proto3).
+ // The possible values are:
+ // 0: invalid
+ // 1: bool
+ // 4: int32, uint32, float32
+ // 8: int64, uint64, float64
+ basicWidth int
+
+ // Where dst and src are pointers to the types being merged.
+ merge func(dst, src pointer)
+}
+
+var (
+ mergeInfoMap = map[reflect.Type]*mergeInfo{}
+ mergeInfoLock sync.Mutex
+)
+
+func getMergeInfo(t reflect.Type) *mergeInfo {
+ mergeInfoLock.Lock()
+ defer mergeInfoLock.Unlock()
+ mi := mergeInfoMap[t]
+ if mi == nil {
+ mi = &mergeInfo{typ: t}
+ mergeInfoMap[t] = mi
+ }
+ return mi
+}
+
+// merge merges src into dst assuming they are both of type *mi.typ.
+func (mi *mergeInfo) merge(dst, src pointer) {
+ if dst.isNil() {
+ panic("proto: nil destination")
+ }
+ if src.isNil() {
+ return // Nothing to do.
+ }
+
+ if atomic.LoadInt32(&mi.initialized) == 0 {
+ mi.computeMergeInfo()
+ }
+
+ for _, fi := range mi.fields {
+ sfp := src.offset(fi.field)
+
+ // As an optimization, we can avoid the merge function call cost
+ // if we know for sure that the source will have no effect
+ // by checking if it is the zero value.
+ if unsafeAllowed {
+ if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string
+ continue
+ }
+ if fi.basicWidth > 0 {
+ switch {
+ case fi.basicWidth == 1 && !*sfp.toBool():
+ continue
+ case fi.basicWidth == 4 && *sfp.toUint32() == 0:
+ continue
+ case fi.basicWidth == 8 && *sfp.toUint64() == 0:
+ continue
+ }
+ }
+ }
+
+ dfp := dst.offset(fi.field)
+ fi.merge(dfp, sfp)
+ }
+
+ // TODO: Make this faster?
+ out := dst.asPointerTo(mi.typ).Elem()
+ in := src.asPointerTo(mi.typ).Elem()
+ if emIn, err := extendable(in.Addr().Interface()); err == nil {
+ emOut, _ := extendable(out.Addr().Interface())
+ mIn, muIn := emIn.extensionsRead()
+ if mIn != nil {
+ mOut := emOut.extensionsWrite()
+ muIn.Lock()
+ mergeExtension(mOut, mIn)
+ muIn.Unlock()
+ }
+ }
+
+ if mi.unrecognized.IsValid() {
+ if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 {
+ *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...)
+ }
+ }
+}
+
+func (mi *mergeInfo) computeMergeInfo() {
+ mi.lock.Lock()
+ defer mi.lock.Unlock()
+ if mi.initialized != 0 {
+ return
+ }
+ t := mi.typ
+ n := t.NumField()
+
+ props := GetProperties(t)
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+
+ mfi := mergeFieldInfo{field: toField(&f)}
+ tf := f.Type
+
+ // As an optimization, we can avoid the merge function call cost
+ // if we know for sure that the source will have no effect
+ // by checking if it is the zero value.
+ if unsafeAllowed {
+ switch tf.Kind() {
+ case reflect.Ptr, reflect.Slice, reflect.String:
+ // As a special case, we assume slices and strings are pointers
+ // since we know that the first field in the SliceSlice or
+ // StringHeader is a data pointer.
+ mfi.isPointer = true
+ case reflect.Bool:
+ mfi.basicWidth = 1
+ case reflect.Int32, reflect.Uint32, reflect.Float32:
+ mfi.basicWidth = 4
+ case reflect.Int64, reflect.Uint64, reflect.Float64:
+ mfi.basicWidth = 8
+ }
+ }
+
+ // Unwrap tf to get at its most basic type.
+ var isPointer, isSlice bool
+ if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
+ isSlice = true
+ tf = tf.Elem()
+ }
+ if tf.Kind() == reflect.Ptr {
+ isPointer = true
+ tf = tf.Elem()
+ }
+ if isPointer && isSlice && tf.Kind() != reflect.Struct {
+ panic("both pointer and slice for basic type in " + tf.Name())
+ }
+
+ switch tf.Kind() {
+ case reflect.Int32:
+ switch {
+ case isSlice: // E.g., []int32
+ mfi.merge = func(dst, src pointer) {
+ // NOTE: toInt32Slice is not defined (see pointer_reflect.go).
+ /*
+ sfsp := src.toInt32Slice()
+ if *sfsp != nil {
+ dfsp := dst.toInt32Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []int64{}
+ }
+ }
+ */
+ sfs := src.getInt32Slice()
+ if sfs != nil {
+ dfs := dst.getInt32Slice()
+ dfs = append(dfs, sfs...)
+ if dfs == nil {
+ dfs = []int32{}
+ }
+ dst.setInt32Slice(dfs)
+ }
+ }
+ case isPointer: // E.g., *int32
+ mfi.merge = func(dst, src pointer) {
+ // NOTE: toInt32Ptr is not defined (see pointer_reflect.go).
+ /*
+ sfpp := src.toInt32Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toInt32Ptr()
+ if *dfpp == nil {
+ *dfpp = Int32(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ */
+ sfp := src.getInt32Ptr()
+ if sfp != nil {
+ dfp := dst.getInt32Ptr()
+ if dfp == nil {
+ dst.setInt32Ptr(*sfp)
+ } else {
+ *dfp = *sfp
+ }
+ }
+ }
+ default: // E.g., int32
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toInt32(); v != 0 {
+ *dst.toInt32() = v
+ }
+ }
+ }
+ case reflect.Int64:
+ switch {
+ case isSlice: // E.g., []int64
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toInt64Slice()
+ if *sfsp != nil {
+ dfsp := dst.toInt64Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []int64{}
+ }
+ }
+ }
+ case isPointer: // E.g., *int64
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toInt64Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toInt64Ptr()
+ if *dfpp == nil {
+ *dfpp = Int64(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., int64
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toInt64(); v != 0 {
+ *dst.toInt64() = v
+ }
+ }
+ }
+ case reflect.Uint32:
+ switch {
+ case isSlice: // E.g., []uint32
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toUint32Slice()
+ if *sfsp != nil {
+ dfsp := dst.toUint32Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []uint32{}
+ }
+ }
+ }
+ case isPointer: // E.g., *uint32
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toUint32Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toUint32Ptr()
+ if *dfpp == nil {
+ *dfpp = Uint32(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., uint32
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toUint32(); v != 0 {
+ *dst.toUint32() = v
+ }
+ }
+ }
+ case reflect.Uint64:
+ switch {
+ case isSlice: // E.g., []uint64
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toUint64Slice()
+ if *sfsp != nil {
+ dfsp := dst.toUint64Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []uint64{}
+ }
+ }
+ }
+ case isPointer: // E.g., *uint64
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toUint64Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toUint64Ptr()
+ if *dfpp == nil {
+ *dfpp = Uint64(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., uint64
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toUint64(); v != 0 {
+ *dst.toUint64() = v
+ }
+ }
+ }
+ case reflect.Float32:
+ switch {
+ case isSlice: // E.g., []float32
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toFloat32Slice()
+ if *sfsp != nil {
+ dfsp := dst.toFloat32Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []float32{}
+ }
+ }
+ }
+ case isPointer: // E.g., *float32
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toFloat32Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toFloat32Ptr()
+ if *dfpp == nil {
+ *dfpp = Float32(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., float32
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toFloat32(); v != 0 {
+ *dst.toFloat32() = v
+ }
+ }
+ }
+ case reflect.Float64:
+ switch {
+ case isSlice: // E.g., []float64
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toFloat64Slice()
+ if *sfsp != nil {
+ dfsp := dst.toFloat64Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []float64{}
+ }
+ }
+ }
+ case isPointer: // E.g., *float64
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toFloat64Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toFloat64Ptr()
+ if *dfpp == nil {
+ *dfpp = Float64(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., float64
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toFloat64(); v != 0 {
+ *dst.toFloat64() = v
+ }
+ }
+ }
+ case reflect.Bool:
+ switch {
+ case isSlice: // E.g., []bool
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toBoolSlice()
+ if *sfsp != nil {
+ dfsp := dst.toBoolSlice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []bool{}
+ }
+ }
+ }
+ case isPointer: // E.g., *bool
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toBoolPtr()
+ if *sfpp != nil {
+ dfpp := dst.toBoolPtr()
+ if *dfpp == nil {
+ *dfpp = Bool(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., bool
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toBool(); v {
+ *dst.toBool() = v
+ }
+ }
+ }
+ case reflect.String:
+ switch {
+ case isSlice: // E.g., []string
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toStringSlice()
+ if *sfsp != nil {
+ dfsp := dst.toStringSlice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []string{}
+ }
+ }
+ }
+ case isPointer: // E.g., *string
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toStringPtr()
+ if *sfpp != nil {
+ dfpp := dst.toStringPtr()
+ if *dfpp == nil {
+ *dfpp = String(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., string
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toString(); v != "" {
+ *dst.toString() = v
+ }
+ }
+ }
+ case reflect.Slice:
+ isProto3 := props.Prop[i].proto3
+ switch {
+ case isPointer:
+ panic("bad pointer in byte slice case in " + tf.Name())
+ case tf.Elem().Kind() != reflect.Uint8:
+ panic("bad element kind in byte slice case in " + tf.Name())
+ case isSlice: // E.g., [][]byte
+ mfi.merge = func(dst, src pointer) {
+ sbsp := src.toBytesSlice()
+ if *sbsp != nil {
+ dbsp := dst.toBytesSlice()
+ for _, sb := range *sbsp {
+ if sb == nil {
+ *dbsp = append(*dbsp, nil)
+ } else {
+ *dbsp = append(*dbsp, append([]byte{}, sb...))
+ }
+ }
+ if *dbsp == nil {
+ *dbsp = [][]byte{}
+ }
+ }
+ }
+ default: // E.g., []byte
+ mfi.merge = func(dst, src pointer) {
+ sbp := src.toBytes()
+ if *sbp != nil {
+ dbp := dst.toBytes()
+ if !isProto3 || len(*sbp) > 0 {
+ *dbp = append([]byte{}, *sbp...)
+ }
+ }
+ }
+ }
+ case reflect.Struct:
+ switch {
+ case !isPointer:
+ panic(fmt.Sprintf("message field %s without pointer", tf))
+ case isSlice: // E.g., []*pb.T
+ mi := getMergeInfo(tf)
+ mfi.merge = func(dst, src pointer) {
+ sps := src.getPointerSlice()
+ if sps != nil {
+ dps := dst.getPointerSlice()
+ for _, sp := range sps {
+ var dp pointer
+ if !sp.isNil() {
+ dp = valToPointer(reflect.New(tf))
+ mi.merge(dp, sp)
+ }
+ dps = append(dps, dp)
+ }
+ if dps == nil {
+ dps = []pointer{}
+ }
+ dst.setPointerSlice(dps)
+ }
+ }
+ default: // E.g., *pb.T
+ mi := getMergeInfo(tf)
+ mfi.merge = func(dst, src pointer) {
+ sp := src.getPointer()
+ if !sp.isNil() {
+ dp := dst.getPointer()
+ if dp.isNil() {
+ dp = valToPointer(reflect.New(tf))
+ dst.setPointer(dp)
+ }
+ mi.merge(dp, sp)
+ }
+ }
+ }
+ case reflect.Map:
+ switch {
+ case isPointer || isSlice:
+ panic("bad pointer or slice in map case in " + tf.Name())
+ default: // E.g., map[K]V
+ mfi.merge = func(dst, src pointer) {
+ sm := src.asPointerTo(tf).Elem()
+ if sm.Len() == 0 {
+ return
+ }
+ dm := dst.asPointerTo(tf).Elem()
+ if dm.IsNil() {
+ dm.Set(reflect.MakeMap(tf))
+ }
+
+ switch tf.Elem().Kind() {
+ case reflect.Ptr: // Proto struct (e.g., *T)
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ val = reflect.ValueOf(Clone(val.Interface().(Message)))
+ dm.SetMapIndex(key, val)
+ }
+ case reflect.Slice: // E.g. Bytes type (e.g., []byte)
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
+ dm.SetMapIndex(key, val)
+ }
+ default: // Basic type (e.g., string)
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ dm.SetMapIndex(key, val)
+ }
+ }
+ }
+ }
+ case reflect.Interface:
+ // Must be oneof field.
+ switch {
+ case isPointer || isSlice:
+ panic("bad pointer or slice in interface case in " + tf.Name())
+ default: // E.g., interface{}
+ // TODO: Make this faster?
+ mfi.merge = func(dst, src pointer) {
+ su := src.asPointerTo(tf).Elem()
+ if !su.IsNil() {
+ du := dst.asPointerTo(tf).Elem()
+ typ := su.Elem().Type()
+ if du.IsNil() || du.Elem().Type() != typ {
+ du.Set(reflect.New(typ.Elem())) // Initialize interface if empty
+ }
+ sv := su.Elem().Elem().Field(0)
+ if sv.Kind() == reflect.Ptr && sv.IsNil() {
+ return
+ }
+ dv := du.Elem().Elem().Field(0)
+ if dv.Kind() == reflect.Ptr && dv.IsNil() {
+ dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty
+ }
+ switch sv.Type().Kind() {
+ case reflect.Ptr: // Proto struct (e.g., *T)
+ Merge(dv.Interface().(Message), sv.Interface().(Message))
+ case reflect.Slice: // E.g. Bytes type (e.g., []byte)
+ dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...)))
+ default: // Basic type (e.g., string)
+ dv.Set(sv)
+ }
+ }
+ }
+ }
+ default:
+ panic(fmt.Sprintf("merger not found for type:%s", tf))
+ }
+ mi.fields = append(mi.fields, mfi)
+ }
+
+ mi.unrecognized = invalidField
+ if f, ok := t.FieldByName("XXX_unrecognized"); ok {
+ if f.Type != reflect.TypeOf([]byte{}) {
+ panic("expected XXX_unrecognized to be of type []byte")
+ }
+ mi.unrecognized = toField(&f)
+ }
+
+ atomic.StoreInt32(&mi.initialized, 1)
+}
diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
new file mode 100644
index 00000000..ebf1caa5
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
@@ -0,0 +1,2051 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2016 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "reflect"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "unicode/utf8"
+)
+
+// Unmarshal is the entry point from the generated .pb.go files.
+// This function is not intended to be used by non-generated code.
+// This function is not subject to any compatibility guarantee.
+// msg contains a pointer to a protocol buffer struct.
+// b is the data to be unmarshaled into the protocol buffer.
+// a is a pointer to a place to store cached unmarshal information.
+func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error {
+ // Load the unmarshal information for this message type.
+ // The atomic load ensures memory consistency.
+ u := atomicLoadUnmarshalInfo(&a.unmarshal)
+ if u == nil {
+ // Slow path: find unmarshal info for msg, update a with it.
+ u = getUnmarshalInfo(reflect.TypeOf(msg).Elem())
+ atomicStoreUnmarshalInfo(&a.unmarshal, u)
+ }
+ // Then do the unmarshaling.
+ err := u.unmarshal(toPointer(&msg), b)
+ return err
+}
+
+type unmarshalInfo struct {
+ typ reflect.Type // type of the protobuf struct
+
+ // 0 = only typ field is initialized
+ // 1 = completely initialized
+ initialized int32
+ lock sync.Mutex // prevents double initialization
+ dense []unmarshalFieldInfo // fields indexed by tag #
+ sparse map[uint64]unmarshalFieldInfo // fields indexed by tag #
+ reqFields []string // names of required fields
+ reqMask uint64 // 1< 0 {
+ // Read tag and wire type.
+ // Special case 1 and 2 byte varints.
+ var x uint64
+ if b[0] < 128 {
+ x = uint64(b[0])
+ b = b[1:]
+ } else if len(b) >= 2 && b[1] < 128 {
+ x = uint64(b[0]&0x7f) + uint64(b[1])<<7
+ b = b[2:]
+ } else {
+ var n int
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ }
+ tag := x >> 3
+ wire := int(x) & 7
+
+ // Dispatch on the tag to one of the unmarshal* functions below.
+ var f unmarshalFieldInfo
+ if tag < uint64(len(u.dense)) {
+ f = u.dense[tag]
+ } else {
+ f = u.sparse[tag]
+ }
+ if fn := f.unmarshal; fn != nil {
+ var err error
+ b, err = fn(b, m.offset(f.field), wire)
+ if err == nil {
+ reqMask |= f.reqMask
+ continue
+ }
+ if r, ok := err.(*RequiredNotSetError); ok {
+ // Remember this error, but keep parsing. We need to produce
+ // a full parse even if a required field is missing.
+ if errLater == nil {
+ errLater = r
+ }
+ reqMask |= f.reqMask
+ continue
+ }
+ if err != errInternalBadWireType {
+ if err == errInvalidUTF8 {
+ if errLater == nil {
+ fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+ errLater = &invalidUTF8Error{fullName}
+ }
+ continue
+ }
+ return err
+ }
+ // Fragments with bad wire type are treated as unknown fields.
+ }
+
+ // Unknown tag.
+ if !u.unrecognized.IsValid() {
+ // Don't keep unrecognized data; just skip it.
+ var err error
+ b, err = skipField(b, wire)
+ if err != nil {
+ return err
+ }
+ continue
+ }
+ // Keep unrecognized data around.
+ // maybe in extensions, maybe in the unrecognized field.
+ z := m.offset(u.unrecognized).toBytes()
+ var emap map[int32]Extension
+ var e Extension
+ for _, r := range u.extensionRanges {
+ if uint64(r.Start) <= tag && tag <= uint64(r.End) {
+ if u.extensions.IsValid() {
+ mp := m.offset(u.extensions).toExtensions()
+ emap = mp.extensionsWrite()
+ e = emap[int32(tag)]
+ z = &e.enc
+ break
+ }
+ if u.oldExtensions.IsValid() {
+ p := m.offset(u.oldExtensions).toOldExtensions()
+ emap = *p
+ if emap == nil {
+ emap = map[int32]Extension{}
+ *p = emap
+ }
+ e = emap[int32(tag)]
+ z = &e.enc
+ break
+ }
+ panic("no extensions field available")
+ }
+ }
+
+ // Use wire type to skip data.
+ var err error
+ b0 := b
+ b, err = skipField(b, wire)
+ if err != nil {
+ return err
+ }
+ *z = encodeVarint(*z, tag<<3|uint64(wire))
+ *z = append(*z, b0[:len(b0)-len(b)]...)
+
+ if emap != nil {
+ emap[int32(tag)] = e
+ }
+ }
+ if reqMask != u.reqMask && errLater == nil {
+ // A required field of this message is missing.
+ for _, n := range u.reqFields {
+ if reqMask&1 == 0 {
+ errLater = &RequiredNotSetError{n}
+ }
+ reqMask >>= 1
+ }
+ }
+ return errLater
+}
+
+// computeUnmarshalInfo fills in u with information for use
+// in unmarshaling protocol buffers of type u.typ.
+func (u *unmarshalInfo) computeUnmarshalInfo() {
+ u.lock.Lock()
+ defer u.lock.Unlock()
+ if u.initialized != 0 {
+ return
+ }
+ t := u.typ
+ n := t.NumField()
+
+ // Set up the "not found" value for the unrecognized byte buffer.
+ // This is the default for proto3.
+ u.unrecognized = invalidField
+ u.extensions = invalidField
+ u.oldExtensions = invalidField
+
+ // List of the generated type and offset for each oneof field.
+ type oneofField struct {
+ ityp reflect.Type // interface type of oneof field
+ field field // offset in containing message
+ }
+ var oneofFields []oneofField
+
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ if f.Name == "XXX_unrecognized" {
+ // The byte slice used to hold unrecognized input is special.
+ if f.Type != reflect.TypeOf(([]byte)(nil)) {
+ panic("bad type for XXX_unrecognized field: " + f.Type.Name())
+ }
+ u.unrecognized = toField(&f)
+ continue
+ }
+ if f.Name == "XXX_InternalExtensions" {
+ // Ditto here.
+ if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) {
+ panic("bad type for XXX_InternalExtensions field: " + f.Type.Name())
+ }
+ u.extensions = toField(&f)
+ if f.Tag.Get("protobuf_messageset") == "1" {
+ u.isMessageSet = true
+ }
+ continue
+ }
+ if f.Name == "XXX_extensions" {
+ // An older form of the extensions field.
+ if f.Type != reflect.TypeOf((map[int32]Extension)(nil)) {
+ panic("bad type for XXX_extensions field: " + f.Type.Name())
+ }
+ u.oldExtensions = toField(&f)
+ continue
+ }
+ if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" {
+ continue
+ }
+
+ oneof := f.Tag.Get("protobuf_oneof")
+ if oneof != "" {
+ oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)})
+ // The rest of oneof processing happens below.
+ continue
+ }
+
+ tags := f.Tag.Get("protobuf")
+ tagArray := strings.Split(tags, ",")
+ if len(tagArray) < 2 {
+ panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags)
+ }
+ tag, err := strconv.Atoi(tagArray[1])
+ if err != nil {
+ panic("protobuf tag field not an integer: " + tagArray[1])
+ }
+
+ name := ""
+ for _, tag := range tagArray[3:] {
+ if strings.HasPrefix(tag, "name=") {
+ name = tag[5:]
+ }
+ }
+
+ // Extract unmarshaling function from the field (its type and tags).
+ unmarshal := fieldUnmarshaler(&f)
+
+ // Required field?
+ var reqMask uint64
+ if tagArray[2] == "req" {
+ bit := len(u.reqFields)
+ u.reqFields = append(u.reqFields, name)
+ reqMask = uint64(1) << uint(bit)
+ // TODO: if we have more than 64 required fields, we end up
+ // not verifying that all required fields are present.
+ // Fix this, perhaps using a count of required fields?
+ }
+
+ // Store the info in the correct slot in the message.
+ u.setTag(tag, toField(&f), unmarshal, reqMask, name)
+ }
+
+ // Find any types associated with oneof fields.
+ // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it?
+ fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs")
+ if fn.IsValid() {
+ res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{}
+ for i := res.Len() - 1; i >= 0; i-- {
+ v := res.Index(i) // interface{}
+ tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X
+ typ := tptr.Elem() // Msg_X
+
+ f := typ.Field(0) // oneof implementers have one field
+ baseUnmarshal := fieldUnmarshaler(&f)
+ tags := strings.Split(f.Tag.Get("protobuf"), ",")
+ fieldNum, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("protobuf tag field not an integer: " + tags[1])
+ }
+ var name string
+ for _, tag := range tags {
+ if strings.HasPrefix(tag, "name=") {
+ name = strings.TrimPrefix(tag, "name=")
+ break
+ }
+ }
+
+ // Find the oneof field that this struct implements.
+ // Might take O(n^2) to process all of the oneofs, but who cares.
+ for _, of := range oneofFields {
+ if tptr.Implements(of.ityp) {
+ // We have found the corresponding interface for this struct.
+ // That lets us know where this struct should be stored
+ // when we encounter it during unmarshaling.
+ unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
+ u.setTag(fieldNum, of.field, unmarshal, 0, name)
+ }
+ }
+ }
+ }
+
+ // Get extension ranges, if any.
+ fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
+ if fn.IsValid() {
+ if !u.extensions.IsValid() && !u.oldExtensions.IsValid() {
+ panic("a message with extensions, but no extensions field in " + t.Name())
+ }
+ u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange)
+ }
+
+ // Explicitly disallow tag 0. This will ensure we flag an error
+ // when decoding a buffer of all zeros. Without this code, we
+ // would decode and skip an all-zero buffer of even length.
+ // [0 0] is [tag=0/wiretype=varint varint-encoded-0].
+ u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
+ return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
+ }, 0, "")
+
+ // Set mask for required field check.
+ u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
+ for len(u.dense) <= tag {
+ u.dense = append(u.dense, unmarshalFieldInfo{})
+ }
+ u.dense[tag] = i
+ return
+ }
+ if u.sparse == nil {
+ u.sparse = map[uint64]unmarshalFieldInfo{}
+ }
+ u.sparse[uint64(tag)] = i
+}
+
+// fieldUnmarshaler returns an unmarshaler for the given field.
+func fieldUnmarshaler(f *reflect.StructField) unmarshaler {
+ if f.Type.Kind() == reflect.Map {
+ return makeUnmarshalMap(f)
+ }
+ return typeUnmarshaler(f.Type, f.Tag.Get("protobuf"))
+}
+
+// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair.
+func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
+ tagArray := strings.Split(tags, ",")
+ encoding := tagArray[0]
+ name := "unknown"
+ proto3 := false
+ validateUTF8 := true
+ for _, tag := range tagArray[3:] {
+ if strings.HasPrefix(tag, "name=") {
+ name = tag[5:]
+ }
+ if tag == "proto3" {
+ proto3 = true
+ }
+ }
+ validateUTF8 = validateUTF8 && proto3
+
+ // Figure out packaging (pointer, slice, or both)
+ slice := false
+ pointer := false
+ if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
+ slice = true
+ t = t.Elem()
+ }
+ if t.Kind() == reflect.Ptr {
+ pointer = true
+ t = t.Elem()
+ }
+
+ // We'll never have both pointer and slice for basic types.
+ if pointer && slice && t.Kind() != reflect.Struct {
+ panic("both pointer and slice for basic type in " + t.Name())
+ }
+
+ switch t.Kind() {
+ case reflect.Bool:
+ if pointer {
+ return unmarshalBoolPtr
+ }
+ if slice {
+ return unmarshalBoolSlice
+ }
+ return unmarshalBoolValue
+ case reflect.Int32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return unmarshalFixedS32Ptr
+ }
+ if slice {
+ return unmarshalFixedS32Slice
+ }
+ return unmarshalFixedS32Value
+ case "varint":
+ // this could be int32 or enum
+ if pointer {
+ return unmarshalInt32Ptr
+ }
+ if slice {
+ return unmarshalInt32Slice
+ }
+ return unmarshalInt32Value
+ case "zigzag32":
+ if pointer {
+ return unmarshalSint32Ptr
+ }
+ if slice {
+ return unmarshalSint32Slice
+ }
+ return unmarshalSint32Value
+ }
+ case reflect.Int64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return unmarshalFixedS64Ptr
+ }
+ if slice {
+ return unmarshalFixedS64Slice
+ }
+ return unmarshalFixedS64Value
+ case "varint":
+ if pointer {
+ return unmarshalInt64Ptr
+ }
+ if slice {
+ return unmarshalInt64Slice
+ }
+ return unmarshalInt64Value
+ case "zigzag64":
+ if pointer {
+ return unmarshalSint64Ptr
+ }
+ if slice {
+ return unmarshalSint64Slice
+ }
+ return unmarshalSint64Value
+ }
+ case reflect.Uint32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return unmarshalFixed32Ptr
+ }
+ if slice {
+ return unmarshalFixed32Slice
+ }
+ return unmarshalFixed32Value
+ case "varint":
+ if pointer {
+ return unmarshalUint32Ptr
+ }
+ if slice {
+ return unmarshalUint32Slice
+ }
+ return unmarshalUint32Value
+ }
+ case reflect.Uint64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return unmarshalFixed64Ptr
+ }
+ if slice {
+ return unmarshalFixed64Slice
+ }
+ return unmarshalFixed64Value
+ case "varint":
+ if pointer {
+ return unmarshalUint64Ptr
+ }
+ if slice {
+ return unmarshalUint64Slice
+ }
+ return unmarshalUint64Value
+ }
+ case reflect.Float32:
+ if pointer {
+ return unmarshalFloat32Ptr
+ }
+ if slice {
+ return unmarshalFloat32Slice
+ }
+ return unmarshalFloat32Value
+ case reflect.Float64:
+ if pointer {
+ return unmarshalFloat64Ptr
+ }
+ if slice {
+ return unmarshalFloat64Slice
+ }
+ return unmarshalFloat64Value
+ case reflect.Map:
+ panic("map type in typeUnmarshaler in " + t.Name())
+ case reflect.Slice:
+ if pointer {
+ panic("bad pointer in slice case in " + t.Name())
+ }
+ if slice {
+ return unmarshalBytesSlice
+ }
+ return unmarshalBytesValue
+ case reflect.String:
+ if validateUTF8 {
+ if pointer {
+ return unmarshalUTF8StringPtr
+ }
+ if slice {
+ return unmarshalUTF8StringSlice
+ }
+ return unmarshalUTF8StringValue
+ }
+ if pointer {
+ return unmarshalStringPtr
+ }
+ if slice {
+ return unmarshalStringSlice
+ }
+ return unmarshalStringValue
+ case reflect.Struct:
+ // message or group field
+ if !pointer {
+ panic(fmt.Sprintf("message/group field %s:%s without pointer", t, encoding))
+ }
+ switch encoding {
+ case "bytes":
+ if slice {
+ return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name)
+ case "group":
+ if slice {
+ return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name)
+ }
+ }
+ panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding))
+}
+
+// Below are all the unmarshalers for individual fields of various types.
+
+func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ *f.toInt64() = v
+ return b, nil
+}
+
+func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ *f.toInt64Ptr() = &v
+ return b, nil
+}
+
+func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ *f.toInt64() = v
+ return b, nil
+}
+
+func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ *f.toInt64Ptr() = &v
+ return b, nil
+}
+
+func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ *f.toUint64() = v
+ return b, nil
+}
+
+func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ *f.toUint64Ptr() = &v
+ return b, nil
+}
+
+func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ *f.toInt32() = v
+ return b, nil
+}
+
+func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ f.setInt32Ptr(v)
+ return b, nil
+}
+
+func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ f.appendInt32Slice(v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ f.appendInt32Slice(v)
+ return b, nil
+}
+
+func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ *f.toInt32() = v
+ return b, nil
+}
+
+func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ f.setInt32Ptr(v)
+ return b, nil
+}
+
+func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ f.appendInt32Slice(v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ f.appendInt32Slice(v)
+ return b, nil
+}
+
+func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ *f.toUint32() = v
+ return b, nil
+}
+
+func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ *f.toUint32Ptr() = &v
+ return b, nil
+}
+
+func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ *f.toUint64() = v
+ return b[8:], nil
+}
+
+func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ *f.toUint64Ptr() = &v
+ return b[8:], nil
+}
+
+func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ b = b[8:]
+ }
+ return res, nil
+ }
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ return b[8:], nil
+}
+
+func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ *f.toInt64() = v
+ return b[8:], nil
+}
+
+func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ *f.toInt64Ptr() = &v
+ return b[8:], nil
+}
+
+func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ b = b[8:]
+ }
+ return res, nil
+ }
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ return b[8:], nil
+}
+
+func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ *f.toUint32() = v
+ return b[4:], nil
+}
+
+func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ *f.toUint32Ptr() = &v
+ return b[4:], nil
+}
+
+func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ b = b[4:]
+ }
+ return res, nil
+ }
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ return b[4:], nil
+}
+
+func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ *f.toInt32() = v
+ return b[4:], nil
+}
+
+func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ f.setInt32Ptr(v)
+ return b[4:], nil
+}
+
+func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ f.appendInt32Slice(v)
+ b = b[4:]
+ }
+ return res, nil
+ }
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ f.appendInt32Slice(v)
+ return b[4:], nil
+}
+
+func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ // Note: any length varint is allowed, even though any sane
+ // encoder will use one byte.
+ // See https://github.com/golang/protobuf/issues/76
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // TODO: check if x>1? Tests seem to indicate no.
+ v := x != 0
+ *f.toBool() = v
+ return b[n:], nil
+}
+
+func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := x != 0
+ *f.toBoolPtr() = &v
+ return b[n:], nil
+}
+
+func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := x != 0
+ s := f.toBoolSlice()
+ *s = append(*s, v)
+ b = b[n:]
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := x != 0
+ s := f.toBoolSlice()
+ *s = append(*s, v)
+ return b[n:], nil
+}
+
+func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ *f.toFloat64() = v
+ return b[8:], nil
+}
+
+func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ *f.toFloat64Ptr() = &v
+ return b[8:], nil
+}
+
+func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ s := f.toFloat64Slice()
+ *s = append(*s, v)
+ b = b[8:]
+ }
+ return res, nil
+ }
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ s := f.toFloat64Slice()
+ *s = append(*s, v)
+ return b[8:], nil
+}
+
+func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ *f.toFloat32() = v
+ return b[4:], nil
+}
+
+func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ *f.toFloat32Ptr() = &v
+ return b[4:], nil
+}
+
+func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ s := f.toFloat32Slice()
+ *s = append(*s, v)
+ b = b[4:]
+ }
+ return res, nil
+ }
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ s := f.toFloat32Slice()
+ *s = append(*s, v)
+ return b[4:], nil
+}
+
+func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toString() = v
+ return b[x:], nil
+}
+
+func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toStringPtr() = &v
+ return b[x:], nil
+}
+
+func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ s := f.toStringSlice()
+ *s = append(*s, v)
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toString() = v
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toStringPtr() = &v
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ s := f.toStringSlice()
+ *s = append(*s, v)
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+var emptyBuf [0]byte
+
+func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // The use of append here is a trick which avoids the zeroing
+ // that would be required if we used a make/copy pair.
+ // We append to emptyBuf instead of nil because we want
+ // a non-nil result even when the length is 0.
+ v := append(emptyBuf[:], b[:x]...)
+ *f.toBytes() = v
+ return b[x:], nil
+}
+
+func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := append(emptyBuf[:], b[:x]...)
+ s := f.toBytesSlice()
+ *s = append(*s, v)
+ return b[x:], nil
+}
+
+func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // First read the message field to see if something is there.
+ // The semantics of multiple submessages are weird. Instead of
+ // the last one winning (as it is for all other fields), multiple
+ // submessages are merged.
+ v := f.getPointer()
+ if v.isNil() {
+ v = valToPointer(reflect.New(sub.typ))
+ f.setPointer(v)
+ }
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ return b[x:], err
+ }
+}
+
+func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := valToPointer(reflect.New(sub.typ))
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ f.appendPointer(v)
+ return b[x:], err
+ }
+}
+
+func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireStartGroup {
+ return b, errInternalBadWireType
+ }
+ x, y := findEndGroup(b)
+ if x < 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := f.getPointer()
+ if v.isNil() {
+ v = valToPointer(reflect.New(sub.typ))
+ f.setPointer(v)
+ }
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ return b[y:], err
+ }
+}
+
+func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireStartGroup {
+ return b, errInternalBadWireType
+ }
+ x, y := findEndGroup(b)
+ if x < 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := valToPointer(reflect.New(sub.typ))
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ f.appendPointer(v)
+ return b[y:], err
+ }
+}
+
+func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
+ t := f.Type
+ kt := t.Key()
+ vt := t.Elem()
+ unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key"))
+ unmarshalVal := typeUnmarshaler(vt, f.Tag.Get("protobuf_val"))
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ // The map entry is a submessage. Figure out how big it is.
+ if w != WireBytes {
+ return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes)
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ r := b[x:] // unused data to return
+ b = b[:x] // data for map entry
+
+ // Note: we could use #keys * #values ~= 200 functions
+ // to do map decoding without reflection. Probably not worth it.
+ // Maps will be somewhat slow. Oh well.
+
+ // Read key and value from data.
+ var nerr nonFatal
+ k := reflect.New(kt)
+ v := reflect.New(vt)
+ for len(b) > 0 {
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ wire := int(x) & 7
+ b = b[n:]
+
+ var err error
+ switch x >> 3 {
+ case 1:
+ b, err = unmarshalKey(b, valToPointer(k), wire)
+ case 2:
+ b, err = unmarshalVal(b, valToPointer(v), wire)
+ default:
+ err = errInternalBadWireType // skip unknown tag
+ }
+
+ if nerr.Merge(err) {
+ continue
+ }
+ if err != errInternalBadWireType {
+ return nil, err
+ }
+
+ // Skip past unknown fields.
+ b, err = skipField(b, wire)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Get map, allocate if needed.
+ m := f.asPointerTo(t).Elem() // an addressable map[K]T
+ if m.IsNil() {
+ m.Set(reflect.MakeMap(t))
+ }
+
+ // Insert into map.
+ m.SetMapIndex(k.Elem(), v.Elem())
+
+ return r, nerr.E
+ }
+}
+
+// makeUnmarshalOneof makes an unmarshaler for oneof fields.
+// for:
+// message Msg {
+// oneof F {
+// int64 X = 1;
+// float64 Y = 2;
+// }
+// }
+// typ is the type of the concrete entry for a oneof case (e.g. Msg_X).
+// ityp is the interface type of the oneof field (e.g. isMsg_F).
+// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64).
+// Note that this function will be called once for each case in the oneof.
+func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler {
+ sf := typ.Field(0)
+ field0 := toField(&sf)
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ // Allocate holder for value.
+ v := reflect.New(typ)
+
+ // Unmarshal data into holder.
+ // We unmarshal into the first field of the holder object.
+ var err error
+ var nerr nonFatal
+ b, err = unmarshal(b, valToPointer(v).offset(field0), w)
+ if !nerr.Merge(err) {
+ return nil, err
+ }
+
+ // Write pointer to holder into target field.
+ f.asPointerTo(ityp).Elem().Set(v)
+
+ return b, nerr.E
+ }
+}
+
+// Error used by decode internally.
+var errInternalBadWireType = errors.New("proto: internal error: bad wiretype")
+
+// skipField skips past a field of type wire and returns the remaining bytes.
+func skipField(b []byte, wire int) ([]byte, error) {
+ switch wire {
+ case WireVarint:
+ _, k := decodeVarint(b)
+ if k == 0 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[k:]
+ case WireFixed32:
+ if len(b) < 4 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[4:]
+ case WireFixed64:
+ if len(b) < 8 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[8:]
+ case WireBytes:
+ m, k := decodeVarint(b)
+ if k == 0 || uint64(len(b)-k) < m {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[uint64(k)+m:]
+ case WireStartGroup:
+ _, i := findEndGroup(b)
+ if i == -1 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[i:]
+ default:
+ return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire)
+ }
+ return b, nil
+}
+
+// findEndGroup finds the index of the next EndGroup tag.
+// Groups may be nested, so the "next" EndGroup tag is the first
+// unpaired EndGroup.
+// findEndGroup returns the indexes of the start and end of the EndGroup tag.
+// Returns (-1,-1) if it can't find one.
+func findEndGroup(b []byte) (int, int) {
+ depth := 1
+ i := 0
+ for {
+ x, n := decodeVarint(b[i:])
+ if n == 0 {
+ return -1, -1
+ }
+ j := i
+ i += n
+ switch x & 7 {
+ case WireVarint:
+ _, k := decodeVarint(b[i:])
+ if k == 0 {
+ return -1, -1
+ }
+ i += k
+ case WireFixed32:
+ if len(b)-4 < i {
+ return -1, -1
+ }
+ i += 4
+ case WireFixed64:
+ if len(b)-8 < i {
+ return -1, -1
+ }
+ i += 8
+ case WireBytes:
+ m, k := decodeVarint(b[i:])
+ if k == 0 {
+ return -1, -1
+ }
+ i += k
+ if uint64(len(b)-i) < m {
+ return -1, -1
+ }
+ i += int(m)
+ case WireStartGroup:
+ depth++
+ case WireEndGroup:
+ depth--
+ if depth == 0 {
+ return j, i
+ }
+ default:
+ return -1, -1
+ }
+ }
+}
+
+// encodeVarint appends a varint-encoded integer to b and returns the result.
+func encodeVarint(b []byte, x uint64) []byte {
+ for x >= 1<<7 {
+ b = append(b, byte(x&0x7f|0x80))
+ x >>= 7
+ }
+ return append(b, byte(x))
+}
+
+// decodeVarint reads a varint-encoded integer from b.
+// Returns the decoded integer and the number of bytes read.
+// If there is an error, it returns 0,0.
+func decodeVarint(b []byte) (uint64, int) {
+ var x, y uint64
+ if len(b) <= 0 {
+ goto bad
+ }
+ x = uint64(b[0])
+ if x < 0x80 {
+ return x, 1
+ }
+ x -= 0x80
+
+ if len(b) <= 1 {
+ goto bad
+ }
+ y = uint64(b[1])
+ x += y << 7
+ if y < 0x80 {
+ return x, 2
+ }
+ x -= 0x80 << 7
+
+ if len(b) <= 2 {
+ goto bad
+ }
+ y = uint64(b[2])
+ x += y << 14
+ if y < 0x80 {
+ return x, 3
+ }
+ x -= 0x80 << 14
+
+ if len(b) <= 3 {
+ goto bad
+ }
+ y = uint64(b[3])
+ x += y << 21
+ if y < 0x80 {
+ return x, 4
+ }
+ x -= 0x80 << 21
+
+ if len(b) <= 4 {
+ goto bad
+ }
+ y = uint64(b[4])
+ x += y << 28
+ if y < 0x80 {
+ return x, 5
+ }
+ x -= 0x80 << 28
+
+ if len(b) <= 5 {
+ goto bad
+ }
+ y = uint64(b[5])
+ x += y << 35
+ if y < 0x80 {
+ return x, 6
+ }
+ x -= 0x80 << 35
+
+ if len(b) <= 6 {
+ goto bad
+ }
+ y = uint64(b[6])
+ x += y << 42
+ if y < 0x80 {
+ return x, 7
+ }
+ x -= 0x80 << 42
+
+ if len(b) <= 7 {
+ goto bad
+ }
+ y = uint64(b[7])
+ x += y << 49
+ if y < 0x80 {
+ return x, 8
+ }
+ x -= 0x80 << 49
+
+ if len(b) <= 8 {
+ goto bad
+ }
+ y = uint64(b[8])
+ x += y << 56
+ if y < 0x80 {
+ return x, 9
+ }
+ x -= 0x80 << 56
+
+ if len(b) <= 9 {
+ goto bad
+ }
+ y = uint64(b[9])
+ x += y << 63
+ if y < 2 {
+ return x, 10
+ }
+
+bad:
+ return 0, 0
+}
diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go
new file mode 100644
index 00000000..1aaee725
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/text.go
@@ -0,0 +1,843 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+// Functions for writing the text protocol buffer format.
+
+import (
+ "bufio"
+ "bytes"
+ "encoding"
+ "errors"
+ "fmt"
+ "io"
+ "log"
+ "math"
+ "reflect"
+ "sort"
+ "strings"
+)
+
+var (
+ newline = []byte("\n")
+ spaces = []byte(" ")
+ endBraceNewline = []byte("}\n")
+ backslashN = []byte{'\\', 'n'}
+ backslashR = []byte{'\\', 'r'}
+ backslashT = []byte{'\\', 't'}
+ backslashDQ = []byte{'\\', '"'}
+ backslashBS = []byte{'\\', '\\'}
+ posInf = []byte("inf")
+ negInf = []byte("-inf")
+ nan = []byte("nan")
+)
+
+type writer interface {
+ io.Writer
+ WriteByte(byte) error
+}
+
+// textWriter is an io.Writer that tracks its indentation level.
+type textWriter struct {
+ ind int
+ complete bool // if the current position is a complete line
+ compact bool // whether to write out as a one-liner
+ w writer
+}
+
+func (w *textWriter) WriteString(s string) (n int, err error) {
+ if !strings.Contains(s, "\n") {
+ if !w.compact && w.complete {
+ w.writeIndent()
+ }
+ w.complete = false
+ return io.WriteString(w.w, s)
+ }
+ // WriteString is typically called without newlines, so this
+ // codepath and its copy are rare. We copy to avoid
+ // duplicating all of Write's logic here.
+ return w.Write([]byte(s))
+}
+
+func (w *textWriter) Write(p []byte) (n int, err error) {
+ newlines := bytes.Count(p, newline)
+ if newlines == 0 {
+ if !w.compact && w.complete {
+ w.writeIndent()
+ }
+ n, err = w.w.Write(p)
+ w.complete = false
+ return n, err
+ }
+
+ frags := bytes.SplitN(p, newline, newlines+1)
+ if w.compact {
+ for i, frag := range frags {
+ if i > 0 {
+ if err := w.w.WriteByte(' '); err != nil {
+ return n, err
+ }
+ n++
+ }
+ nn, err := w.w.Write(frag)
+ n += nn
+ if err != nil {
+ return n, err
+ }
+ }
+ return n, nil
+ }
+
+ for i, frag := range frags {
+ if w.complete {
+ w.writeIndent()
+ }
+ nn, err := w.w.Write(frag)
+ n += nn
+ if err != nil {
+ return n, err
+ }
+ if i+1 < len(frags) {
+ if err := w.w.WriteByte('\n'); err != nil {
+ return n, err
+ }
+ n++
+ }
+ }
+ w.complete = len(frags[len(frags)-1]) == 0
+ return n, nil
+}
+
+func (w *textWriter) WriteByte(c byte) error {
+ if w.compact && c == '\n' {
+ c = ' '
+ }
+ if !w.compact && w.complete {
+ w.writeIndent()
+ }
+ err := w.w.WriteByte(c)
+ w.complete = c == '\n'
+ return err
+}
+
+func (w *textWriter) indent() { w.ind++ }
+
+func (w *textWriter) unindent() {
+ if w.ind == 0 {
+ log.Print("proto: textWriter unindented too far")
+ return
+ }
+ w.ind--
+}
+
+func writeName(w *textWriter, props *Properties) error {
+ if _, err := w.WriteString(props.OrigName); err != nil {
+ return err
+ }
+ if props.Wire != "group" {
+ return w.WriteByte(':')
+ }
+ return nil
+}
+
+func requiresQuotes(u string) bool {
+ // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
+ for _, ch := range u {
+ switch {
+ case ch == '.' || ch == '/' || ch == '_':
+ continue
+ case '0' <= ch && ch <= '9':
+ continue
+ case 'A' <= ch && ch <= 'Z':
+ continue
+ case 'a' <= ch && ch <= 'z':
+ continue
+ default:
+ return true
+ }
+ }
+ return false
+}
+
+// isAny reports whether sv is a google.protobuf.Any message
+func isAny(sv reflect.Value) bool {
+ type wkt interface {
+ XXX_WellKnownType() string
+ }
+ t, ok := sv.Addr().Interface().(wkt)
+ return ok && t.XXX_WellKnownType() == "Any"
+}
+
+// writeProto3Any writes an expanded google.protobuf.Any message.
+//
+// It returns (false, nil) if sv value can't be unmarshaled (e.g. because
+// required messages are not linked in).
+//
+// It returns (true, error) when sv was written in expanded format or an error
+// was encountered.
+func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) {
+ turl := sv.FieldByName("TypeUrl")
+ val := sv.FieldByName("Value")
+ if !turl.IsValid() || !val.IsValid() {
+ return true, errors.New("proto: invalid google.protobuf.Any message")
+ }
+
+ b, ok := val.Interface().([]byte)
+ if !ok {
+ return true, errors.New("proto: invalid google.protobuf.Any message")
+ }
+
+ parts := strings.Split(turl.String(), "/")
+ mt := MessageType(parts[len(parts)-1])
+ if mt == nil {
+ return false, nil
+ }
+ m := reflect.New(mt.Elem())
+ if err := Unmarshal(b, m.Interface().(Message)); err != nil {
+ return false, nil
+ }
+ w.Write([]byte("["))
+ u := turl.String()
+ if requiresQuotes(u) {
+ writeString(w, u)
+ } else {
+ w.Write([]byte(u))
+ }
+ if w.compact {
+ w.Write([]byte("]:<"))
+ } else {
+ w.Write([]byte("]: <\n"))
+ w.ind++
+ }
+ if err := tm.writeStruct(w, m.Elem()); err != nil {
+ return true, err
+ }
+ if w.compact {
+ w.Write([]byte("> "))
+ } else {
+ w.ind--
+ w.Write([]byte(">\n"))
+ }
+ return true, nil
+}
+
+func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
+ if tm.ExpandAny && isAny(sv) {
+ if canExpand, err := tm.writeProto3Any(w, sv); canExpand {
+ return err
+ }
+ }
+ st := sv.Type()
+ sprops := GetProperties(st)
+ for i := 0; i < sv.NumField(); i++ {
+ fv := sv.Field(i)
+ props := sprops.Prop[i]
+ name := st.Field(i).Name
+
+ if name == "XXX_NoUnkeyedLiteral" {
+ continue
+ }
+
+ if strings.HasPrefix(name, "XXX_") {
+ // There are two XXX_ fields:
+ // XXX_unrecognized []byte
+ // XXX_extensions map[int32]proto.Extension
+ // The first is handled here;
+ // the second is handled at the bottom of this function.
+ if name == "XXX_unrecognized" && !fv.IsNil() {
+ if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil {
+ return err
+ }
+ }
+ continue
+ }
+ if fv.Kind() == reflect.Ptr && fv.IsNil() {
+ // Field not filled in. This could be an optional field or
+ // a required field that wasn't filled in. Either way, there
+ // isn't anything we can show for it.
+ continue
+ }
+ if fv.Kind() == reflect.Slice && fv.IsNil() {
+ // Repeated field that is empty, or a bytes field that is unused.
+ continue
+ }
+
+ if props.Repeated && fv.Kind() == reflect.Slice {
+ // Repeated field.
+ for j := 0; j < fv.Len(); j++ {
+ if err := writeName(w, props); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+ v := fv.Index(j)
+ if v.Kind() == reflect.Ptr && v.IsNil() {
+ // A nil message in a repeated field is not valid,
+ // but we can handle that more gracefully than panicking.
+ if _, err := w.Write([]byte("\n")); err != nil {
+ return err
+ }
+ continue
+ }
+ if err := tm.writeAny(w, v, props); err != nil {
+ return err
+ }
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+ continue
+ }
+ if fv.Kind() == reflect.Map {
+ // Map fields are rendered as a repeated struct with key/value fields.
+ keys := fv.MapKeys()
+ sort.Sort(mapKeys(keys))
+ for _, key := range keys {
+ val := fv.MapIndex(key)
+ if err := writeName(w, props); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+ // open struct
+ if err := w.WriteByte('<'); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+ w.indent()
+ // key
+ if _, err := w.WriteString("key:"); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+ if err := tm.writeAny(w, key, props.MapKeyProp); err != nil {
+ return err
+ }
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ // nil values aren't legal, but we can avoid panicking because of them.
+ if val.Kind() != reflect.Ptr || !val.IsNil() {
+ // value
+ if _, err := w.WriteString("value:"); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+ if err := tm.writeAny(w, val, props.MapValProp); err != nil {
+ return err
+ }
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+ // close struct
+ w.unindent()
+ if err := w.WriteByte('>'); err != nil {
+ return err
+ }
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+ continue
+ }
+ if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 {
+ // empty bytes field
+ continue
+ }
+ if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice {
+ // proto3 non-repeated scalar field; skip if zero value
+ if isProto3Zero(fv) {
+ continue
+ }
+ }
+
+ if fv.Kind() == reflect.Interface {
+ // Check if it is a oneof.
+ if st.Field(i).Tag.Get("protobuf_oneof") != "" {
+ // fv is nil, or holds a pointer to generated struct.
+ // That generated struct has exactly one field,
+ // which has a protobuf struct tag.
+ if fv.IsNil() {
+ continue
+ }
+ inner := fv.Elem().Elem() // interface -> *T -> T
+ tag := inner.Type().Field(0).Tag.Get("protobuf")
+ props = new(Properties) // Overwrite the outer props var, but not its pointee.
+ props.Parse(tag)
+ // Write the value in the oneof, not the oneof itself.
+ fv = inner.Field(0)
+
+ // Special case to cope with malformed messages gracefully:
+ // If the value in the oneof is a nil pointer, don't panic
+ // in writeAny.
+ if fv.Kind() == reflect.Ptr && fv.IsNil() {
+ // Use errors.New so writeAny won't render quotes.
+ msg := errors.New("/* nil */")
+ fv = reflect.ValueOf(&msg).Elem()
+ }
+ }
+ }
+
+ if err := writeName(w, props); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+
+ // Enums have a String method, so writeAny will work fine.
+ if err := tm.writeAny(w, fv, props); err != nil {
+ return err
+ }
+
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+
+ // Extensions (the XXX_extensions field).
+ pv := sv.Addr()
+ if _, err := extendable(pv.Interface()); err == nil {
+ if err := tm.writeExtensions(w, pv); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// writeAny writes an arbitrary field.
+func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
+ v = reflect.Indirect(v)
+
+ // Floats have special cases.
+ if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 {
+ x := v.Float()
+ var b []byte
+ switch {
+ case math.IsInf(x, 1):
+ b = posInf
+ case math.IsInf(x, -1):
+ b = negInf
+ case math.IsNaN(x):
+ b = nan
+ }
+ if b != nil {
+ _, err := w.Write(b)
+ return err
+ }
+ // Other values are handled below.
+ }
+
+ // We don't attempt to serialise every possible value type; only those
+ // that can occur in protocol buffers.
+ switch v.Kind() {
+ case reflect.Slice:
+ // Should only be a []byte; repeated fields are handled in writeStruct.
+ if err := writeString(w, string(v.Bytes())); err != nil {
+ return err
+ }
+ case reflect.String:
+ if err := writeString(w, v.String()); err != nil {
+ return err
+ }
+ case reflect.Struct:
+ // Required/optional group/message.
+ var bra, ket byte = '<', '>'
+ if props != nil && props.Wire == "group" {
+ bra, ket = '{', '}'
+ }
+ if err := w.WriteByte(bra); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+ w.indent()
+ if v.CanAddr() {
+ // Calling v.Interface on a struct causes the reflect package to
+ // copy the entire struct. This is racy with the new Marshaler
+ // since we atomically update the XXX_sizecache.
+ //
+ // Thus, we retrieve a pointer to the struct if possible to avoid
+ // a race since v.Interface on the pointer doesn't copy the struct.
+ //
+ // If v is not addressable, then we are not worried about a race
+ // since it implies that the binary Marshaler cannot possibly be
+ // mutating this value.
+ v = v.Addr()
+ }
+ if etm, ok := v.Interface().(encoding.TextMarshaler); ok {
+ text, err := etm.MarshalText()
+ if err != nil {
+ return err
+ }
+ if _, err = w.Write(text); err != nil {
+ return err
+ }
+ } else {
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
+ if err := tm.writeStruct(w, v); err != nil {
+ return err
+ }
+ }
+ w.unindent()
+ if err := w.WriteByte(ket); err != nil {
+ return err
+ }
+ default:
+ _, err := fmt.Fprint(w, v.Interface())
+ return err
+ }
+ return nil
+}
+
+// equivalent to C's isprint.
+func isprint(c byte) bool {
+ return c >= 0x20 && c < 0x7f
+}
+
+// writeString writes a string in the protocol buffer text format.
+// It is similar to strconv.Quote except we don't use Go escape sequences,
+// we treat the string as a byte sequence, and we use octal escapes.
+// These differences are to maintain interoperability with the other
+// languages' implementations of the text format.
+func writeString(w *textWriter, s string) error {
+ // use WriteByte here to get any needed indent
+ if err := w.WriteByte('"'); err != nil {
+ return err
+ }
+ // Loop over the bytes, not the runes.
+ for i := 0; i < len(s); i++ {
+ var err error
+ // Divergence from C++: we don't escape apostrophes.
+ // There's no need to escape them, and the C++ parser
+ // copes with a naked apostrophe.
+ switch c := s[i]; c {
+ case '\n':
+ _, err = w.w.Write(backslashN)
+ case '\r':
+ _, err = w.w.Write(backslashR)
+ case '\t':
+ _, err = w.w.Write(backslashT)
+ case '"':
+ _, err = w.w.Write(backslashDQ)
+ case '\\':
+ _, err = w.w.Write(backslashBS)
+ default:
+ if isprint(c) {
+ err = w.w.WriteByte(c)
+ } else {
+ _, err = fmt.Fprintf(w.w, "\\%03o", c)
+ }
+ }
+ if err != nil {
+ return err
+ }
+ }
+ return w.WriteByte('"')
+}
+
+func writeUnknownStruct(w *textWriter, data []byte) (err error) {
+ if !w.compact {
+ if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil {
+ return err
+ }
+ }
+ b := NewBuffer(data)
+ for b.index < len(b.buf) {
+ x, err := b.DecodeVarint()
+ if err != nil {
+ _, err := fmt.Fprintf(w, "/* %v */\n", err)
+ return err
+ }
+ wire, tag := x&7, x>>3
+ if wire == WireEndGroup {
+ w.unindent()
+ if _, err := w.Write(endBraceNewline); err != nil {
+ return err
+ }
+ continue
+ }
+ if _, err := fmt.Fprint(w, tag); err != nil {
+ return err
+ }
+ if wire != WireStartGroup {
+ if err := w.WriteByte(':'); err != nil {
+ return err
+ }
+ }
+ if !w.compact || wire == WireStartGroup {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+ switch wire {
+ case WireBytes:
+ buf, e := b.DecodeRawBytes(false)
+ if e == nil {
+ _, err = fmt.Fprintf(w, "%q", buf)
+ } else {
+ _, err = fmt.Fprintf(w, "/* %v */", e)
+ }
+ case WireFixed32:
+ x, err = b.DecodeFixed32()
+ err = writeUnknownInt(w, x, err)
+ case WireFixed64:
+ x, err = b.DecodeFixed64()
+ err = writeUnknownInt(w, x, err)
+ case WireStartGroup:
+ err = w.WriteByte('{')
+ w.indent()
+ case WireVarint:
+ x, err = b.DecodeVarint()
+ err = writeUnknownInt(w, x, err)
+ default:
+ _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire)
+ }
+ if err != nil {
+ return err
+ }
+ if err = w.WriteByte('\n'); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func writeUnknownInt(w *textWriter, x uint64, err error) error {
+ if err == nil {
+ _, err = fmt.Fprint(w, x)
+ } else {
+ _, err = fmt.Fprintf(w, "/* %v */", err)
+ }
+ return err
+}
+
+type int32Slice []int32
+
+func (s int32Slice) Len() int { return len(s) }
+func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] }
+func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+// writeExtensions writes all the extensions in pv.
+// pv is assumed to be a pointer to a protocol message struct that is extendable.
+func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error {
+ emap := extensionMaps[pv.Type().Elem()]
+ ep, _ := extendable(pv.Interface())
+
+ // Order the extensions by ID.
+ // This isn't strictly necessary, but it will give us
+ // canonical output, which will also make testing easier.
+ m, mu := ep.extensionsRead()
+ if m == nil {
+ return nil
+ }
+ mu.Lock()
+ ids := make([]int32, 0, len(m))
+ for id := range m {
+ ids = append(ids, id)
+ }
+ sort.Sort(int32Slice(ids))
+ mu.Unlock()
+
+ for _, extNum := range ids {
+ ext := m[extNum]
+ var desc *ExtensionDesc
+ if emap != nil {
+ desc = emap[extNum]
+ }
+ if desc == nil {
+ // Unknown extension.
+ if err := writeUnknownStruct(w, ext.enc); err != nil {
+ return err
+ }
+ continue
+ }
+
+ pb, err := GetExtension(ep, desc)
+ if err != nil {
+ return fmt.Errorf("failed getting extension: %v", err)
+ }
+
+ // Repeated extensions will appear as a slice.
+ if !desc.repeated() {
+ if err := tm.writeExtension(w, desc.Name, pb); err != nil {
+ return err
+ }
+ } else {
+ v := reflect.ValueOf(pb)
+ for i := 0; i < v.Len(); i++ {
+ if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil {
+ return err
+ }
+ }
+ }
+ }
+ return nil
+}
+
+func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error {
+ if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil {
+ return err
+ }
+ if !w.compact {
+ if err := w.WriteByte(' '); err != nil {
+ return err
+ }
+ }
+ if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil {
+ return err
+ }
+ if err := w.WriteByte('\n'); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (w *textWriter) writeIndent() {
+ if !w.complete {
+ return
+ }
+ remain := w.ind * 2
+ for remain > 0 {
+ n := remain
+ if n > len(spaces) {
+ n = len(spaces)
+ }
+ w.w.Write(spaces[:n])
+ remain -= n
+ }
+ w.complete = false
+}
+
+// TextMarshaler is a configurable text format marshaler.
+type TextMarshaler struct {
+ Compact bool // use compact text format (one line).
+ ExpandAny bool // expand google.protobuf.Any messages of known types
+}
+
+// Marshal writes a given protocol buffer in text format.
+// The only errors returned are from w.
+func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error {
+ val := reflect.ValueOf(pb)
+ if pb == nil || val.IsNil() {
+ w.Write([]byte(""))
+ return nil
+ }
+ var bw *bufio.Writer
+ ww, ok := w.(writer)
+ if !ok {
+ bw = bufio.NewWriter(w)
+ ww = bw
+ }
+ aw := &textWriter{
+ w: ww,
+ complete: true,
+ compact: tm.Compact,
+ }
+
+ if etm, ok := pb.(encoding.TextMarshaler); ok {
+ text, err := etm.MarshalText()
+ if err != nil {
+ return err
+ }
+ if _, err = aw.Write(text); err != nil {
+ return err
+ }
+ if bw != nil {
+ return bw.Flush()
+ }
+ return nil
+ }
+ // Dereference the received pointer so we don't have outer < and >.
+ v := reflect.Indirect(val)
+ if err := tm.writeStruct(aw, v); err != nil {
+ return err
+ }
+ if bw != nil {
+ return bw.Flush()
+ }
+ return nil
+}
+
+// Text is the same as Marshal, but returns the string directly.
+func (tm *TextMarshaler) Text(pb Message) string {
+ var buf bytes.Buffer
+ tm.Marshal(&buf, pb)
+ return buf.String()
+}
+
+var (
+ defaultTextMarshaler = TextMarshaler{}
+ compactTextMarshaler = TextMarshaler{Compact: true}
+)
+
+// TODO: consider removing some of the Marshal functions below.
+
+// MarshalText writes a given protocol buffer in text format.
+// The only errors returned are from w.
+func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) }
+
+// MarshalTextString is the same as MarshalText, but returns the string directly.
+func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) }
+
+// CompactText writes a given protocol buffer in compact text format (one line).
+func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) }
+
+// CompactTextString is the same as CompactText, but returns the string directly.
+func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) }
diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go
new file mode 100644
index 00000000..bb55a3af
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/proto/text_parser.go
@@ -0,0 +1,880 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2010 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+// Functions for parsing the Text protocol buffer format.
+// TODO: message sets.
+
+import (
+ "encoding"
+ "errors"
+ "fmt"
+ "reflect"
+ "strconv"
+ "strings"
+ "unicode/utf8"
+)
+
+// Error string emitted when deserializing Any and fields are already set
+const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set"
+
+type ParseError struct {
+ Message string
+ Line int // 1-based line number
+ Offset int // 0-based byte offset from start of input
+}
+
+func (p *ParseError) Error() string {
+ if p.Line == 1 {
+ // show offset only for first line
+ return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message)
+ }
+ return fmt.Sprintf("line %d: %v", p.Line, p.Message)
+}
+
+type token struct {
+ value string
+ err *ParseError
+ line int // line number
+ offset int // byte number from start of input, not start of line
+ unquoted string // the unquoted version of value, if it was a quoted string
+}
+
+func (t *token) String() string {
+ if t.err == nil {
+ return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset)
+ }
+ return fmt.Sprintf("parse error: %v", t.err)
+}
+
+type textParser struct {
+ s string // remaining input
+ done bool // whether the parsing is finished (success or error)
+ backed bool // whether back() was called
+ offset, line int
+ cur token
+}
+
+func newTextParser(s string) *textParser {
+ p := new(textParser)
+ p.s = s
+ p.line = 1
+ p.cur.line = 1
+ return p
+}
+
+func (p *textParser) errorf(format string, a ...interface{}) *ParseError {
+ pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}
+ p.cur.err = pe
+ p.done = true
+ return pe
+}
+
+// Numbers and identifiers are matched by [-+._A-Za-z0-9]
+func isIdentOrNumberChar(c byte) bool {
+ switch {
+ case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':
+ return true
+ case '0' <= c && c <= '9':
+ return true
+ }
+ switch c {
+ case '-', '+', '.', '_':
+ return true
+ }
+ return false
+}
+
+func isWhitespace(c byte) bool {
+ switch c {
+ case ' ', '\t', '\n', '\r':
+ return true
+ }
+ return false
+}
+
+func isQuote(c byte) bool {
+ switch c {
+ case '"', '\'':
+ return true
+ }
+ return false
+}
+
+func (p *textParser) skipWhitespace() {
+ i := 0
+ for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {
+ if p.s[i] == '#' {
+ // comment; skip to end of line or input
+ for i < len(p.s) && p.s[i] != '\n' {
+ i++
+ }
+ if i == len(p.s) {
+ break
+ }
+ }
+ if p.s[i] == '\n' {
+ p.line++
+ }
+ i++
+ }
+ p.offset += i
+ p.s = p.s[i:len(p.s)]
+ if len(p.s) == 0 {
+ p.done = true
+ }
+}
+
+func (p *textParser) advance() {
+ // Skip whitespace
+ p.skipWhitespace()
+ if p.done {
+ return
+ }
+
+ // Start of non-whitespace
+ p.cur.err = nil
+ p.cur.offset, p.cur.line = p.offset, p.line
+ p.cur.unquoted = ""
+ switch p.s[0] {
+ case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':
+ // Single symbol
+ p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]
+ case '"', '\'':
+ // Quoted string
+ i := 1
+ for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' {
+ if p.s[i] == '\\' && i+1 < len(p.s) {
+ // skip escaped char
+ i++
+ }
+ i++
+ }
+ if i >= len(p.s) || p.s[i] != p.s[0] {
+ p.errorf("unmatched quote")
+ return
+ }
+ unq, err := unquoteC(p.s[1:i], rune(p.s[0]))
+ if err != nil {
+ p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err)
+ return
+ }
+ p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]
+ p.cur.unquoted = unq
+ default:
+ i := 0
+ for i < len(p.s) && isIdentOrNumberChar(p.s[i]) {
+ i++
+ }
+ if i == 0 {
+ p.errorf("unexpected byte %#x", p.s[0])
+ return
+ }
+ p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]
+ }
+ p.offset += len(p.cur.value)
+}
+
+var (
+ errBadUTF8 = errors.New("proto: bad UTF-8")
+)
+
+func unquoteC(s string, quote rune) (string, error) {
+ // This is based on C++'s tokenizer.cc.
+ // Despite its name, this is *not* parsing C syntax.
+ // For instance, "\0" is an invalid quoted string.
+
+ // Avoid allocation in trivial cases.
+ simple := true
+ for _, r := range s {
+ if r == '\\' || r == quote {
+ simple = false
+ break
+ }
+ }
+ if simple {
+ return s, nil
+ }
+
+ buf := make([]byte, 0, 3*len(s)/2)
+ for len(s) > 0 {
+ r, n := utf8.DecodeRuneInString(s)
+ if r == utf8.RuneError && n == 1 {
+ return "", errBadUTF8
+ }
+ s = s[n:]
+ if r != '\\' {
+ if r < utf8.RuneSelf {
+ buf = append(buf, byte(r))
+ } else {
+ buf = append(buf, string(r)...)
+ }
+ continue
+ }
+
+ ch, tail, err := unescape(s)
+ if err != nil {
+ return "", err
+ }
+ buf = append(buf, ch...)
+ s = tail
+ }
+ return string(buf), nil
+}
+
+func unescape(s string) (ch string, tail string, err error) {
+ r, n := utf8.DecodeRuneInString(s)
+ if r == utf8.RuneError && n == 1 {
+ return "", "", errBadUTF8
+ }
+ s = s[n:]
+ switch r {
+ case 'a':
+ return "\a", s, nil
+ case 'b':
+ return "\b", s, nil
+ case 'f':
+ return "\f", s, nil
+ case 'n':
+ return "\n", s, nil
+ case 'r':
+ return "\r", s, nil
+ case 't':
+ return "\t", s, nil
+ case 'v':
+ return "\v", s, nil
+ case '?':
+ return "?", s, nil // trigraph workaround
+ case '\'', '"', '\\':
+ return string(r), s, nil
+ case '0', '1', '2', '3', '4', '5', '6', '7':
+ if len(s) < 2 {
+ return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
+ }
+ ss := string(r) + s[:2]
+ s = s[2:]
+ i, err := strconv.ParseUint(ss, 8, 8)
+ if err != nil {
+ return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss)
+ }
+ return string([]byte{byte(i)}), s, nil
+ case 'x', 'X', 'u', 'U':
+ var n int
+ switch r {
+ case 'x', 'X':
+ n = 2
+ case 'u':
+ n = 4
+ case 'U':
+ n = 8
+ }
+ if len(s) < n {
+ return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n)
+ }
+ ss := s[:n]
+ s = s[n:]
+ i, err := strconv.ParseUint(ss, 16, 64)
+ if err != nil {
+ return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss)
+ }
+ if r == 'x' || r == 'X' {
+ return string([]byte{byte(i)}), s, nil
+ }
+ if i > utf8.MaxRune {
+ return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
+ }
+ return string(i), s, nil
+ }
+ return "", "", fmt.Errorf(`unknown escape \%c`, r)
+}
+
+// Back off the parser by one token. Can only be done between calls to next().
+// It makes the next advance() a no-op.
+func (p *textParser) back() { p.backed = true }
+
+// Advances the parser and returns the new current token.
+func (p *textParser) next() *token {
+ if p.backed || p.done {
+ p.backed = false
+ return &p.cur
+ }
+ p.advance()
+ if p.done {
+ p.cur.value = ""
+ } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {
+ // Look for multiple quoted strings separated by whitespace,
+ // and concatenate them.
+ cat := p.cur
+ for {
+ p.skipWhitespace()
+ if p.done || !isQuote(p.s[0]) {
+ break
+ }
+ p.advance()
+ if p.cur.err != nil {
+ return &p.cur
+ }
+ cat.value += " " + p.cur.value
+ cat.unquoted += p.cur.unquoted
+ }
+ p.done = false // parser may have seen EOF, but we want to return cat
+ p.cur = cat
+ }
+ return &p.cur
+}
+
+func (p *textParser) consumeToken(s string) error {
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value != s {
+ p.back()
+ return p.errorf("expected %q, found %q", s, tok.value)
+ }
+ return nil
+}
+
+// Return a RequiredNotSetError indicating which required field was not set.
+func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError {
+ st := sv.Type()
+ sprops := GetProperties(st)
+ for i := 0; i < st.NumField(); i++ {
+ if !isNil(sv.Field(i)) {
+ continue
+ }
+
+ props := sprops.Prop[i]
+ if props.Required {
+ return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)}
+ }
+ }
+ return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen
+}
+
+// Returns the index in the struct for the named field, as well as the parsed tag properties.
+func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) {
+ i, ok := sprops.decoderOrigNames[name]
+ if ok {
+ return i, sprops.Prop[i], true
+ }
+ return -1, nil, false
+}
+
+// Consume a ':' from the input stream (if the next token is a colon),
+// returning an error if a colon is needed but not present.
+func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError {
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value != ":" {
+ // Colon is optional when the field is a group or message.
+ needColon := true
+ switch props.Wire {
+ case "group":
+ needColon = false
+ case "bytes":
+ // A "bytes" field is either a message, a string, or a repeated field;
+ // those three become *T, *string and []T respectively, so we can check for
+ // this field being a pointer to a non-string.
+ if typ.Kind() == reflect.Ptr {
+ // *T or *string
+ if typ.Elem().Kind() == reflect.String {
+ break
+ }
+ } else if typ.Kind() == reflect.Slice {
+ // []T or []*T
+ if typ.Elem().Kind() != reflect.Ptr {
+ break
+ }
+ } else if typ.Kind() == reflect.String {
+ // The proto3 exception is for a string field,
+ // which requires a colon.
+ break
+ }
+ needColon = false
+ }
+ if needColon {
+ return p.errorf("expected ':', found %q", tok.value)
+ }
+ p.back()
+ }
+ return nil
+}
+
+func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
+ st := sv.Type()
+ sprops := GetProperties(st)
+ reqCount := sprops.reqCount
+ var reqFieldErr error
+ fieldSet := make(map[string]bool)
+ // A struct is a sequence of "name: value", terminated by one of
+ // '>' or '}', or the end of the input. A name may also be
+ // "[extension]" or "[type/url]".
+ //
+ // The whole struct can also be an expanded Any message, like:
+ // [type/url] < ... struct contents ... >
+ for {
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value == terminator {
+ break
+ }
+ if tok.value == "[" {
+ // Looks like an extension or an Any.
+ //
+ // TODO: Check whether we need to handle
+ // namespace rooted names (e.g. ".something.Foo").
+ extName, err := p.consumeExtName()
+ if err != nil {
+ return err
+ }
+
+ if s := strings.LastIndex(extName, "/"); s >= 0 {
+ // If it contains a slash, it's an Any type URL.
+ messageName := extName[s+1:]
+ mt := MessageType(messageName)
+ if mt == nil {
+ return p.errorf("unrecognized message %q in google.protobuf.Any", messageName)
+ }
+ tok = p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ // consume an optional colon
+ if tok.value == ":" {
+ tok = p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ }
+ var terminator string
+ switch tok.value {
+ case "<":
+ terminator = ">"
+ case "{":
+ terminator = "}"
+ default:
+ return p.errorf("expected '{' or '<', found %q", tok.value)
+ }
+ v := reflect.New(mt.Elem())
+ if pe := p.readStruct(v.Elem(), terminator); pe != nil {
+ return pe
+ }
+ b, err := Marshal(v.Interface().(Message))
+ if err != nil {
+ return p.errorf("failed to marshal message of type %q: %v", messageName, err)
+ }
+ if fieldSet["type_url"] {
+ return p.errorf(anyRepeatedlyUnpacked, "type_url")
+ }
+ if fieldSet["value"] {
+ return p.errorf(anyRepeatedlyUnpacked, "value")
+ }
+ sv.FieldByName("TypeUrl").SetString(extName)
+ sv.FieldByName("Value").SetBytes(b)
+ fieldSet["type_url"] = true
+ fieldSet["value"] = true
+ continue
+ }
+
+ var desc *ExtensionDesc
+ // This could be faster, but it's functional.
+ // TODO: Do something smarter than a linear scan.
+ for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) {
+ if d.Name == extName {
+ desc = d
+ break
+ }
+ }
+ if desc == nil {
+ return p.errorf("unrecognized extension %q", extName)
+ }
+
+ props := &Properties{}
+ props.Parse(desc.Tag)
+
+ typ := reflect.TypeOf(desc.ExtensionType)
+ if err := p.checkForColon(props, typ); err != nil {
+ return err
+ }
+
+ rep := desc.repeated()
+
+ // Read the extension structure, and set it in
+ // the value we're constructing.
+ var ext reflect.Value
+ if !rep {
+ ext = reflect.New(typ).Elem()
+ } else {
+ ext = reflect.New(typ.Elem()).Elem()
+ }
+ if err := p.readAny(ext, props); err != nil {
+ if _, ok := err.(*RequiredNotSetError); !ok {
+ return err
+ }
+ reqFieldErr = err
+ }
+ ep := sv.Addr().Interface().(Message)
+ if !rep {
+ SetExtension(ep, desc, ext.Interface())
+ } else {
+ old, err := GetExtension(ep, desc)
+ var sl reflect.Value
+ if err == nil {
+ sl = reflect.ValueOf(old) // existing slice
+ } else {
+ sl = reflect.MakeSlice(typ, 0, 1)
+ }
+ sl = reflect.Append(sl, ext)
+ SetExtension(ep, desc, sl.Interface())
+ }
+ if err := p.consumeOptionalSeparator(); err != nil {
+ return err
+ }
+ continue
+ }
+
+ // This is a normal, non-extension field.
+ name := tok.value
+ var dst reflect.Value
+ fi, props, ok := structFieldByName(sprops, name)
+ if ok {
+ dst = sv.Field(fi)
+ } else if oop, ok := sprops.OneofTypes[name]; ok {
+ // It is a oneof.
+ props = oop.Prop
+ nv := reflect.New(oop.Type.Elem())
+ dst = nv.Elem().Field(0)
+ field := sv.Field(oop.Field)
+ if !field.IsNil() {
+ return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name)
+ }
+ field.Set(nv)
+ }
+ if !dst.IsValid() {
+ return p.errorf("unknown field name %q in %v", name, st)
+ }
+
+ if dst.Kind() == reflect.Map {
+ // Consume any colon.
+ if err := p.checkForColon(props, dst.Type()); err != nil {
+ return err
+ }
+
+ // Construct the map if it doesn't already exist.
+ if dst.IsNil() {
+ dst.Set(reflect.MakeMap(dst.Type()))
+ }
+ key := reflect.New(dst.Type().Key()).Elem()
+ val := reflect.New(dst.Type().Elem()).Elem()
+
+ // The map entry should be this sequence of tokens:
+ // < key : KEY value : VALUE >
+ // However, implementations may omit key or value, and technically
+ // we should support them in any order. See b/28924776 for a time
+ // this went wrong.
+
+ tok := p.next()
+ var terminator string
+ switch tok.value {
+ case "<":
+ terminator = ">"
+ case "{":
+ terminator = "}"
+ default:
+ return p.errorf("expected '{' or '<', found %q", tok.value)
+ }
+ for {
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value == terminator {
+ break
+ }
+ switch tok.value {
+ case "key":
+ if err := p.consumeToken(":"); err != nil {
+ return err
+ }
+ if err := p.readAny(key, props.MapKeyProp); err != nil {
+ return err
+ }
+ if err := p.consumeOptionalSeparator(); err != nil {
+ return err
+ }
+ case "value":
+ if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil {
+ return err
+ }
+ if err := p.readAny(val, props.MapValProp); err != nil {
+ return err
+ }
+ if err := p.consumeOptionalSeparator(); err != nil {
+ return err
+ }
+ default:
+ p.back()
+ return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value)
+ }
+ }
+
+ dst.SetMapIndex(key, val)
+ continue
+ }
+
+ // Check that it's not already set if it's not a repeated field.
+ if !props.Repeated && fieldSet[name] {
+ return p.errorf("non-repeated field %q was repeated", name)
+ }
+
+ if err := p.checkForColon(props, dst.Type()); err != nil {
+ return err
+ }
+
+ // Parse into the field.
+ fieldSet[name] = true
+ if err := p.readAny(dst, props); err != nil {
+ if _, ok := err.(*RequiredNotSetError); !ok {
+ return err
+ }
+ reqFieldErr = err
+ }
+ if props.Required {
+ reqCount--
+ }
+
+ if err := p.consumeOptionalSeparator(); err != nil {
+ return err
+ }
+
+ }
+
+ if reqCount > 0 {
+ return p.missingRequiredFieldError(sv)
+ }
+ return reqFieldErr
+}
+
+// consumeExtName consumes extension name or expanded Any type URL and the
+// following ']'. It returns the name or URL consumed.
+func (p *textParser) consumeExtName() (string, error) {
+ tok := p.next()
+ if tok.err != nil {
+ return "", tok.err
+ }
+
+ // If extension name or type url is quoted, it's a single token.
+ if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {
+ name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))
+ if err != nil {
+ return "", err
+ }
+ return name, p.consumeToken("]")
+ }
+
+ // Consume everything up to "]"
+ var parts []string
+ for tok.value != "]" {
+ parts = append(parts, tok.value)
+ tok = p.next()
+ if tok.err != nil {
+ return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
+ }
+ if p.done && tok.value != "]" {
+ return "", p.errorf("unclosed type_url or extension name")
+ }
+ }
+ return strings.Join(parts, ""), nil
+}
+
+// consumeOptionalSeparator consumes an optional semicolon or comma.
+// It is used in readStruct to provide backward compatibility.
+func (p *textParser) consumeOptionalSeparator() error {
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value != ";" && tok.value != "," {
+ p.back()
+ }
+ return nil
+}
+
+func (p *textParser) readAny(v reflect.Value, props *Properties) error {
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value == "" {
+ return p.errorf("unexpected EOF")
+ }
+
+ switch fv := v; fv.Kind() {
+ case reflect.Slice:
+ at := v.Type()
+ if at.Elem().Kind() == reflect.Uint8 {
+ // Special case for []byte
+ if tok.value[0] != '"' && tok.value[0] != '\'' {
+ // Deliberately written out here, as the error after
+ // this switch statement would write "invalid []byte: ...",
+ // which is not as user-friendly.
+ return p.errorf("invalid string: %v", tok.value)
+ }
+ bytes := []byte(tok.unquoted)
+ fv.Set(reflect.ValueOf(bytes))
+ return nil
+ }
+ // Repeated field.
+ if tok.value == "[" {
+ // Repeated field with list notation, like [1,2,3].
+ for {
+ fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
+ err := p.readAny(fv.Index(fv.Len()-1), props)
+ if err != nil {
+ return err
+ }
+ tok := p.next()
+ if tok.err != nil {
+ return tok.err
+ }
+ if tok.value == "]" {
+ break
+ }
+ if tok.value != "," {
+ return p.errorf("Expected ']' or ',' found %q", tok.value)
+ }
+ }
+ return nil
+ }
+ // One value of the repeated field.
+ p.back()
+ fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
+ return p.readAny(fv.Index(fv.Len()-1), props)
+ case reflect.Bool:
+ // true/1/t/True or false/f/0/False.
+ switch tok.value {
+ case "true", "1", "t", "True":
+ fv.SetBool(true)
+ return nil
+ case "false", "0", "f", "False":
+ fv.SetBool(false)
+ return nil
+ }
+ case reflect.Float32, reflect.Float64:
+ v := tok.value
+ // Ignore 'f' for compatibility with output generated by C++, but don't
+ // remove 'f' when the value is "-inf" or "inf".
+ if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" {
+ v = v[:len(v)-1]
+ }
+ if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil {
+ fv.SetFloat(f)
+ return nil
+ }
+ case reflect.Int32:
+ if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
+ fv.SetInt(x)
+ return nil
+ }
+
+ if len(props.Enum) == 0 {
+ break
+ }
+ m, ok := enumValueMaps[props.Enum]
+ if !ok {
+ break
+ }
+ x, ok := m[tok.value]
+ if !ok {
+ break
+ }
+ fv.SetInt(int64(x))
+ return nil
+ case reflect.Int64:
+ if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {
+ fv.SetInt(x)
+ return nil
+ }
+
+ case reflect.Ptr:
+ // A basic field (indirected through pointer), or a repeated message/group
+ p.back()
+ fv.Set(reflect.New(fv.Type().Elem()))
+ return p.readAny(fv.Elem(), props)
+ case reflect.String:
+ if tok.value[0] == '"' || tok.value[0] == '\'' {
+ fv.SetString(tok.unquoted)
+ return nil
+ }
+ case reflect.Struct:
+ var terminator string
+ switch tok.value {
+ case "{":
+ terminator = "}"
+ case "<":
+ terminator = ">"
+ default:
+ return p.errorf("expected '{' or '<', found %q", tok.value)
+ }
+ // TODO: Handle nested messages which implement encoding.TextUnmarshaler.
+ return p.readStruct(fv, terminator)
+ case reflect.Uint32:
+ if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
+ fv.SetUint(uint64(x))
+ return nil
+ }
+ case reflect.Uint64:
+ if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
+ fv.SetUint(x)
+ return nil
+ }
+ }
+ return p.errorf("invalid %v: %v", v.Type(), tok.value)
+}
+
+// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb
+// before starting to unmarshal, so any existing data in pb is always removed.
+// If a required field is not set and no other error occurs,
+// UnmarshalText returns *RequiredNotSetError.
+func UnmarshalText(s string, pb Message) error {
+ if um, ok := pb.(encoding.TextUnmarshaler); ok {
+ return um.UnmarshalText([]byte(s))
+ }
+ pb.Reset()
+ v := reflect.ValueOf(pb)
+ return newTextParser(s).readStruct(v.Elem(), "")
+}
diff --git a/vendor/golang.org/x/net/AUTHORS b/vendor/golang.org/x/net/AUTHORS
new file mode 100644
index 00000000..15167cd7
--- /dev/null
+++ b/vendor/golang.org/x/net/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/net/CONTRIBUTORS b/vendor/golang.org/x/net/CONTRIBUTORS
new file mode 100644
index 00000000..1c4577e9
--- /dev/null
+++ b/vendor/golang.org/x/net/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE
new file mode 100644
index 00000000..6a66aea5
--- /dev/null
+++ b/vendor/golang.org/x/net/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/net/PATENTS b/vendor/golang.org/x/net/PATENTS
new file mode 100644
index 00000000..73309904
--- /dev/null
+++ b/vendor/golang.org/x/net/PATENTS
@@ -0,0 +1,22 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Go project.
+
+Google hereby grants to You a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this section)
+patent license to make, have made, use, offer to sell, sell, import,
+transfer and otherwise run, modify and propagate the contents of this
+implementation of Go, where such license applies only to those patent
+claims, both currently owned or controlled by Google and acquired in
+the future, licensable by Google that are necessarily infringed by this
+implementation of Go. This grant does not include claims that would be
+infringed only as a consequence of further modification of this
+implementation. If you or your agent or exclusive licensee institute or
+order or agree to the institution of patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that this implementation of Go or any code incorporated within this
+implementation of Go constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any patent
+rights granted to you under this License for this implementation of Go
+shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go
new file mode 100644
index 00000000..a3c021d3
--- /dev/null
+++ b/vendor/golang.org/x/net/context/context.go
@@ -0,0 +1,56 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package context defines the Context type, which carries deadlines,
+// cancelation signals, and other request-scoped values across API boundaries
+// and between processes.
+// As of Go 1.7 this package is available in the standard library under the
+// name context. https://golang.org/pkg/context.
+//
+// Incoming requests to a server should create a Context, and outgoing calls to
+// servers should accept a Context. The chain of function calls between must
+// propagate the Context, optionally replacing it with a modified copy created
+// using WithDeadline, WithTimeout, WithCancel, or WithValue.
+//
+// Programs that use Contexts should follow these rules to keep interfaces
+// consistent across packages and enable static analysis tools to check context
+// propagation:
+//
+// Do not store Contexts inside a struct type; instead, pass a Context
+// explicitly to each function that needs it. The Context should be the first
+// parameter, typically named ctx:
+//
+// func DoSomething(ctx context.Context, arg Arg) error {
+// // ... use ctx ...
+// }
+//
+// Do not pass a nil Context, even if a function permits it. Pass context.TODO
+// if you are unsure about which Context to use.
+//
+// Use context Values only for request-scoped data that transits processes and
+// APIs, not for passing optional parameters to functions.
+//
+// The same Context may be passed to functions running in different goroutines;
+// Contexts are safe for simultaneous use by multiple goroutines.
+//
+// See http://blog.golang.org/context for example code for a server that uses
+// Contexts.
+package context // import "golang.org/x/net/context"
+
+// Background returns a non-nil, empty Context. It is never canceled, has no
+// values, and has no deadline. It is typically used by the main function,
+// initialization, and tests, and as the top-level Context for incoming
+// requests.
+func Background() Context {
+ return background
+}
+
+// TODO returns a non-nil, empty Context. Code should use context.TODO when
+// it's unclear which Context to use or it is not yet available (because the
+// surrounding function has not yet been extended to accept a Context
+// parameter). TODO is recognized by static analysis tools that determine
+// whether Contexts are propagated correctly in a program.
+func TODO() Context {
+ return todo
+}
diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
new file mode 100644
index 00000000..37dc0cfd
--- /dev/null
+++ b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
@@ -0,0 +1,71 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package ctxhttp provides helper functions for performing context-aware HTTP requests.
+package ctxhttp // import "golang.org/x/net/context/ctxhttp"
+
+import (
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// Do sends an HTTP request with the provided http.Client and returns
+// an HTTP response.
+//
+// If the client is nil, http.DefaultClient is used.
+//
+// The provided ctx must be non-nil. If it is canceled or times out,
+// ctx.Err() will be returned.
+func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
+ if client == nil {
+ client = http.DefaultClient
+ }
+ resp, err := client.Do(req.WithContext(ctx))
+ // If we got an error, and the context has been canceled,
+ // the context's error is probably more useful.
+ if err != nil {
+ select {
+ case <-ctx.Done():
+ err = ctx.Err()
+ default:
+ }
+ }
+ return resp, err
+}
+
+// Get issues a GET request via the Do function.
+func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
+ req, err := http.NewRequest("GET", url, nil)
+ if err != nil {
+ return nil, err
+ }
+ return Do(ctx, client, req)
+}
+
+// Head issues a HEAD request via the Do function.
+func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
+ req, err := http.NewRequest("HEAD", url, nil)
+ if err != nil {
+ return nil, err
+ }
+ return Do(ctx, client, req)
+}
+
+// Post issues a POST request via the Do function.
+func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
+ req, err := http.NewRequest("POST", url, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Set("Content-Type", bodyType)
+ return Do(ctx, client, req)
+}
+
+// PostForm issues a POST request via the Do function.
+func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
+ return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
+}
diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go
new file mode 100644
index 00000000..d20f52b7
--- /dev/null
+++ b/vendor/golang.org/x/net/context/go17.go
@@ -0,0 +1,72 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build go1.7
+
+package context
+
+import (
+ "context" // standard library's context, as of Go 1.7
+ "time"
+)
+
+var (
+ todo = context.TODO()
+ background = context.Background()
+)
+
+// Canceled is the error returned by Context.Err when the context is canceled.
+var Canceled = context.Canceled
+
+// DeadlineExceeded is the error returned by Context.Err when the context's
+// deadline passes.
+var DeadlineExceeded = context.DeadlineExceeded
+
+// WithCancel returns a copy of parent with a new Done channel. The returned
+// context's Done channel is closed when the returned cancel function is called
+// or when the parent context's Done channel is closed, whichever happens first.
+//
+// Canceling this context releases resources associated with it, so code should
+// call cancel as soon as the operations running in this Context complete.
+func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
+ ctx, f := context.WithCancel(parent)
+ return ctx, CancelFunc(f)
+}
+
+// WithDeadline returns a copy of the parent context with the deadline adjusted
+// to be no later than d. If the parent's deadline is already earlier than d,
+// WithDeadline(parent, d) is semantically equivalent to parent. The returned
+// context's Done channel is closed when the deadline expires, when the returned
+// cancel function is called, or when the parent context's Done channel is
+// closed, whichever happens first.
+//
+// Canceling this context releases resources associated with it, so code should
+// call cancel as soon as the operations running in this Context complete.
+func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
+ ctx, f := context.WithDeadline(parent, deadline)
+ return ctx, CancelFunc(f)
+}
+
+// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
+//
+// Canceling this context releases resources associated with it, so code should
+// call cancel as soon as the operations running in this Context complete:
+//
+// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
+// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
+// defer cancel() // releases resources if slowOperation completes before timeout elapses
+// return slowOperation(ctx)
+// }
+func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
+ return WithDeadline(parent, time.Now().Add(timeout))
+}
+
+// WithValue returns a copy of parent in which the value associated with key is
+// val.
+//
+// Use context Values only for request-scoped data that transits processes and
+// APIs, not for passing optional parameters to functions.
+func WithValue(parent Context, key interface{}, val interface{}) Context {
+ return context.WithValue(parent, key, val)
+}
diff --git a/vendor/golang.org/x/net/context/go19.go b/vendor/golang.org/x/net/context/go19.go
new file mode 100644
index 00000000..d88bd1db
--- /dev/null
+++ b/vendor/golang.org/x/net/context/go19.go
@@ -0,0 +1,20 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build go1.9
+
+package context
+
+import "context" // standard library's context, as of Go 1.7
+
+// A Context carries a deadline, a cancelation signal, and other values across
+// API boundaries.
+//
+// Context's methods may be called by multiple goroutines simultaneously.
+type Context = context.Context
+
+// A CancelFunc tells an operation to abandon its work.
+// A CancelFunc does not wait for the work to stop.
+// After the first call, subsequent calls to a CancelFunc do nothing.
+type CancelFunc = context.CancelFunc
diff --git a/vendor/golang.org/x/net/context/pre_go17.go b/vendor/golang.org/x/net/context/pre_go17.go
new file mode 100644
index 00000000..0f35592d
--- /dev/null
+++ b/vendor/golang.org/x/net/context/pre_go17.go
@@ -0,0 +1,300 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !go1.7
+
+package context
+
+import (
+ "errors"
+ "fmt"
+ "sync"
+ "time"
+)
+
+// An emptyCtx is never canceled, has no values, and has no deadline. It is not
+// struct{}, since vars of this type must have distinct addresses.
+type emptyCtx int
+
+func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
+ return
+}
+
+func (*emptyCtx) Done() <-chan struct{} {
+ return nil
+}
+
+func (*emptyCtx) Err() error {
+ return nil
+}
+
+func (*emptyCtx) Value(key interface{}) interface{} {
+ return nil
+}
+
+func (e *emptyCtx) String() string {
+ switch e {
+ case background:
+ return "context.Background"
+ case todo:
+ return "context.TODO"
+ }
+ return "unknown empty Context"
+}
+
+var (
+ background = new(emptyCtx)
+ todo = new(emptyCtx)
+)
+
+// Canceled is the error returned by Context.Err when the context is canceled.
+var Canceled = errors.New("context canceled")
+
+// DeadlineExceeded is the error returned by Context.Err when the context's
+// deadline passes.
+var DeadlineExceeded = errors.New("context deadline exceeded")
+
+// WithCancel returns a copy of parent with a new Done channel. The returned
+// context's Done channel is closed when the returned cancel function is called
+// or when the parent context's Done channel is closed, whichever happens first.
+//
+// Canceling this context releases resources associated with it, so code should
+// call cancel as soon as the operations running in this Context complete.
+func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
+ c := newCancelCtx(parent)
+ propagateCancel(parent, c)
+ return c, func() { c.cancel(true, Canceled) }
+}
+
+// newCancelCtx returns an initialized cancelCtx.
+func newCancelCtx(parent Context) *cancelCtx {
+ return &cancelCtx{
+ Context: parent,
+ done: make(chan struct{}),
+ }
+}
+
+// propagateCancel arranges for child to be canceled when parent is.
+func propagateCancel(parent Context, child canceler) {
+ if parent.Done() == nil {
+ return // parent is never canceled
+ }
+ if p, ok := parentCancelCtx(parent); ok {
+ p.mu.Lock()
+ if p.err != nil {
+ // parent has already been canceled
+ child.cancel(false, p.err)
+ } else {
+ if p.children == nil {
+ p.children = make(map[canceler]bool)
+ }
+ p.children[child] = true
+ }
+ p.mu.Unlock()
+ } else {
+ go func() {
+ select {
+ case <-parent.Done():
+ child.cancel(false, parent.Err())
+ case <-child.Done():
+ }
+ }()
+ }
+}
+
+// parentCancelCtx follows a chain of parent references until it finds a
+// *cancelCtx. This function understands how each of the concrete types in this
+// package represents its parent.
+func parentCancelCtx(parent Context) (*cancelCtx, bool) {
+ for {
+ switch c := parent.(type) {
+ case *cancelCtx:
+ return c, true
+ case *timerCtx:
+ return c.cancelCtx, true
+ case *valueCtx:
+ parent = c.Context
+ default:
+ return nil, false
+ }
+ }
+}
+
+// removeChild removes a context from its parent.
+func removeChild(parent Context, child canceler) {
+ p, ok := parentCancelCtx(parent)
+ if !ok {
+ return
+ }
+ p.mu.Lock()
+ if p.children != nil {
+ delete(p.children, child)
+ }
+ p.mu.Unlock()
+}
+
+// A canceler is a context type that can be canceled directly. The
+// implementations are *cancelCtx and *timerCtx.
+type canceler interface {
+ cancel(removeFromParent bool, err error)
+ Done() <-chan struct{}
+}
+
+// A cancelCtx can be canceled. When canceled, it also cancels any children
+// that implement canceler.
+type cancelCtx struct {
+ Context
+
+ done chan struct{} // closed by the first cancel call.
+
+ mu sync.Mutex
+ children map[canceler]bool // set to nil by the first cancel call
+ err error // set to non-nil by the first cancel call
+}
+
+func (c *cancelCtx) Done() <-chan struct{} {
+ return c.done
+}
+
+func (c *cancelCtx) Err() error {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ return c.err
+}
+
+func (c *cancelCtx) String() string {
+ return fmt.Sprintf("%v.WithCancel", c.Context)
+}
+
+// cancel closes c.done, cancels each of c's children, and, if
+// removeFromParent is true, removes c from its parent's children.
+func (c *cancelCtx) cancel(removeFromParent bool, err error) {
+ if err == nil {
+ panic("context: internal error: missing cancel error")
+ }
+ c.mu.Lock()
+ if c.err != nil {
+ c.mu.Unlock()
+ return // already canceled
+ }
+ c.err = err
+ close(c.done)
+ for child := range c.children {
+ // NOTE: acquiring the child's lock while holding parent's lock.
+ child.cancel(false, err)
+ }
+ c.children = nil
+ c.mu.Unlock()
+
+ if removeFromParent {
+ removeChild(c.Context, c)
+ }
+}
+
+// WithDeadline returns a copy of the parent context with the deadline adjusted
+// to be no later than d. If the parent's deadline is already earlier than d,
+// WithDeadline(parent, d) is semantically equivalent to parent. The returned
+// context's Done channel is closed when the deadline expires, when the returned
+// cancel function is called, or when the parent context's Done channel is
+// closed, whichever happens first.
+//
+// Canceling this context releases resources associated with it, so code should
+// call cancel as soon as the operations running in this Context complete.
+func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
+ if cur, ok := parent.Deadline(); ok && cur.Before(deadline) {
+ // The current deadline is already sooner than the new one.
+ return WithCancel(parent)
+ }
+ c := &timerCtx{
+ cancelCtx: newCancelCtx(parent),
+ deadline: deadline,
+ }
+ propagateCancel(parent, c)
+ d := deadline.Sub(time.Now())
+ if d <= 0 {
+ c.cancel(true, DeadlineExceeded) // deadline has already passed
+ return c, func() { c.cancel(true, Canceled) }
+ }
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ if c.err == nil {
+ c.timer = time.AfterFunc(d, func() {
+ c.cancel(true, DeadlineExceeded)
+ })
+ }
+ return c, func() { c.cancel(true, Canceled) }
+}
+
+// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to
+// implement Done and Err. It implements cancel by stopping its timer then
+// delegating to cancelCtx.cancel.
+type timerCtx struct {
+ *cancelCtx
+ timer *time.Timer // Under cancelCtx.mu.
+
+ deadline time.Time
+}
+
+func (c *timerCtx) Deadline() (deadline time.Time, ok bool) {
+ return c.deadline, true
+}
+
+func (c *timerCtx) String() string {
+ return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now()))
+}
+
+func (c *timerCtx) cancel(removeFromParent bool, err error) {
+ c.cancelCtx.cancel(false, err)
+ if removeFromParent {
+ // Remove this timerCtx from its parent cancelCtx's children.
+ removeChild(c.cancelCtx.Context, c)
+ }
+ c.mu.Lock()
+ if c.timer != nil {
+ c.timer.Stop()
+ c.timer = nil
+ }
+ c.mu.Unlock()
+}
+
+// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
+//
+// Canceling this context releases resources associated with it, so code should
+// call cancel as soon as the operations running in this Context complete:
+//
+// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
+// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
+// defer cancel() // releases resources if slowOperation completes before timeout elapses
+// return slowOperation(ctx)
+// }
+func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
+ return WithDeadline(parent, time.Now().Add(timeout))
+}
+
+// WithValue returns a copy of parent in which the value associated with key is
+// val.
+//
+// Use context Values only for request-scoped data that transits processes and
+// APIs, not for passing optional parameters to functions.
+func WithValue(parent Context, key interface{}, val interface{}) Context {
+ return &valueCtx{parent, key, val}
+}
+
+// A valueCtx carries a key-value pair. It implements Value for that key and
+// delegates all other calls to the embedded Context.
+type valueCtx struct {
+ Context
+ key, val interface{}
+}
+
+func (c *valueCtx) String() string {
+ return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val)
+}
+
+func (c *valueCtx) Value(key interface{}) interface{} {
+ if c.key == key {
+ return c.val
+ }
+ return c.Context.Value(key)
+}
diff --git a/vendor/golang.org/x/net/context/pre_go19.go b/vendor/golang.org/x/net/context/pre_go19.go
new file mode 100644
index 00000000..b105f80b
--- /dev/null
+++ b/vendor/golang.org/x/net/context/pre_go19.go
@@ -0,0 +1,109 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !go1.9
+
+package context
+
+import "time"
+
+// A Context carries a deadline, a cancelation signal, and other values across
+// API boundaries.
+//
+// Context's methods may be called by multiple goroutines simultaneously.
+type Context interface {
+ // Deadline returns the time when work done on behalf of this context
+ // should be canceled. Deadline returns ok==false when no deadline is
+ // set. Successive calls to Deadline return the same results.
+ Deadline() (deadline time.Time, ok bool)
+
+ // Done returns a channel that's closed when work done on behalf of this
+ // context should be canceled. Done may return nil if this context can
+ // never be canceled. Successive calls to Done return the same value.
+ //
+ // WithCancel arranges for Done to be closed when cancel is called;
+ // WithDeadline arranges for Done to be closed when the deadline
+ // expires; WithTimeout arranges for Done to be closed when the timeout
+ // elapses.
+ //
+ // Done is provided for use in select statements:
+ //
+ // // Stream generates values with DoSomething and sends them to out
+ // // until DoSomething returns an error or ctx.Done is closed.
+ // func Stream(ctx context.Context, out chan<- Value) error {
+ // for {
+ // v, err := DoSomething(ctx)
+ // if err != nil {
+ // return err
+ // }
+ // select {
+ // case <-ctx.Done():
+ // return ctx.Err()
+ // case out <- v:
+ // }
+ // }
+ // }
+ //
+ // See http://blog.golang.org/pipelines for more examples of how to use
+ // a Done channel for cancelation.
+ Done() <-chan struct{}
+
+ // Err returns a non-nil error value after Done is closed. Err returns
+ // Canceled if the context was canceled or DeadlineExceeded if the
+ // context's deadline passed. No other values for Err are defined.
+ // After Done is closed, successive calls to Err return the same value.
+ Err() error
+
+ // Value returns the value associated with this context for key, or nil
+ // if no value is associated with key. Successive calls to Value with
+ // the same key returns the same result.
+ //
+ // Use context values only for request-scoped data that transits
+ // processes and API boundaries, not for passing optional parameters to
+ // functions.
+ //
+ // A key identifies a specific value in a Context. Functions that wish
+ // to store values in Context typically allocate a key in a global
+ // variable then use that key as the argument to context.WithValue and
+ // Context.Value. A key can be any type that supports equality;
+ // packages should define keys as an unexported type to avoid
+ // collisions.
+ //
+ // Packages that define a Context key should provide type-safe accessors
+ // for the values stores using that key:
+ //
+ // // Package user defines a User type that's stored in Contexts.
+ // package user
+ //
+ // import "golang.org/x/net/context"
+ //
+ // // User is the type of value stored in the Contexts.
+ // type User struct {...}
+ //
+ // // key is an unexported type for keys defined in this package.
+ // // This prevents collisions with keys defined in other packages.
+ // type key int
+ //
+ // // userKey is the key for user.User values in Contexts. It is
+ // // unexported; clients use user.NewContext and user.FromContext
+ // // instead of using this key directly.
+ // var userKey key = 0
+ //
+ // // NewContext returns a new Context that carries value u.
+ // func NewContext(ctx context.Context, u *User) context.Context {
+ // return context.WithValue(ctx, userKey, u)
+ // }
+ //
+ // // FromContext returns the User value stored in ctx, if any.
+ // func FromContext(ctx context.Context) (*User, bool) {
+ // u, ok := ctx.Value(userKey).(*User)
+ // return u, ok
+ // }
+ Value(key interface{}) interface{}
+}
+
+// A CancelFunc tells an operation to abandon its work.
+// A CancelFunc does not wait for the work to stop.
+// After the first call, subsequent calls to a CancelFunc do nothing.
+type CancelFunc func()
diff --git a/vendor/golang.org/x/oauth2/AUTHORS b/vendor/golang.org/x/oauth2/AUTHORS
new file mode 100644
index 00000000..15167cd7
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/oauth2/CONTRIBUTORS b/vendor/golang.org/x/oauth2/CONTRIBUTORS
new file mode 100644
index 00000000..1c4577e9
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE
index 2a7cf70d..6a66aea5 100644
--- a/vendor/golang.org/x/oauth2/LICENSE
+++ b/vendor/golang.org/x/oauth2/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2009 The Go Authors.
+Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google LLC nor the names of its
+ * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md
index 781770c2..0f443e69 100644
--- a/vendor/golang.org/x/oauth2/README.md
+++ b/vendor/golang.org/x/oauth2/README.md
@@ -1,7 +1,7 @@
# OAuth2 for Go
-[![Go Reference](https://pkg.go.dev/badge/golang.org/x/oauth2.svg)](https://pkg.go.dev/golang.org/x/oauth2)
[![Build Status](https://travis-ci.org/golang/oauth2.svg?branch=master)](https://travis-ci.org/golang/oauth2)
+[![GoDoc](https://godoc.org/golang.org/x/oauth2?status.svg)](https://godoc.org/golang.org/x/oauth2)
oauth2 package contains a client implementation for OAuth 2.0 spec.
@@ -14,27 +14,22 @@ go get golang.org/x/oauth2
Or you can manually git clone the repository to
`$(go env GOPATH)/src/golang.org/x/oauth2`.
-See pkg.go.dev for further documentation and examples.
+See godoc for further documentation and examples.
-* [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2)
-* [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google)
+* [godoc.org/golang.org/x/oauth2](http://godoc.org/golang.org/x/oauth2)
+* [godoc.org/golang.org/x/oauth2/google](http://godoc.org/golang.org/x/oauth2/google)
-## Policy for new endpoints
+## Policy for new packages
-We no longer accept new provider-specific packages in this repo if all
-they do is add a single endpoint variable. If you just want to add a
-single endpoint, add it to the
-[pkg.go.dev/golang.org/x/oauth2/endpoints](https://pkg.go.dev/golang.org/x/oauth2/endpoints)
-package.
+We no longer accept new provider-specific packages in this repo. For
+defining provider endpoints and provider-specific OAuth2 behavior, we
+encourage you to create packages elsewhere. We'll keep the existing
+packages for compatibility.
## Report Issues / Send Patches
-The main issue tracker for the oauth2 repository is located at
-https://github.com/golang/oauth2/issues.
-
This repository uses Gerrit for code changes. To learn how to submit changes to
-this repository, see https://golang.org/doc/contribute.html. In particular:
+this repository, see https://golang.org/doc/contribute.html.
-* Excluding trivial changes, all contributions should be connected to an existing issue.
-* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted.
-* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2).
+The main issue tracker for the oauth2 repository is located at
+https://github.com/golang/oauth2/issues.
diff --git a/vendor/golang.org/x/oauth2/deviceauth.go b/vendor/golang.org/x/oauth2/deviceauth.go
deleted file mode 100644
index e99c92f3..00000000
--- a/vendor/golang.org/x/oauth2/deviceauth.go
+++ /dev/null
@@ -1,198 +0,0 @@
-package oauth2
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strings"
- "time"
-
- "golang.org/x/oauth2/internal"
-)
-
-// https://datatracker.ietf.org/doc/html/rfc8628#section-3.5
-const (
- errAuthorizationPending = "authorization_pending"
- errSlowDown = "slow_down"
- errAccessDenied = "access_denied"
- errExpiredToken = "expired_token"
-)
-
-// DeviceAuthResponse describes a successful RFC 8628 Device Authorization Response
-// https://datatracker.ietf.org/doc/html/rfc8628#section-3.2
-type DeviceAuthResponse struct {
- // DeviceCode
- DeviceCode string `json:"device_code"`
- // UserCode is the code the user should enter at the verification uri
- UserCode string `json:"user_code"`
- // VerificationURI is where user should enter the user code
- VerificationURI string `json:"verification_uri"`
- // VerificationURIComplete (if populated) includes the user code in the verification URI. This is typically shown to the user in non-textual form, such as a QR code.
- VerificationURIComplete string `json:"verification_uri_complete,omitempty"`
- // Expiry is when the device code and user code expire
- Expiry time.Time `json:"expires_in,omitempty"`
- // Interval is the duration in seconds that Poll should wait between requests
- Interval int64 `json:"interval,omitempty"`
-}
-
-func (d DeviceAuthResponse) MarshalJSON() ([]byte, error) {
- type Alias DeviceAuthResponse
- var expiresIn int64
- if !d.Expiry.IsZero() {
- expiresIn = int64(time.Until(d.Expiry).Seconds())
- }
- return json.Marshal(&struct {
- ExpiresIn int64 `json:"expires_in,omitempty"`
- *Alias
- }{
- ExpiresIn: expiresIn,
- Alias: (*Alias)(&d),
- })
-
-}
-
-func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
- type Alias DeviceAuthResponse
- aux := &struct {
- ExpiresIn int64 `json:"expires_in"`
- // workaround misspelling of verification_uri
- VerificationURL string `json:"verification_url"`
- *Alias
- }{
- Alias: (*Alias)(c),
- }
- if err := json.Unmarshal(data, &aux); err != nil {
- return err
- }
- if aux.ExpiresIn != 0 {
- c.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn))
- }
- if c.VerificationURI == "" {
- c.VerificationURI = aux.VerificationURL
- }
- return nil
-}
-
-// DeviceAuth returns a device auth struct which contains a device code
-// and authorization information provided for users to enter on another device.
-func (c *Config) DeviceAuth(ctx context.Context, opts ...AuthCodeOption) (*DeviceAuthResponse, error) {
- // https://datatracker.ietf.org/doc/html/rfc8628#section-3.1
- v := url.Values{
- "client_id": {c.ClientID},
- }
- if len(c.Scopes) > 0 {
- v.Set("scope", strings.Join(c.Scopes, " "))
- }
- for _, opt := range opts {
- opt.setValue(v)
- }
- return retrieveDeviceAuth(ctx, c, v)
-}
-
-func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAuthResponse, error) {
- if c.Endpoint.DeviceAuthURL == "" {
- return nil, errors.New("endpoint missing DeviceAuthURL")
- }
-
- req, err := http.NewRequest("POST", c.Endpoint.DeviceAuthURL, strings.NewReader(v.Encode()))
- if err != nil {
- return nil, err
- }
- req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- req.Header.Set("Accept", "application/json")
-
- t := time.Now()
- r, err := internal.ContextClient(ctx).Do(req)
- if err != nil {
- return nil, err
- }
-
- body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20))
- if err != nil {
- return nil, fmt.Errorf("oauth2: cannot auth device: %v", err)
- }
- if code := r.StatusCode; code < 200 || code > 299 {
- return nil, &RetrieveError{
- Response: r,
- Body: body,
- }
- }
-
- da := &DeviceAuthResponse{}
- err = json.Unmarshal(body, &da)
- if err != nil {
- return nil, fmt.Errorf("unmarshal %s", err)
- }
-
- if !da.Expiry.IsZero() {
- // Make a small adjustment to account for time taken by the request
- da.Expiry = da.Expiry.Add(-time.Since(t))
- }
-
- return da, nil
-}
-
-// DeviceAccessToken polls the server to exchange a device code for a token.
-func (c *Config) DeviceAccessToken(ctx context.Context, da *DeviceAuthResponse, opts ...AuthCodeOption) (*Token, error) {
- if !da.Expiry.IsZero() {
- var cancel context.CancelFunc
- ctx, cancel = context.WithDeadline(ctx, da.Expiry)
- defer cancel()
- }
-
- // https://datatracker.ietf.org/doc/html/rfc8628#section-3.4
- v := url.Values{
- "client_id": {c.ClientID},
- "grant_type": {"urn:ietf:params:oauth:grant-type:device_code"},
- "device_code": {da.DeviceCode},
- }
- if len(c.Scopes) > 0 {
- v.Set("scope", strings.Join(c.Scopes, " "))
- }
- for _, opt := range opts {
- opt.setValue(v)
- }
-
- // "If no value is provided, clients MUST use 5 as the default."
- // https://datatracker.ietf.org/doc/html/rfc8628#section-3.2
- interval := da.Interval
- if interval == 0 {
- interval = 5
- }
-
- ticker := time.NewTicker(time.Duration(interval) * time.Second)
- defer ticker.Stop()
- for {
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case <-ticker.C:
- tok, err := retrieveToken(ctx, c, v)
- if err == nil {
- return tok, nil
- }
-
- e, ok := err.(*RetrieveError)
- if !ok {
- return nil, err
- }
- switch e.ErrorCode {
- case errSlowDown:
- // https://datatracker.ietf.org/doc/html/rfc8628#section-3.5
- // "the interval MUST be increased by 5 seconds for this and all subsequent requests"
- interval += 5
- ticker.Reset(time.Duration(interval) * time.Second)
- case errAuthorizationPending:
- // Do nothing.
- case errAccessDenied, errExpiredToken:
- fallthrough
- default:
- return tok, err
- }
- }
- }
-}
diff --git a/vendor/golang.org/x/oauth2/go.mod b/vendor/golang.org/x/oauth2/go.mod
index d73aa699..b3457815 100644
--- a/vendor/golang.org/x/oauth2/go.mod
+++ b/vendor/golang.org/x/oauth2/go.mod
@@ -1,8 +1,10 @@
module golang.org/x/oauth2
-go 1.18
+go 1.11
require (
- cloud.google.com/go/compute/metadata v0.3.0
- github.com/google/go-cmp v0.5.9
+ cloud.google.com/go v0.34.0
+ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
+ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
+ google.golang.org/appengine v1.4.0
)
diff --git a/vendor/golang.org/x/oauth2/go.sum b/vendor/golang.org/x/oauth2/go.sum
index 0c905286..6f0079b0 100644
--- a/vendor/golang.org/x/oauth2/go.sum
+++ b/vendor/golang.org/x/oauth2/go.sum
@@ -1,4 +1,12 @@
-cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
-cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
diff --git a/vendor/golang.org/x/oauth2/internal/client_appengine.go b/vendor/golang.org/x/oauth2/internal/client_appengine.go
new file mode 100644
index 00000000..74348718
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/internal/client_appengine.go
@@ -0,0 +1,13 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build appengine
+
+package internal
+
+import "google.golang.org/appengine/urlfetch"
+
+func init() {
+ appengineClientHook = urlfetch.Client
+}
diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go
index 14989bea..c0ab196c 100644
--- a/vendor/golang.org/x/oauth2/internal/oauth2.go
+++ b/vendor/golang.org/x/oauth2/internal/oauth2.go
@@ -14,7 +14,7 @@ import (
// ParseKey converts the binary contents of a private key file
// to an *rsa.PrivateKey. It detects whether the private key is in a
-// PEM container or not. If so, it extracts the private key
+// PEM container or not. If so, it extracts the the private key
// from PEM container before conversion. It only supports PEM
// containers with no passphrase.
func ParseKey(key []byte) (*rsa.PrivateKey, error) {
diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go
index e83ddeef..355c3869 100644
--- a/vendor/golang.org/x/oauth2/internal/token.go
+++ b/vendor/golang.org/x/oauth2/internal/token.go
@@ -18,8 +18,9 @@ import (
"strconv"
"strings"
"sync"
- "sync/atomic"
"time"
+
+ "golang.org/x/net/context/ctxhttp"
)
// Token represents the credentials used to authorize
@@ -56,18 +57,12 @@ type Token struct {
}
// tokenJSON is the struct representing the HTTP response from OAuth2
-// providers returning a token or error in JSON form.
-// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
+// providers returning a token in JSON form.
type tokenJSON struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
ExpiresIn expirationTime `json:"expires_in"` // at least PayPal returns string, while most return number
- // error fields
- // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
- ErrorCode string `json:"error"`
- ErrorDescription string `json:"error_description"`
- ErrorURI string `json:"error_uri"`
}
func (e *tokenJSON) expiry() (t time.Time) {
@@ -116,60 +111,41 @@ const (
AuthStyleInHeader AuthStyle = 2
)
-// LazyAuthStyleCache is a backwards compatibility compromise to let Configs
-// have a lazily-initialized AuthStyleCache.
-//
-// The two users of this, oauth2.Config and oauth2/clientcredentials.Config,
-// both would ideally just embed an unexported AuthStyleCache but because both
-// were historically allowed to be copied by value we can't retroactively add an
-// uncopyable Mutex to them.
-//
-// We could use an atomic.Pointer, but that was added recently enough (in Go
-// 1.18) that we'd break Go 1.17 users where the tests as of 2023-08-03
-// still pass. By using an atomic.Value, it supports both Go 1.17 and
-// copying by value, even if that's not ideal.
-type LazyAuthStyleCache struct {
- v atomic.Value // of *AuthStyleCache
-}
-
-func (lc *LazyAuthStyleCache) Get() *AuthStyleCache {
- if c, ok := lc.v.Load().(*AuthStyleCache); ok {
- return c
- }
- c := new(AuthStyleCache)
- if !lc.v.CompareAndSwap(nil, c) {
- c = lc.v.Load().(*AuthStyleCache)
- }
- return c
-}
-
-// AuthStyleCache is the set of tokenURLs we've successfully used via
+// authStyleCache is the set of tokenURLs we've successfully used via
// RetrieveToken and which style auth we ended up using.
// It's called a cache, but it doesn't (yet?) shrink. It's expected that
// the set of OAuth2 servers a program contacts over time is fixed and
// small.
-type AuthStyleCache struct {
- mu sync.Mutex
- m map[string]AuthStyle // keyed by tokenURL
+var authStyleCache struct {
+ sync.Mutex
+ m map[string]AuthStyle // keyed by tokenURL
+}
+
+// ResetAuthCache resets the global authentication style cache used
+// for AuthStyleUnknown token requests.
+func ResetAuthCache() {
+ authStyleCache.Lock()
+ defer authStyleCache.Unlock()
+ authStyleCache.m = nil
}
// lookupAuthStyle reports which auth style we last used with tokenURL
// when calling RetrieveToken and whether we have ever done so.
-func (c *AuthStyleCache) lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {
- c.mu.Lock()
- defer c.mu.Unlock()
- style, ok = c.m[tokenURL]
+func lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {
+ authStyleCache.Lock()
+ defer authStyleCache.Unlock()
+ style, ok = authStyleCache.m[tokenURL]
return
}
// setAuthStyle adds an entry to authStyleCache, documented above.
-func (c *AuthStyleCache) setAuthStyle(tokenURL string, v AuthStyle) {
- c.mu.Lock()
- defer c.mu.Unlock()
- if c.m == nil {
- c.m = make(map[string]AuthStyle)
+func setAuthStyle(tokenURL string, v AuthStyle) {
+ authStyleCache.Lock()
+ defer authStyleCache.Unlock()
+ if authStyleCache.m == nil {
+ authStyleCache.m = make(map[string]AuthStyle)
}
- c.m[tokenURL] = v
+ authStyleCache.m[tokenURL] = v
}
// newTokenRequest returns a new *http.Request to retrieve a new token
@@ -209,10 +185,10 @@ func cloneURLValues(v url.Values) url.Values {
return v2
}
-func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle, styleCache *AuthStyleCache) (*Token, error) {
+func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle) (*Token, error) {
needsAuthStyleProbe := authStyle == 0
if needsAuthStyleProbe {
- if style, ok := styleCache.lookupAuthStyle(tokenURL); ok {
+ if style, ok := lookupAuthStyle(tokenURL); ok {
authStyle = style
needsAuthStyleProbe = false
} else {
@@ -242,7 +218,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
token, err = doTokenRoundTrip(ctx, req)
}
if needsAuthStyleProbe && err == nil {
- styleCache.setAuthStyle(tokenURL, authStyle)
+ setAuthStyle(tokenURL, authStyle)
}
// Don't overwrite `RefreshToken` with an empty value
// if this was a token refreshing request.
@@ -253,7 +229,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
}
func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
- r, err := ContextClient(ctx).Do(req.WithContext(ctx))
+ r, err := ctxhttp.Do(ctx, ContextClient(ctx), req)
if err != nil {
return nil, err
}
@@ -262,29 +238,21 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
if err != nil {
return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err)
}
-
- failureStatus := r.StatusCode < 200 || r.StatusCode > 299
- retrieveError := &RetrieveError{
- Response: r,
- Body: body,
- // attempt to populate error detail below
+ if code := r.StatusCode; code < 200 || code > 299 {
+ return nil, &RetrieveError{
+ Response: r,
+ Body: body,
+ }
}
var token *Token
content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type"))
switch content {
case "application/x-www-form-urlencoded", "text/plain":
- // some endpoints return a query string
vals, err := url.ParseQuery(string(body))
if err != nil {
- if failureStatus {
- return nil, retrieveError
- }
- return nil, fmt.Errorf("oauth2: cannot parse response: %v", err)
+ return nil, err
}
- retrieveError.ErrorCode = vals.Get("error")
- retrieveError.ErrorDescription = vals.Get("error_description")
- retrieveError.ErrorURI = vals.Get("error_uri")
token = &Token{
AccessToken: vals.Get("access_token"),
TokenType: vals.Get("token_type"),
@@ -299,14 +267,8 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
default:
var tj tokenJSON
if err = json.Unmarshal(body, &tj); err != nil {
- if failureStatus {
- return nil, retrieveError
- }
- return nil, fmt.Errorf("oauth2: cannot parse json: %v", err)
+ return nil, err
}
- retrieveError.ErrorCode = tj.ErrorCode
- retrieveError.ErrorDescription = tj.ErrorDescription
- retrieveError.ErrorURI = tj.ErrorURI
token = &Token{
AccessToken: tj.AccessToken,
TokenType: tj.TokenType,
@@ -316,37 +278,17 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
}
json.Unmarshal(body, &token.Raw) // no error checks for optional fields
}
- // according to spec, servers should respond status 400 in error case
- // https://www.rfc-editor.org/rfc/rfc6749#section-5.2
- // but some unorthodox servers respond 200 in error case
- if failureStatus || retrieveError.ErrorCode != "" {
- return nil, retrieveError
- }
if token.AccessToken == "" {
return nil, errors.New("oauth2: server response missing access_token")
}
return token, nil
}
-// mirrors oauth2.RetrieveError
type RetrieveError struct {
- Response *http.Response
- Body []byte
- ErrorCode string
- ErrorDescription string
- ErrorURI string
+ Response *http.Response
+ Body []byte
}
func (r *RetrieveError) Error() string {
- if r.ErrorCode != "" {
- s := fmt.Sprintf("oauth2: %q", r.ErrorCode)
- if r.ErrorDescription != "" {
- s += fmt.Sprintf(" %q", r.ErrorDescription)
- }
- if r.ErrorURI != "" {
- s += fmt.Sprintf(" %q", r.ErrorURI)
- }
- return s
- }
return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body)
}
diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go
index b9db01dd..572074a6 100644
--- a/vendor/golang.org/x/oauth2/internal/transport.go
+++ b/vendor/golang.org/x/oauth2/internal/transport.go
@@ -18,11 +18,16 @@ var HTTPClient ContextKey
// because nobody else can create a ContextKey, being unexported.
type ContextKey struct{}
+var appengineClientHook func(context.Context) *http.Client
+
func ContextClient(ctx context.Context) *http.Client {
if ctx != nil {
if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok {
return hc
}
}
+ if appengineClientHook != nil {
+ return appengineClientHook(ctx)
+ }
return http.DefaultClient
}
diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go
index 09f6a49b..291df5c8 100644
--- a/vendor/golang.org/x/oauth2/oauth2.go
+++ b/vendor/golang.org/x/oauth2/oauth2.go
@@ -16,7 +16,6 @@ import (
"net/url"
"strings"
"sync"
- "time"
"golang.org/x/oauth2/internal"
)
@@ -58,10 +57,6 @@ type Config struct {
// Scope specifies optional requested permissions.
Scopes []string
-
- // authStyleCache caches which auth style to use when Endpoint.AuthStyle is
- // the zero value (AuthStyleAutoDetect).
- authStyleCache internal.LazyAuthStyleCache
}
// A TokenSource is anything that can return a token.
@@ -75,9 +70,8 @@ type TokenSource interface {
// Endpoint represents an OAuth 2.0 provider's authorization and token
// endpoint URLs.
type Endpoint struct {
- AuthURL string
- DeviceAuthURL string
- TokenURL string
+ AuthURL string
+ TokenURL string
// AuthStyle optionally specifies how the endpoint wants the
// client ID & client secret sent. The zero value means to
@@ -144,19 +138,15 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page
// that asks for permissions for the required scopes explicitly.
//
-// State is an opaque value used by the client to maintain state between the
-// request and callback. The authorization server includes this value when
-// redirecting the user agent back to the client.
+// State is a token to protect the user from CSRF attacks. You must
+// always provide a non-empty string and validate that it matches the
+// the state query parameter on your redirect callback.
+// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info.
//
// Opts may include AccessTypeOnline or AccessTypeOffline, as well
// as ApprovalForce.
-//
-// To protect against CSRF attacks, opts should include a PKCE challenge
-// (S256ChallengeOption). Not all servers support PKCE. An alternative is to
-// generate a random state parameter and verify it after exchange.
-// See https://datatracker.ietf.org/doc/html/rfc6749#section-10.12 (predating
-// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
-// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
+// It can also be used to pass the PKCE challenge.
+// See https://www.oauth.com/oauth2-servers/pkce/ for more info.
func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
var buf bytes.Buffer
buf.WriteString(c.Endpoint.AuthURL)
@@ -171,6 +161,7 @@ func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
v.Set("scope", strings.Join(c.Scopes, " "))
}
if state != "" {
+ // TODO(light): Docs say never to omit state; don't allow empty.
v.Set("state", state)
}
for _, opt := range opts {
@@ -215,11 +206,10 @@ func (c *Config) PasswordCredentialsToken(ctx context.Context, username, passwor
// The provided context optionally controls which HTTP client is used. See the HTTPClient variable.
//
// The code will be in the *http.Request.FormValue("code"). Before
-// calling Exchange, be sure to validate FormValue("state") if you are
-// using it to protect against CSRF attacks.
+// calling Exchange, be sure to validate FormValue("state").
//
-// If using PKCE to protect against CSRF attacks, opts should include a
-// VerifierOption.
+// Opts may include the PKCE verifier code if previously used in AuthCodeURL.
+// See https://www.oauth.com/oauth2-servers/pkce/ for more info.
func (c *Config) Exchange(ctx context.Context, code string, opts ...AuthCodeOption) (*Token, error) {
v := url.Values{
"grant_type": {"authorization_code"},
@@ -300,8 +290,6 @@ type reuseTokenSource struct {
mu sync.Mutex // guards t
t *Token
-
- expiryDelta time.Duration
}
// Token returns the current token if it's still valid, else will
@@ -317,7 +305,6 @@ func (s *reuseTokenSource) Token() (*Token, error) {
if err != nil {
return nil, err
}
- t.expiryDelta = s.expiryDelta
s.t = t
return t, nil
}
@@ -392,30 +379,3 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource {
new: src,
}
}
-
-// ReuseTokenSourceWithExpiry returns a TokenSource that acts in the same manner as the
-// TokenSource returned by ReuseTokenSource, except the expiry buffer is
-// configurable. The expiration time of a token is calculated as
-// t.Expiry.Add(-earlyExpiry).
-func ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource {
- // Don't wrap a reuseTokenSource in itself. That would work,
- // but cause an unnecessary number of mutex operations.
- // Just build the equivalent one.
- if rt, ok := src.(*reuseTokenSource); ok {
- if t == nil {
- // Just use it directly, but set the expiryDelta to earlyExpiry,
- // so the behavior matches what the user expects.
- rt.expiryDelta = earlyExpiry
- return rt
- }
- src = rt.new
- }
- if t != nil {
- t.expiryDelta = earlyExpiry
- }
- return &reuseTokenSource{
- t: t,
- new: src,
- expiryDelta: earlyExpiry,
- }
-}
diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go
deleted file mode 100644
index 50593b6d..00000000
--- a/vendor/golang.org/x/oauth2/pkce.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2023 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-package oauth2
-
-import (
- "crypto/rand"
- "crypto/sha256"
- "encoding/base64"
- "net/url"
-)
-
-const (
- codeChallengeKey = "code_challenge"
- codeChallengeMethodKey = "code_challenge_method"
- codeVerifierKey = "code_verifier"
-)
-
-// GenerateVerifier generates a PKCE code verifier with 32 octets of randomness.
-// This follows recommendations in RFC 7636.
-//
-// A fresh verifier should be generated for each authorization.
-// S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL
-// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange
-// (or Config.DeviceAccessToken).
-func GenerateVerifier() string {
- // "RECOMMENDED that the output of a suitable random number generator be
- // used to create a 32-octet sequence. The octet sequence is then
- // base64url-encoded to produce a 43-octet URL-safe string to use as the
- // code verifier."
- // https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
- data := make([]byte, 32)
- if _, err := rand.Read(data); err != nil {
- panic(err)
- }
- return base64.RawURLEncoding.EncodeToString(data)
-}
-
-// VerifierOption returns a PKCE code verifier AuthCodeOption. It should be
-// passed to Config.Exchange or Config.DeviceAccessToken only.
-func VerifierOption(verifier string) AuthCodeOption {
- return setParam{k: codeVerifierKey, v: verifier}
-}
-
-// S256ChallengeFromVerifier returns a PKCE code challenge derived from verifier with method S256.
-//
-// Prefer to use S256ChallengeOption where possible.
-func S256ChallengeFromVerifier(verifier string) string {
- sha := sha256.Sum256([]byte(verifier))
- return base64.RawURLEncoding.EncodeToString(sha[:])
-}
-
-// S256ChallengeOption derives a PKCE code challenge derived from verifier with
-// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess
-// only.
-func S256ChallengeOption(verifier string) AuthCodeOption {
- return challengeOption{
- challenge_method: "S256",
- challenge: S256ChallengeFromVerifier(verifier),
- }
-}
-
-type challengeOption struct{ challenge_method, challenge string }
-
-func (p challengeOption) setValue(m url.Values) {
- m.Set(codeChallengeMethodKey, p.challenge_method)
- m.Set(codeChallengeKey, p.challenge)
-}
diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go
index 109997d7..82272034 100644
--- a/vendor/golang.org/x/oauth2/token.go
+++ b/vendor/golang.org/x/oauth2/token.go
@@ -16,10 +16,10 @@ import (
"golang.org/x/oauth2/internal"
)
-// defaultExpiryDelta determines how earlier a token should be considered
+// expiryDelta determines how earlier a token should be considered
// expired than its actual expiration time. It is used to avoid late
// expirations due to client-server time mismatches.
-const defaultExpiryDelta = 10 * time.Second
+const expiryDelta = 10 * time.Second
// Token represents the credentials used to authorize
// the requests to access protected resources on the OAuth 2.0
@@ -49,21 +49,9 @@ type Token struct {
// mechanisms for that TokenSource will not be used.
Expiry time.Time `json:"expiry,omitempty"`
- // ExpiresIn is the OAuth2 wire format "expires_in" field,
- // which specifies how many seconds later the token expires,
- // relative to an unknown time base approximately around "now".
- // It is the application's responsibility to populate
- // `Expiry` from `ExpiresIn` when required.
- ExpiresIn int64 `json:"expires_in,omitempty"`
-
// raw optionally contains extra metadata from the server
// when updating a token.
raw interface{}
-
- // expiryDelta is used to calculate when a token is considered
- // expired, by subtracting from Expiry. If zero, defaultExpiryDelta
- // is used.
- expiryDelta time.Duration
}
// Type returns t.TokenType if non-empty, else "Bearer".
@@ -139,11 +127,6 @@ func (t *Token) expired() bool {
if t.Expiry.IsZero() {
return false
}
-
- expiryDelta := defaultExpiryDelta
- if t.expiryDelta != 0 {
- expiryDelta = t.expiryDelta
- }
return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow())
}
@@ -171,7 +154,7 @@ func tokenFromInternal(t *internal.Token) *Token {
// This token is then mapped from *internal.Token into an *oauth2.Token which is returned along
// with an error..
func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) {
- tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle), c.authStyleCache.Get())
+ tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle))
if err != nil {
if rErr, ok := err.(*internal.RetrieveError); ok {
return nil, (*RetrieveError)(rErr)
@@ -182,31 +165,14 @@ func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error)
}
// RetrieveError is the error returned when the token endpoint returns a
-// non-2XX HTTP status code or populates RFC 6749's 'error' parameter.
-// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
+// non-2XX HTTP status code.
type RetrieveError struct {
Response *http.Response
// Body is the body that was consumed by reading Response.Body.
// It may be truncated.
Body []byte
- // ErrorCode is RFC 6749's 'error' parameter.
- ErrorCode string
- // ErrorDescription is RFC 6749's 'error_description' parameter.
- ErrorDescription string
- // ErrorURI is RFC 6749's 'error_uri' parameter.
- ErrorURI string
}
func (r *RetrieveError) Error() string {
- if r.ErrorCode != "" {
- s := fmt.Sprintf("oauth2: %q", r.ErrorCode)
- if r.ErrorDescription != "" {
- s += fmt.Sprintf(" %q", r.ErrorDescription)
- }
- if r.ErrorURI != "" {
- s += fmt.Sprintf(" %q", r.ErrorURI)
- }
- return s
- }
return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body)
}
diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go
index 90657915..aa0d34f1 100644
--- a/vendor/golang.org/x/oauth2/transport.go
+++ b/vendor/golang.org/x/oauth2/transport.go
@@ -6,7 +6,7 @@ package oauth2
import (
"errors"
- "log"
+ "io"
"net/http"
"sync"
)
@@ -25,6 +25,9 @@ type Transport struct {
// Base is the base RoundTripper used to make HTTP requests.
// If nil, http.DefaultTransport is used.
Base http.RoundTripper
+
+ mu sync.Mutex // guards modReq
+ modReq map[*http.Request]*http.Request // original -> modified
}
// RoundTrip authorizes and authenticates the request with an
@@ -49,22 +52,35 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
req2 := cloneRequest(req) // per RoundTripper contract
token.SetAuthHeader(req2)
+ t.setModReq(req, req2)
+ res, err := t.base().RoundTrip(req2)
- // req.Body is assumed to be closed by the base RoundTripper.
+ // req.Body is assumed to have been closed by the base RoundTripper.
reqBodyClosed = true
- return t.base().RoundTrip(req2)
-}
-var cancelOnce sync.Once
+ if err != nil {
+ t.setModReq(req, nil)
+ return nil, err
+ }
+ res.Body = &onEOFReader{
+ rc: res.Body,
+ fn: func() { t.setModReq(req, nil) },
+ }
+ return res, nil
+}
-// CancelRequest does nothing. It used to be a legacy cancellation mechanism
-// but now only it only logs on first use to warn that it's deprecated.
-//
-// Deprecated: use contexts for cancellation instead.
+// CancelRequest cancels an in-flight request by closing its connection.
func (t *Transport) CancelRequest(req *http.Request) {
- cancelOnce.Do(func() {
- log.Printf("deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts")
- })
+ type canceler interface {
+ CancelRequest(*http.Request)
+ }
+ if cr, ok := t.base().(canceler); ok {
+ t.mu.Lock()
+ modReq := t.modReq[req]
+ delete(t.modReq, req)
+ t.mu.Unlock()
+ cr.CancelRequest(modReq)
+ }
}
func (t *Transport) base() http.RoundTripper {
@@ -74,6 +90,19 @@ func (t *Transport) base() http.RoundTripper {
return http.DefaultTransport
}
+func (t *Transport) setModReq(orig, mod *http.Request) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+ if t.modReq == nil {
+ t.modReq = make(map[*http.Request]*http.Request)
+ }
+ if mod == nil {
+ delete(t.modReq, orig)
+ } else {
+ t.modReq[orig] = mod
+ }
+}
+
// cloneRequest returns a clone of the provided *http.Request.
// The clone is a shallow copy of the struct and its Header map.
func cloneRequest(r *http.Request) *http.Request {
@@ -87,3 +116,29 @@ func cloneRequest(r *http.Request) *http.Request {
}
return r2
}
+
+type onEOFReader struct {
+ rc io.ReadCloser
+ fn func()
+}
+
+func (r *onEOFReader) Read(p []byte) (n int, err error) {
+ n, err = r.rc.Read(p)
+ if err == io.EOF {
+ r.runFunc()
+ }
+ return
+}
+
+func (r *onEOFReader) Close() error {
+ err := r.rc.Close()
+ r.runFunc()
+ return err
+}
+
+func (r *onEOFReader) runFunc() {
+ if fn := r.fn; fn != nil {
+ fn()
+ r.fn = nil
+ }
+}
diff --git a/vendor/google.golang.org/appengine/LICENSE b/vendor/google.golang.org/appengine/LICENSE
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/google.golang.org/appengine/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/google.golang.org/appengine/internal/api.go b/vendor/google.golang.org/appengine/internal/api.go
new file mode 100644
index 00000000..bbc1cb9c
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/api.go
@@ -0,0 +1,671 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+
+package internal
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "net"
+ "net/http"
+ "net/url"
+ "os"
+ "runtime"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/golang/protobuf/proto"
+ netcontext "golang.org/x/net/context"
+
+ basepb "google.golang.org/appengine/internal/base"
+ logpb "google.golang.org/appengine/internal/log"
+ remotepb "google.golang.org/appengine/internal/remote_api"
+)
+
+const (
+ apiPath = "/rpc_http"
+ defaultTicketSuffix = "/default.20150612t184001.0"
+)
+
+var (
+ // Incoming headers.
+ ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket")
+ dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo")
+ traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context")
+ curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace")
+ userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP")
+ remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr")
+
+ // Outgoing headers.
+ apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint")
+ apiEndpointHeaderValue = []string{"app-engine-apis"}
+ apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method")
+ apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"}
+ apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline")
+ apiContentType = http.CanonicalHeaderKey("Content-Type")
+ apiContentTypeValue = []string{"application/octet-stream"}
+ logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count")
+
+ apiHTTPClient = &http.Client{
+ Transport: &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ Dial: limitDial,
+ },
+ }
+
+ defaultTicketOnce sync.Once
+ defaultTicket string
+ backgroundContextOnce sync.Once
+ backgroundContext netcontext.Context
+)
+
+func apiURL() *url.URL {
+ host, port := "appengine.googleapis.internal", "10001"
+ if h := os.Getenv("API_HOST"); h != "" {
+ host = h
+ }
+ if p := os.Getenv("API_PORT"); p != "" {
+ port = p
+ }
+ return &url.URL{
+ Scheme: "http",
+ Host: host + ":" + port,
+ Path: apiPath,
+ }
+}
+
+func handleHTTP(w http.ResponseWriter, r *http.Request) {
+ c := &context{
+ req: r,
+ outHeader: w.Header(),
+ apiURL: apiURL(),
+ }
+ r = r.WithContext(withContext(r.Context(), c))
+ c.req = r
+
+ stopFlushing := make(chan int)
+
+ // Patch up RemoteAddr so it looks reasonable.
+ if addr := r.Header.Get(userIPHeader); addr != "" {
+ r.RemoteAddr = addr
+ } else if addr = r.Header.Get(remoteAddrHeader); addr != "" {
+ r.RemoteAddr = addr
+ } else {
+ // Should not normally reach here, but pick a sensible default anyway.
+ r.RemoteAddr = "127.0.0.1"
+ }
+ // The address in the headers will most likely be of these forms:
+ // 123.123.123.123
+ // 2001:db8::1
+ // net/http.Request.RemoteAddr is specified to be in "IP:port" form.
+ if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil {
+ // Assume the remote address is only a host; add a default port.
+ r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80")
+ }
+
+ // Start goroutine responsible for flushing app logs.
+ // This is done after adding c to ctx.m (and stopped before removing it)
+ // because flushing logs requires making an API call.
+ go c.logFlusher(stopFlushing)
+
+ executeRequestSafely(c, r)
+ c.outHeader = nil // make sure header changes aren't respected any more
+
+ stopFlushing <- 1 // any logging beyond this point will be dropped
+
+ // Flush any pending logs asynchronously.
+ c.pendingLogs.Lock()
+ flushes := c.pendingLogs.flushes
+ if len(c.pendingLogs.lines) > 0 {
+ flushes++
+ }
+ c.pendingLogs.Unlock()
+ flushed := make(chan struct{})
+ go func() {
+ defer close(flushed)
+ // Force a log flush, because with very short requests we
+ // may not ever flush logs.
+ c.flushLog(true)
+ }()
+ w.Header().Set(logFlushHeader, strconv.Itoa(flushes))
+
+ // Avoid nil Write call if c.Write is never called.
+ if c.outCode != 0 {
+ w.WriteHeader(c.outCode)
+ }
+ if c.outBody != nil {
+ w.Write(c.outBody)
+ }
+ // Wait for the last flush to complete before returning,
+ // otherwise the security ticket will not be valid.
+ <-flushed
+}
+
+func executeRequestSafely(c *context, r *http.Request) {
+ defer func() {
+ if x := recover(); x != nil {
+ logf(c, 4, "%s", renderPanic(x)) // 4 == critical
+ c.outCode = 500
+ }
+ }()
+
+ http.DefaultServeMux.ServeHTTP(c, r)
+}
+
+func renderPanic(x interface{}) string {
+ buf := make([]byte, 16<<10) // 16 KB should be plenty
+ buf = buf[:runtime.Stack(buf, false)]
+
+ // Remove the first few stack frames:
+ // this func
+ // the recover closure in the caller
+ // That will root the stack trace at the site of the panic.
+ const (
+ skipStart = "internal.renderPanic"
+ skipFrames = 2
+ )
+ start := bytes.Index(buf, []byte(skipStart))
+ p := start
+ for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ {
+ p = bytes.IndexByte(buf[p+1:], '\n') + p + 1
+ if p < 0 {
+ break
+ }
+ }
+ if p >= 0 {
+ // buf[start:p+1] is the block to remove.
+ // Copy buf[p+1:] over buf[start:] and shrink buf.
+ copy(buf[start:], buf[p+1:])
+ buf = buf[:len(buf)-(p+1-start)]
+ }
+
+ // Add panic heading.
+ head := fmt.Sprintf("panic: %v\n\n", x)
+ if len(head) > len(buf) {
+ // Extremely unlikely to happen.
+ return head
+ }
+ copy(buf[len(head):], buf)
+ copy(buf, head)
+
+ return string(buf)
+}
+
+// context represents the context of an in-flight HTTP request.
+// It implements the appengine.Context and http.ResponseWriter interfaces.
+type context struct {
+ req *http.Request
+
+ outCode int
+ outHeader http.Header
+ outBody []byte
+
+ pendingLogs struct {
+ sync.Mutex
+ lines []*logpb.UserAppLogLine
+ flushes int
+ }
+
+ apiURL *url.URL
+}
+
+var contextKey = "holds a *context"
+
+// jointContext joins two contexts in a superficial way.
+// It takes values and timeouts from a base context, and only values from another context.
+type jointContext struct {
+ base netcontext.Context
+ valuesOnly netcontext.Context
+}
+
+func (c jointContext) Deadline() (time.Time, bool) {
+ return c.base.Deadline()
+}
+
+func (c jointContext) Done() <-chan struct{} {
+ return c.base.Done()
+}
+
+func (c jointContext) Err() error {
+ return c.base.Err()
+}
+
+func (c jointContext) Value(key interface{}) interface{} {
+ if val := c.base.Value(key); val != nil {
+ return val
+ }
+ return c.valuesOnly.Value(key)
+}
+
+// fromContext returns the App Engine context or nil if ctx is not
+// derived from an App Engine context.
+func fromContext(ctx netcontext.Context) *context {
+ c, _ := ctx.Value(&contextKey).(*context)
+ return c
+}
+
+func withContext(parent netcontext.Context, c *context) netcontext.Context {
+ ctx := netcontext.WithValue(parent, &contextKey, c)
+ if ns := c.req.Header.Get(curNamespaceHeader); ns != "" {
+ ctx = withNamespace(ctx, ns)
+ }
+ return ctx
+}
+
+func toContext(c *context) netcontext.Context {
+ return withContext(netcontext.Background(), c)
+}
+
+func IncomingHeaders(ctx netcontext.Context) http.Header {
+ if c := fromContext(ctx); c != nil {
+ return c.req.Header
+ }
+ return nil
+}
+
+func ReqContext(req *http.Request) netcontext.Context {
+ return req.Context()
+}
+
+func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
+ return jointContext{
+ base: parent,
+ valuesOnly: req.Context(),
+ }
+}
+
+// DefaultTicket returns a ticket used for background context or dev_appserver.
+func DefaultTicket() string {
+ defaultTicketOnce.Do(func() {
+ if IsDevAppServer() {
+ defaultTicket = "testapp" + defaultTicketSuffix
+ return
+ }
+ appID := partitionlessAppID()
+ escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1)
+ majVersion := VersionID(nil)
+ if i := strings.Index(majVersion, "."); i > 0 {
+ majVersion = majVersion[:i]
+ }
+ defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID())
+ })
+ return defaultTicket
+}
+
+func BackgroundContext() netcontext.Context {
+ backgroundContextOnce.Do(func() {
+ // Compute background security ticket.
+ ticket := DefaultTicket()
+
+ c := &context{
+ req: &http.Request{
+ Header: http.Header{
+ ticketHeader: []string{ticket},
+ },
+ },
+ apiURL: apiURL(),
+ }
+ backgroundContext = toContext(c)
+
+ // TODO(dsymonds): Wire up the shutdown handler to do a final flush.
+ go c.logFlusher(make(chan int))
+ })
+
+ return backgroundContext
+}
+
+// RegisterTestRequest registers the HTTP request req for testing, such that
+// any API calls are sent to the provided URL. It returns a closure to delete
+// the registration.
+// It should only be used by aetest package.
+func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) {
+ c := &context{
+ req: req,
+ apiURL: apiURL,
+ }
+ ctx := withContext(decorate(req.Context()), c)
+ req = req.WithContext(ctx)
+ c.req = req
+ return req, func() {}
+}
+
+var errTimeout = &CallError{
+ Detail: "Deadline exceeded",
+ Code: int32(remotepb.RpcError_CANCELLED),
+ Timeout: true,
+}
+
+func (c *context) Header() http.Header { return c.outHeader }
+
+// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status
+// codes do not permit a response body (nor response entity headers such as
+// Content-Length, Content-Type, etc).
+func bodyAllowedForStatus(status int) bool {
+ switch {
+ case status >= 100 && status <= 199:
+ return false
+ case status == 204:
+ return false
+ case status == 304:
+ return false
+ }
+ return true
+}
+
+func (c *context) Write(b []byte) (int, error) {
+ if c.outCode == 0 {
+ c.WriteHeader(http.StatusOK)
+ }
+ if len(b) > 0 && !bodyAllowedForStatus(c.outCode) {
+ return 0, http.ErrBodyNotAllowed
+ }
+ c.outBody = append(c.outBody, b...)
+ return len(b), nil
+}
+
+func (c *context) WriteHeader(code int) {
+ if c.outCode != 0 {
+ logf(c, 3, "WriteHeader called multiple times on request.") // error level
+ return
+ }
+ c.outCode = code
+}
+
+func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) {
+ hreq := &http.Request{
+ Method: "POST",
+ URL: c.apiURL,
+ Header: http.Header{
+ apiEndpointHeader: apiEndpointHeaderValue,
+ apiMethodHeader: apiMethodHeaderValue,
+ apiContentType: apiContentTypeValue,
+ apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)},
+ },
+ Body: ioutil.NopCloser(bytes.NewReader(body)),
+ ContentLength: int64(len(body)),
+ Host: c.apiURL.Host,
+ }
+ if info := c.req.Header.Get(dapperHeader); info != "" {
+ hreq.Header.Set(dapperHeader, info)
+ }
+ if info := c.req.Header.Get(traceHeader); info != "" {
+ hreq.Header.Set(traceHeader, info)
+ }
+
+ tr := apiHTTPClient.Transport.(*http.Transport)
+
+ var timedOut int32 // atomic; set to 1 if timed out
+ t := time.AfterFunc(timeout, func() {
+ atomic.StoreInt32(&timedOut, 1)
+ tr.CancelRequest(hreq)
+ })
+ defer t.Stop()
+ defer func() {
+ // Check if timeout was exceeded.
+ if atomic.LoadInt32(&timedOut) != 0 {
+ err = errTimeout
+ }
+ }()
+
+ hresp, err := apiHTTPClient.Do(hreq)
+ if err != nil {
+ return nil, &CallError{
+ Detail: fmt.Sprintf("service bridge HTTP failed: %v", err),
+ Code: int32(remotepb.RpcError_UNKNOWN),
+ }
+ }
+ defer hresp.Body.Close()
+ hrespBody, err := ioutil.ReadAll(hresp.Body)
+ if hresp.StatusCode != 200 {
+ return nil, &CallError{
+ Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody),
+ Code: int32(remotepb.RpcError_UNKNOWN),
+ }
+ }
+ if err != nil {
+ return nil, &CallError{
+ Detail: fmt.Sprintf("service bridge response bad: %v", err),
+ Code: int32(remotepb.RpcError_UNKNOWN),
+ }
+ }
+ return hrespBody, nil
+}
+
+func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error {
+ if ns := NamespaceFromContext(ctx); ns != "" {
+ if fn, ok := NamespaceMods[service]; ok {
+ fn(in, ns)
+ }
+ }
+
+ if f, ctx, ok := callOverrideFromContext(ctx); ok {
+ return f(ctx, service, method, in, out)
+ }
+
+ // Handle already-done contexts quickly.
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ default:
+ }
+
+ c := fromContext(ctx)
+ if c == nil {
+ // Give a good error message rather than a panic lower down.
+ return errNotAppEngineContext
+ }
+
+ // Apply transaction modifications if we're in a transaction.
+ if t := transactionFromContext(ctx); t != nil {
+ if t.finished {
+ return errors.New("transaction context has expired")
+ }
+ applyTransaction(in, &t.transaction)
+ }
+
+ // Default RPC timeout is 60s.
+ timeout := 60 * time.Second
+ if deadline, ok := ctx.Deadline(); ok {
+ timeout = deadline.Sub(time.Now())
+ }
+
+ data, err := proto.Marshal(in)
+ if err != nil {
+ return err
+ }
+
+ ticket := c.req.Header.Get(ticketHeader)
+ // Use a test ticket under test environment.
+ if ticket == "" {
+ if appid := ctx.Value(&appIDOverrideKey); appid != nil {
+ ticket = appid.(string) + defaultTicketSuffix
+ }
+ }
+ // Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver.
+ if ticket == "" {
+ ticket = DefaultTicket()
+ }
+ req := &remotepb.Request{
+ ServiceName: &service,
+ Method: &method,
+ Request: data,
+ RequestId: &ticket,
+ }
+ hreqBody, err := proto.Marshal(req)
+ if err != nil {
+ return err
+ }
+
+ hrespBody, err := c.post(hreqBody, timeout)
+ if err != nil {
+ return err
+ }
+
+ res := &remotepb.Response{}
+ if err := proto.Unmarshal(hrespBody, res); err != nil {
+ return err
+ }
+ if res.RpcError != nil {
+ ce := &CallError{
+ Detail: res.RpcError.GetDetail(),
+ Code: *res.RpcError.Code,
+ }
+ switch remotepb.RpcError_ErrorCode(ce.Code) {
+ case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED:
+ ce.Timeout = true
+ }
+ return ce
+ }
+ if res.ApplicationError != nil {
+ return &APIError{
+ Service: *req.ServiceName,
+ Detail: res.ApplicationError.GetDetail(),
+ Code: *res.ApplicationError.Code,
+ }
+ }
+ if res.Exception != nil || res.JavaException != nil {
+ // This shouldn't happen, but let's be defensive.
+ return &CallError{
+ Detail: "service bridge returned exception",
+ Code: int32(remotepb.RpcError_UNKNOWN),
+ }
+ }
+ return proto.Unmarshal(res.Response, out)
+}
+
+func (c *context) Request() *http.Request {
+ return c.req
+}
+
+func (c *context) addLogLine(ll *logpb.UserAppLogLine) {
+ // Truncate long log lines.
+ // TODO(dsymonds): Check if this is still necessary.
+ const lim = 8 << 10
+ if len(*ll.Message) > lim {
+ suffix := fmt.Sprintf("...(length %d)", len(*ll.Message))
+ ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix)
+ }
+
+ c.pendingLogs.Lock()
+ c.pendingLogs.lines = append(c.pendingLogs.lines, ll)
+ c.pendingLogs.Unlock()
+}
+
+var logLevelName = map[int64]string{
+ 0: "DEBUG",
+ 1: "INFO",
+ 2: "WARNING",
+ 3: "ERROR",
+ 4: "CRITICAL",
+}
+
+func logf(c *context, level int64, format string, args ...interface{}) {
+ if c == nil {
+ panic("not an App Engine context")
+ }
+ s := fmt.Sprintf(format, args...)
+ s = strings.TrimRight(s, "\n") // Remove any trailing newline characters.
+ c.addLogLine(&logpb.UserAppLogLine{
+ TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3),
+ Level: &level,
+ Message: &s,
+ })
+ // Only duplicate log to stderr if not running on App Engine second generation
+ if !IsSecondGen() {
+ log.Print(logLevelName[level] + ": " + s)
+ }
+}
+
+// flushLog attempts to flush any pending logs to the appserver.
+// It should not be called concurrently.
+func (c *context) flushLog(force bool) (flushed bool) {
+ c.pendingLogs.Lock()
+ // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious.
+ n, rem := 0, 30<<20
+ for ; n < len(c.pendingLogs.lines); n++ {
+ ll := c.pendingLogs.lines[n]
+ // Each log line will require about 3 bytes of overhead.
+ nb := proto.Size(ll) + 3
+ if nb > rem {
+ break
+ }
+ rem -= nb
+ }
+ lines := c.pendingLogs.lines[:n]
+ c.pendingLogs.lines = c.pendingLogs.lines[n:]
+ c.pendingLogs.Unlock()
+
+ if len(lines) == 0 && !force {
+ // Nothing to flush.
+ return false
+ }
+
+ rescueLogs := false
+ defer func() {
+ if rescueLogs {
+ c.pendingLogs.Lock()
+ c.pendingLogs.lines = append(lines, c.pendingLogs.lines...)
+ c.pendingLogs.Unlock()
+ }
+ }()
+
+ buf, err := proto.Marshal(&logpb.UserAppLogGroup{
+ LogLine: lines,
+ })
+ if err != nil {
+ log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err)
+ rescueLogs = true
+ return false
+ }
+
+ req := &logpb.FlushRequest{
+ Logs: buf,
+ }
+ res := &basepb.VoidProto{}
+ c.pendingLogs.Lock()
+ c.pendingLogs.flushes++
+ c.pendingLogs.Unlock()
+ if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil {
+ log.Printf("internal.flushLog: Flush RPC: %v", err)
+ rescueLogs = true
+ return false
+ }
+ return true
+}
+
+const (
+ // Log flushing parameters.
+ flushInterval = 1 * time.Second
+ forceFlushInterval = 60 * time.Second
+)
+
+func (c *context) logFlusher(stop <-chan int) {
+ lastFlush := time.Now()
+ tick := time.NewTicker(flushInterval)
+ for {
+ select {
+ case <-stop:
+ // Request finished.
+ tick.Stop()
+ return
+ case <-tick.C:
+ force := time.Now().Sub(lastFlush) > forceFlushInterval
+ if c.flushLog(force) {
+ lastFlush = time.Now()
+ }
+ }
+ }
+}
+
+func ContextForTesting(req *http.Request) netcontext.Context {
+ return toContext(&context{req: req})
+}
diff --git a/vendor/google.golang.org/appengine/internal/api_classic.go b/vendor/google.golang.org/appengine/internal/api_classic.go
new file mode 100644
index 00000000..f0f40b2e
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/api_classic.go
@@ -0,0 +1,169 @@
+// Copyright 2015 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build appengine
+
+package internal
+
+import (
+ "errors"
+ "fmt"
+ "net/http"
+ "time"
+
+ "appengine"
+ "appengine_internal"
+ basepb "appengine_internal/base"
+
+ "github.com/golang/protobuf/proto"
+ netcontext "golang.org/x/net/context"
+)
+
+var contextKey = "holds an appengine.Context"
+
+// fromContext returns the App Engine context or nil if ctx is not
+// derived from an App Engine context.
+func fromContext(ctx netcontext.Context) appengine.Context {
+ c, _ := ctx.Value(&contextKey).(appengine.Context)
+ return c
+}
+
+// This is only for classic App Engine adapters.
+func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error) {
+ c := fromContext(ctx)
+ if c == nil {
+ return nil, errNotAppEngineContext
+ }
+ return c, nil
+}
+
+func withContext(parent netcontext.Context, c appengine.Context) netcontext.Context {
+ ctx := netcontext.WithValue(parent, &contextKey, c)
+
+ s := &basepb.StringProto{}
+ c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil)
+ if ns := s.GetValue(); ns != "" {
+ ctx = NamespacedContext(ctx, ns)
+ }
+
+ return ctx
+}
+
+func IncomingHeaders(ctx netcontext.Context) http.Header {
+ if c := fromContext(ctx); c != nil {
+ if req, ok := c.Request().(*http.Request); ok {
+ return req.Header
+ }
+ }
+ return nil
+}
+
+func ReqContext(req *http.Request) netcontext.Context {
+ return WithContext(netcontext.Background(), req)
+}
+
+func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
+ c := appengine.NewContext(req)
+ return withContext(parent, c)
+}
+
+type testingContext struct {
+ appengine.Context
+
+ req *http.Request
+}
+
+func (t *testingContext) FullyQualifiedAppID() string { return "dev~testcontext" }
+func (t *testingContext) Call(service, method string, _, _ appengine_internal.ProtoMessage, _ *appengine_internal.CallOptions) error {
+ if service == "__go__" && method == "GetNamespace" {
+ return nil
+ }
+ return fmt.Errorf("testingContext: unsupported Call")
+}
+func (t *testingContext) Request() interface{} { return t.req }
+
+func ContextForTesting(req *http.Request) netcontext.Context {
+ return withContext(netcontext.Background(), &testingContext{req: req})
+}
+
+func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error {
+ if ns := NamespaceFromContext(ctx); ns != "" {
+ if fn, ok := NamespaceMods[service]; ok {
+ fn(in, ns)
+ }
+ }
+
+ if f, ctx, ok := callOverrideFromContext(ctx); ok {
+ return f(ctx, service, method, in, out)
+ }
+
+ // Handle already-done contexts quickly.
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ default:
+ }
+
+ c := fromContext(ctx)
+ if c == nil {
+ // Give a good error message rather than a panic lower down.
+ return errNotAppEngineContext
+ }
+
+ // Apply transaction modifications if we're in a transaction.
+ if t := transactionFromContext(ctx); t != nil {
+ if t.finished {
+ return errors.New("transaction context has expired")
+ }
+ applyTransaction(in, &t.transaction)
+ }
+
+ var opts *appengine_internal.CallOptions
+ if d, ok := ctx.Deadline(); ok {
+ opts = &appengine_internal.CallOptions{
+ Timeout: d.Sub(time.Now()),
+ }
+ }
+
+ err := c.Call(service, method, in, out, opts)
+ switch v := err.(type) {
+ case *appengine_internal.APIError:
+ return &APIError{
+ Service: v.Service,
+ Detail: v.Detail,
+ Code: v.Code,
+ }
+ case *appengine_internal.CallError:
+ return &CallError{
+ Detail: v.Detail,
+ Code: v.Code,
+ Timeout: v.Timeout,
+ }
+ }
+ return err
+}
+
+func handleHTTP(w http.ResponseWriter, r *http.Request) {
+ panic("handleHTTP called; this should be impossible")
+}
+
+func logf(c appengine.Context, level int64, format string, args ...interface{}) {
+ var fn func(format string, args ...interface{})
+ switch level {
+ case 0:
+ fn = c.Debugf
+ case 1:
+ fn = c.Infof
+ case 2:
+ fn = c.Warningf
+ case 3:
+ fn = c.Errorf
+ case 4:
+ fn = c.Criticalf
+ default:
+ // This shouldn't happen.
+ fn = c.Criticalf
+ }
+ fn(format, args...)
+}
diff --git a/vendor/google.golang.org/appengine/internal/api_common.go b/vendor/google.golang.org/appengine/internal/api_common.go
new file mode 100644
index 00000000..e0c0b214
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/api_common.go
@@ -0,0 +1,123 @@
+// Copyright 2015 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package internal
+
+import (
+ "errors"
+ "os"
+
+ "github.com/golang/protobuf/proto"
+ netcontext "golang.org/x/net/context"
+)
+
+var errNotAppEngineContext = errors.New("not an App Engine context")
+
+type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error
+
+var callOverrideKey = "holds []CallOverrideFunc"
+
+func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Context {
+ // We avoid appending to any existing call override
+ // so we don't risk overwriting a popped stack below.
+ var cofs []CallOverrideFunc
+ if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok {
+ cofs = append(cofs, uf...)
+ }
+ cofs = append(cofs, f)
+ return netcontext.WithValue(ctx, &callOverrideKey, cofs)
+}
+
+func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netcontext.Context, bool) {
+ cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc)
+ if len(cofs) == 0 {
+ return nil, nil, false
+ }
+ // We found a list of overrides; grab the last, and reconstitute a
+ // context that will hide it.
+ f := cofs[len(cofs)-1]
+ ctx = netcontext.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1])
+ return f, ctx, true
+}
+
+type logOverrideFunc func(level int64, format string, args ...interface{})
+
+var logOverrideKey = "holds a logOverrideFunc"
+
+func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context {
+ return netcontext.WithValue(ctx, &logOverrideKey, f)
+}
+
+var appIDOverrideKey = "holds a string, being the full app ID"
+
+func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context {
+ return netcontext.WithValue(ctx, &appIDOverrideKey, appID)
+}
+
+var namespaceKey = "holds the namespace string"
+
+func withNamespace(ctx netcontext.Context, ns string) netcontext.Context {
+ return netcontext.WithValue(ctx, &namespaceKey, ns)
+}
+
+func NamespaceFromContext(ctx netcontext.Context) string {
+ // If there's no namespace, return the empty string.
+ ns, _ := ctx.Value(&namespaceKey).(string)
+ return ns
+}
+
+// FullyQualifiedAppID returns the fully-qualified application ID.
+// This may contain a partition prefix (e.g. "s~" for High Replication apps),
+// or a domain prefix (e.g. "example.com:").
+func FullyQualifiedAppID(ctx netcontext.Context) string {
+ if id, ok := ctx.Value(&appIDOverrideKey).(string); ok {
+ return id
+ }
+ return fullyQualifiedAppID(ctx)
+}
+
+func Logf(ctx netcontext.Context, level int64, format string, args ...interface{}) {
+ if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok {
+ f(level, format, args...)
+ return
+ }
+ c := fromContext(ctx)
+ if c == nil {
+ panic(errNotAppEngineContext)
+ }
+ logf(c, level, format, args...)
+}
+
+// NamespacedContext wraps a Context to support namespaces.
+func NamespacedContext(ctx netcontext.Context, namespace string) netcontext.Context {
+ return withNamespace(ctx, namespace)
+}
+
+// SetTestEnv sets the env variables for testing background ticket in Flex.
+func SetTestEnv() func() {
+ var environ = []struct {
+ key, value string
+ }{
+ {"GAE_LONG_APP_ID", "my-app-id"},
+ {"GAE_MINOR_VERSION", "067924799508853122"},
+ {"GAE_MODULE_INSTANCE", "0"},
+ {"GAE_MODULE_NAME", "default"},
+ {"GAE_MODULE_VERSION", "20150612t184001"},
+ }
+
+ for _, v := range environ {
+ old := os.Getenv(v.key)
+ os.Setenv(v.key, v.value)
+ v.value = old
+ }
+ return func() { // Restore old environment after the test completes.
+ for _, v := range environ {
+ if v.value == "" {
+ os.Unsetenv(v.key)
+ continue
+ }
+ os.Setenv(v.key, v.value)
+ }
+ }
+}
diff --git a/vendor/google.golang.org/appengine/internal/app_id.go b/vendor/google.golang.org/appengine/internal/app_id.go
new file mode 100644
index 00000000..11df8c07
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/app_id.go
@@ -0,0 +1,28 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package internal
+
+import (
+ "strings"
+)
+
+func parseFullAppID(appid string) (partition, domain, displayID string) {
+ if i := strings.Index(appid, "~"); i != -1 {
+ partition, appid = appid[:i], appid[i+1:]
+ }
+ if i := strings.Index(appid, ":"); i != -1 {
+ domain, appid = appid[:i], appid[i+1:]
+ }
+ return partition, domain, appid
+}
+
+// appID returns "appid" or "domain.com:appid".
+func appID(fullAppID string) string {
+ _, dom, dis := parseFullAppID(fullAppID)
+ if dom != "" {
+ return dom + ":" + dis
+ }
+ return dis
+}
diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go b/vendor/google.golang.org/appengine/internal/base/api_base.pb.go
new file mode 100644
index 00000000..db4777e6
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/base/api_base.pb.go
@@ -0,0 +1,308 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: google.golang.org/appengine/internal/base/api_base.proto
+
+package base
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type StringProto struct {
+ Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *StringProto) Reset() { *m = StringProto{} }
+func (m *StringProto) String() string { return proto.CompactTextString(m) }
+func (*StringProto) ProtoMessage() {}
+func (*StringProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{0}
+}
+func (m *StringProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_StringProto.Unmarshal(m, b)
+}
+func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_StringProto.Marshal(b, m, deterministic)
+}
+func (dst *StringProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StringProto.Merge(dst, src)
+}
+func (m *StringProto) XXX_Size() int {
+ return xxx_messageInfo_StringProto.Size(m)
+}
+func (m *StringProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_StringProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StringProto proto.InternalMessageInfo
+
+func (m *StringProto) GetValue() string {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return ""
+}
+
+type Integer32Proto struct {
+ Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Integer32Proto) Reset() { *m = Integer32Proto{} }
+func (m *Integer32Proto) String() string { return proto.CompactTextString(m) }
+func (*Integer32Proto) ProtoMessage() {}
+func (*Integer32Proto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{1}
+}
+func (m *Integer32Proto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Integer32Proto.Unmarshal(m, b)
+}
+func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic)
+}
+func (dst *Integer32Proto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Integer32Proto.Merge(dst, src)
+}
+func (m *Integer32Proto) XXX_Size() int {
+ return xxx_messageInfo_Integer32Proto.Size(m)
+}
+func (m *Integer32Proto) XXX_DiscardUnknown() {
+ xxx_messageInfo_Integer32Proto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo
+
+func (m *Integer32Proto) GetValue() int32 {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return 0
+}
+
+type Integer64Proto struct {
+ Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Integer64Proto) Reset() { *m = Integer64Proto{} }
+func (m *Integer64Proto) String() string { return proto.CompactTextString(m) }
+func (*Integer64Proto) ProtoMessage() {}
+func (*Integer64Proto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{2}
+}
+func (m *Integer64Proto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Integer64Proto.Unmarshal(m, b)
+}
+func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic)
+}
+func (dst *Integer64Proto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Integer64Proto.Merge(dst, src)
+}
+func (m *Integer64Proto) XXX_Size() int {
+ return xxx_messageInfo_Integer64Proto.Size(m)
+}
+func (m *Integer64Proto) XXX_DiscardUnknown() {
+ xxx_messageInfo_Integer64Proto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo
+
+func (m *Integer64Proto) GetValue() int64 {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return 0
+}
+
+type BoolProto struct {
+ Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *BoolProto) Reset() { *m = BoolProto{} }
+func (m *BoolProto) String() string { return proto.CompactTextString(m) }
+func (*BoolProto) ProtoMessage() {}
+func (*BoolProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{3}
+}
+func (m *BoolProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_BoolProto.Unmarshal(m, b)
+}
+func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic)
+}
+func (dst *BoolProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_BoolProto.Merge(dst, src)
+}
+func (m *BoolProto) XXX_Size() int {
+ return xxx_messageInfo_BoolProto.Size(m)
+}
+func (m *BoolProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_BoolProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BoolProto proto.InternalMessageInfo
+
+func (m *BoolProto) GetValue() bool {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return false
+}
+
+type DoubleProto struct {
+ Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DoubleProto) Reset() { *m = DoubleProto{} }
+func (m *DoubleProto) String() string { return proto.CompactTextString(m) }
+func (*DoubleProto) ProtoMessage() {}
+func (*DoubleProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{4}
+}
+func (m *DoubleProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DoubleProto.Unmarshal(m, b)
+}
+func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic)
+}
+func (dst *DoubleProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DoubleProto.Merge(dst, src)
+}
+func (m *DoubleProto) XXX_Size() int {
+ return xxx_messageInfo_DoubleProto.Size(m)
+}
+func (m *DoubleProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_DoubleProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DoubleProto proto.InternalMessageInfo
+
+func (m *DoubleProto) GetValue() float64 {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return 0
+}
+
+type BytesProto struct {
+ Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *BytesProto) Reset() { *m = BytesProto{} }
+func (m *BytesProto) String() string { return proto.CompactTextString(m) }
+func (*BytesProto) ProtoMessage() {}
+func (*BytesProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{5}
+}
+func (m *BytesProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_BytesProto.Unmarshal(m, b)
+}
+func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic)
+}
+func (dst *BytesProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_BytesProto.Merge(dst, src)
+}
+func (m *BytesProto) XXX_Size() int {
+ return xxx_messageInfo_BytesProto.Size(m)
+}
+func (m *BytesProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_BytesProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BytesProto proto.InternalMessageInfo
+
+func (m *BytesProto) GetValue() []byte {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+type VoidProto struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *VoidProto) Reset() { *m = VoidProto{} }
+func (m *VoidProto) String() string { return proto.CompactTextString(m) }
+func (*VoidProto) ProtoMessage() {}
+func (*VoidProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_api_base_9d49f8792e0c1140, []int{6}
+}
+func (m *VoidProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_VoidProto.Unmarshal(m, b)
+}
+func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic)
+}
+func (dst *VoidProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_VoidProto.Merge(dst, src)
+}
+func (m *VoidProto) XXX_Size() int {
+ return xxx_messageInfo_VoidProto.Size(m)
+}
+func (m *VoidProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_VoidProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_VoidProto proto.InternalMessageInfo
+
+func init() {
+ proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto")
+ proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto")
+ proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto")
+ proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto")
+ proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto")
+ proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto")
+ proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto")
+}
+
+func init() {
+ proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140)
+}
+
+var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{
+ // 199 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30,
+ 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40,
+ 0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6,
+ 0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62,
+ 0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71,
+ 0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe,
+ 0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1,
+ 0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71,
+ 0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d,
+ 0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff,
+ 0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d,
+ 0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba,
+ 0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00,
+}
diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.proto b/vendor/google.golang.org/appengine/internal/base/api_base.proto
new file mode 100644
index 00000000..56cd7a3c
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/base/api_base.proto
@@ -0,0 +1,33 @@
+// Built-in base types for API calls. Primarily useful as return types.
+
+syntax = "proto2";
+option go_package = "base";
+
+package appengine.base;
+
+message StringProto {
+ required string value = 1;
+}
+
+message Integer32Proto {
+ required int32 value = 1;
+}
+
+message Integer64Proto {
+ required int64 value = 1;
+}
+
+message BoolProto {
+ required bool value = 1;
+}
+
+message DoubleProto {
+ required double value = 1;
+}
+
+message BytesProto {
+ required bytes value = 1 [ctype=CORD];
+}
+
+message VoidProto {
+}
diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
new file mode 100644
index 00000000..2fb74828
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
@@ -0,0 +1,4367 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: google.golang.org/appengine/internal/datastore/datastore_v3.proto
+
+package datastore
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type Property_Meaning int32
+
+const (
+ Property_NO_MEANING Property_Meaning = 0
+ Property_BLOB Property_Meaning = 14
+ Property_TEXT Property_Meaning = 15
+ Property_BYTESTRING Property_Meaning = 16
+ Property_ATOM_CATEGORY Property_Meaning = 1
+ Property_ATOM_LINK Property_Meaning = 2
+ Property_ATOM_TITLE Property_Meaning = 3
+ Property_ATOM_CONTENT Property_Meaning = 4
+ Property_ATOM_SUMMARY Property_Meaning = 5
+ Property_ATOM_AUTHOR Property_Meaning = 6
+ Property_GD_WHEN Property_Meaning = 7
+ Property_GD_EMAIL Property_Meaning = 8
+ Property_GEORSS_POINT Property_Meaning = 9
+ Property_GD_IM Property_Meaning = 10
+ Property_GD_PHONENUMBER Property_Meaning = 11
+ Property_GD_POSTALADDRESS Property_Meaning = 12
+ Property_GD_RATING Property_Meaning = 13
+ Property_BLOBKEY Property_Meaning = 17
+ Property_ENTITY_PROTO Property_Meaning = 19
+ Property_INDEX_VALUE Property_Meaning = 18
+)
+
+var Property_Meaning_name = map[int32]string{
+ 0: "NO_MEANING",
+ 14: "BLOB",
+ 15: "TEXT",
+ 16: "BYTESTRING",
+ 1: "ATOM_CATEGORY",
+ 2: "ATOM_LINK",
+ 3: "ATOM_TITLE",
+ 4: "ATOM_CONTENT",
+ 5: "ATOM_SUMMARY",
+ 6: "ATOM_AUTHOR",
+ 7: "GD_WHEN",
+ 8: "GD_EMAIL",
+ 9: "GEORSS_POINT",
+ 10: "GD_IM",
+ 11: "GD_PHONENUMBER",
+ 12: "GD_POSTALADDRESS",
+ 13: "GD_RATING",
+ 17: "BLOBKEY",
+ 19: "ENTITY_PROTO",
+ 18: "INDEX_VALUE",
+}
+var Property_Meaning_value = map[string]int32{
+ "NO_MEANING": 0,
+ "BLOB": 14,
+ "TEXT": 15,
+ "BYTESTRING": 16,
+ "ATOM_CATEGORY": 1,
+ "ATOM_LINK": 2,
+ "ATOM_TITLE": 3,
+ "ATOM_CONTENT": 4,
+ "ATOM_SUMMARY": 5,
+ "ATOM_AUTHOR": 6,
+ "GD_WHEN": 7,
+ "GD_EMAIL": 8,
+ "GEORSS_POINT": 9,
+ "GD_IM": 10,
+ "GD_PHONENUMBER": 11,
+ "GD_POSTALADDRESS": 12,
+ "GD_RATING": 13,
+ "BLOBKEY": 17,
+ "ENTITY_PROTO": 19,
+ "INDEX_VALUE": 18,
+}
+
+func (x Property_Meaning) Enum() *Property_Meaning {
+ p := new(Property_Meaning)
+ *p = x
+ return p
+}
+func (x Property_Meaning) String() string {
+ return proto.EnumName(Property_Meaning_name, int32(x))
+}
+func (x *Property_Meaning) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Property_Meaning_value, data, "Property_Meaning")
+ if err != nil {
+ return err
+ }
+ *x = Property_Meaning(value)
+ return nil
+}
+func (Property_Meaning) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0}
+}
+
+type Property_FtsTokenizationOption int32
+
+const (
+ Property_HTML Property_FtsTokenizationOption = 1
+ Property_ATOM Property_FtsTokenizationOption = 2
+)
+
+var Property_FtsTokenizationOption_name = map[int32]string{
+ 1: "HTML",
+ 2: "ATOM",
+}
+var Property_FtsTokenizationOption_value = map[string]int32{
+ "HTML": 1,
+ "ATOM": 2,
+}
+
+func (x Property_FtsTokenizationOption) Enum() *Property_FtsTokenizationOption {
+ p := new(Property_FtsTokenizationOption)
+ *p = x
+ return p
+}
+func (x Property_FtsTokenizationOption) String() string {
+ return proto.EnumName(Property_FtsTokenizationOption_name, int32(x))
+}
+func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Property_FtsTokenizationOption_value, data, "Property_FtsTokenizationOption")
+ if err != nil {
+ return err
+ }
+ *x = Property_FtsTokenizationOption(value)
+ return nil
+}
+func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1}
+}
+
+type EntityProto_Kind int32
+
+const (
+ EntityProto_GD_CONTACT EntityProto_Kind = 1
+ EntityProto_GD_EVENT EntityProto_Kind = 2
+ EntityProto_GD_MESSAGE EntityProto_Kind = 3
+)
+
+var EntityProto_Kind_name = map[int32]string{
+ 1: "GD_CONTACT",
+ 2: "GD_EVENT",
+ 3: "GD_MESSAGE",
+}
+var EntityProto_Kind_value = map[string]int32{
+ "GD_CONTACT": 1,
+ "GD_EVENT": 2,
+ "GD_MESSAGE": 3,
+}
+
+func (x EntityProto_Kind) Enum() *EntityProto_Kind {
+ p := new(EntityProto_Kind)
+ *p = x
+ return p
+}
+func (x EntityProto_Kind) String() string {
+ return proto.EnumName(EntityProto_Kind_name, int32(x))
+}
+func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(EntityProto_Kind_value, data, "EntityProto_Kind")
+ if err != nil {
+ return err
+ }
+ *x = EntityProto_Kind(value)
+ return nil
+}
+func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0}
+}
+
+type Index_Property_Direction int32
+
+const (
+ Index_Property_ASCENDING Index_Property_Direction = 1
+ Index_Property_DESCENDING Index_Property_Direction = 2
+)
+
+var Index_Property_Direction_name = map[int32]string{
+ 1: "ASCENDING",
+ 2: "DESCENDING",
+}
+var Index_Property_Direction_value = map[string]int32{
+ "ASCENDING": 1,
+ "DESCENDING": 2,
+}
+
+func (x Index_Property_Direction) Enum() *Index_Property_Direction {
+ p := new(Index_Property_Direction)
+ *p = x
+ return p
+}
+func (x Index_Property_Direction) String() string {
+ return proto.EnumName(Index_Property_Direction_name, int32(x))
+}
+func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Index_Property_Direction_value, data, "Index_Property_Direction")
+ if err != nil {
+ return err
+ }
+ *x = Index_Property_Direction(value)
+ return nil
+}
+func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0}
+}
+
+type CompositeIndex_State int32
+
+const (
+ CompositeIndex_WRITE_ONLY CompositeIndex_State = 1
+ CompositeIndex_READ_WRITE CompositeIndex_State = 2
+ CompositeIndex_DELETED CompositeIndex_State = 3
+ CompositeIndex_ERROR CompositeIndex_State = 4
+)
+
+var CompositeIndex_State_name = map[int32]string{
+ 1: "WRITE_ONLY",
+ 2: "READ_WRITE",
+ 3: "DELETED",
+ 4: "ERROR",
+}
+var CompositeIndex_State_value = map[string]int32{
+ "WRITE_ONLY": 1,
+ "READ_WRITE": 2,
+ "DELETED": 3,
+ "ERROR": 4,
+}
+
+func (x CompositeIndex_State) Enum() *CompositeIndex_State {
+ p := new(CompositeIndex_State)
+ *p = x
+ return p
+}
+func (x CompositeIndex_State) String() string {
+ return proto.EnumName(CompositeIndex_State_name, int32(x))
+}
+func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(CompositeIndex_State_value, data, "CompositeIndex_State")
+ if err != nil {
+ return err
+ }
+ *x = CompositeIndex_State(value)
+ return nil
+}
+func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0}
+}
+
+type Snapshot_Status int32
+
+const (
+ Snapshot_INACTIVE Snapshot_Status = 0
+ Snapshot_ACTIVE Snapshot_Status = 1
+)
+
+var Snapshot_Status_name = map[int32]string{
+ 0: "INACTIVE",
+ 1: "ACTIVE",
+}
+var Snapshot_Status_value = map[string]int32{
+ "INACTIVE": 0,
+ "ACTIVE": 1,
+}
+
+func (x Snapshot_Status) Enum() *Snapshot_Status {
+ p := new(Snapshot_Status)
+ *p = x
+ return p
+}
+func (x Snapshot_Status) String() string {
+ return proto.EnumName(Snapshot_Status_name, int32(x))
+}
+func (x *Snapshot_Status) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Snapshot_Status_value, data, "Snapshot_Status")
+ if err != nil {
+ return err
+ }
+ *x = Snapshot_Status(value)
+ return nil
+}
+func (Snapshot_Status) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0}
+}
+
+type Query_Hint int32
+
+const (
+ Query_ORDER_FIRST Query_Hint = 1
+ Query_ANCESTOR_FIRST Query_Hint = 2
+ Query_FILTER_FIRST Query_Hint = 3
+)
+
+var Query_Hint_name = map[int32]string{
+ 1: "ORDER_FIRST",
+ 2: "ANCESTOR_FIRST",
+ 3: "FILTER_FIRST",
+}
+var Query_Hint_value = map[string]int32{
+ "ORDER_FIRST": 1,
+ "ANCESTOR_FIRST": 2,
+ "FILTER_FIRST": 3,
+}
+
+func (x Query_Hint) Enum() *Query_Hint {
+ p := new(Query_Hint)
+ *p = x
+ return p
+}
+func (x Query_Hint) String() string {
+ return proto.EnumName(Query_Hint_name, int32(x))
+}
+func (x *Query_Hint) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Query_Hint_value, data, "Query_Hint")
+ if err != nil {
+ return err
+ }
+ *x = Query_Hint(value)
+ return nil
+}
+func (Query_Hint) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0}
+}
+
+type Query_Filter_Operator int32
+
+const (
+ Query_Filter_LESS_THAN Query_Filter_Operator = 1
+ Query_Filter_LESS_THAN_OR_EQUAL Query_Filter_Operator = 2
+ Query_Filter_GREATER_THAN Query_Filter_Operator = 3
+ Query_Filter_GREATER_THAN_OR_EQUAL Query_Filter_Operator = 4
+ Query_Filter_EQUAL Query_Filter_Operator = 5
+ Query_Filter_IN Query_Filter_Operator = 6
+ Query_Filter_EXISTS Query_Filter_Operator = 7
+)
+
+var Query_Filter_Operator_name = map[int32]string{
+ 1: "LESS_THAN",
+ 2: "LESS_THAN_OR_EQUAL",
+ 3: "GREATER_THAN",
+ 4: "GREATER_THAN_OR_EQUAL",
+ 5: "EQUAL",
+ 6: "IN",
+ 7: "EXISTS",
+}
+var Query_Filter_Operator_value = map[string]int32{
+ "LESS_THAN": 1,
+ "LESS_THAN_OR_EQUAL": 2,
+ "GREATER_THAN": 3,
+ "GREATER_THAN_OR_EQUAL": 4,
+ "EQUAL": 5,
+ "IN": 6,
+ "EXISTS": 7,
+}
+
+func (x Query_Filter_Operator) Enum() *Query_Filter_Operator {
+ p := new(Query_Filter_Operator)
+ *p = x
+ return p
+}
+func (x Query_Filter_Operator) String() string {
+ return proto.EnumName(Query_Filter_Operator_name, int32(x))
+}
+func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Query_Filter_Operator_value, data, "Query_Filter_Operator")
+ if err != nil {
+ return err
+ }
+ *x = Query_Filter_Operator(value)
+ return nil
+}
+func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0}
+}
+
+type Query_Order_Direction int32
+
+const (
+ Query_Order_ASCENDING Query_Order_Direction = 1
+ Query_Order_DESCENDING Query_Order_Direction = 2
+)
+
+var Query_Order_Direction_name = map[int32]string{
+ 1: "ASCENDING",
+ 2: "DESCENDING",
+}
+var Query_Order_Direction_value = map[string]int32{
+ "ASCENDING": 1,
+ "DESCENDING": 2,
+}
+
+func (x Query_Order_Direction) Enum() *Query_Order_Direction {
+ p := new(Query_Order_Direction)
+ *p = x
+ return p
+}
+func (x Query_Order_Direction) String() string {
+ return proto.EnumName(Query_Order_Direction_name, int32(x))
+}
+func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Query_Order_Direction_value, data, "Query_Order_Direction")
+ if err != nil {
+ return err
+ }
+ *x = Query_Order_Direction(value)
+ return nil
+}
+func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0}
+}
+
+type Error_ErrorCode int32
+
+const (
+ Error_BAD_REQUEST Error_ErrorCode = 1
+ Error_CONCURRENT_TRANSACTION Error_ErrorCode = 2
+ Error_INTERNAL_ERROR Error_ErrorCode = 3
+ Error_NEED_INDEX Error_ErrorCode = 4
+ Error_TIMEOUT Error_ErrorCode = 5
+ Error_PERMISSION_DENIED Error_ErrorCode = 6
+ Error_BIGTABLE_ERROR Error_ErrorCode = 7
+ Error_COMMITTED_BUT_STILL_APPLYING Error_ErrorCode = 8
+ Error_CAPABILITY_DISABLED Error_ErrorCode = 9
+ Error_TRY_ALTERNATE_BACKEND Error_ErrorCode = 10
+ Error_SAFE_TIME_TOO_OLD Error_ErrorCode = 11
+)
+
+var Error_ErrorCode_name = map[int32]string{
+ 1: "BAD_REQUEST",
+ 2: "CONCURRENT_TRANSACTION",
+ 3: "INTERNAL_ERROR",
+ 4: "NEED_INDEX",
+ 5: "TIMEOUT",
+ 6: "PERMISSION_DENIED",
+ 7: "BIGTABLE_ERROR",
+ 8: "COMMITTED_BUT_STILL_APPLYING",
+ 9: "CAPABILITY_DISABLED",
+ 10: "TRY_ALTERNATE_BACKEND",
+ 11: "SAFE_TIME_TOO_OLD",
+}
+var Error_ErrorCode_value = map[string]int32{
+ "BAD_REQUEST": 1,
+ "CONCURRENT_TRANSACTION": 2,
+ "INTERNAL_ERROR": 3,
+ "NEED_INDEX": 4,
+ "TIMEOUT": 5,
+ "PERMISSION_DENIED": 6,
+ "BIGTABLE_ERROR": 7,
+ "COMMITTED_BUT_STILL_APPLYING": 8,
+ "CAPABILITY_DISABLED": 9,
+ "TRY_ALTERNATE_BACKEND": 10,
+ "SAFE_TIME_TOO_OLD": 11,
+}
+
+func (x Error_ErrorCode) Enum() *Error_ErrorCode {
+ p := new(Error_ErrorCode)
+ *p = x
+ return p
+}
+func (x Error_ErrorCode) String() string {
+ return proto.EnumName(Error_ErrorCode_name, int32(x))
+}
+func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(Error_ErrorCode_value, data, "Error_ErrorCode")
+ if err != nil {
+ return err
+ }
+ *x = Error_ErrorCode(value)
+ return nil
+}
+func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0}
+}
+
+type PutRequest_AutoIdPolicy int32
+
+const (
+ PutRequest_CURRENT PutRequest_AutoIdPolicy = 0
+ PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1
+)
+
+var PutRequest_AutoIdPolicy_name = map[int32]string{
+ 0: "CURRENT",
+ 1: "SEQUENTIAL",
+}
+var PutRequest_AutoIdPolicy_value = map[string]int32{
+ "CURRENT": 0,
+ "SEQUENTIAL": 1,
+}
+
+func (x PutRequest_AutoIdPolicy) Enum() *PutRequest_AutoIdPolicy {
+ p := new(PutRequest_AutoIdPolicy)
+ *p = x
+ return p
+}
+func (x PutRequest_AutoIdPolicy) String() string {
+ return proto.EnumName(PutRequest_AutoIdPolicy_name, int32(x))
+}
+func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(PutRequest_AutoIdPolicy_value, data, "PutRequest_AutoIdPolicy")
+ if err != nil {
+ return err
+ }
+ *x = PutRequest_AutoIdPolicy(value)
+ return nil
+}
+func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0}
+}
+
+type BeginTransactionRequest_TransactionMode int32
+
+const (
+ BeginTransactionRequest_UNKNOWN BeginTransactionRequest_TransactionMode = 0
+ BeginTransactionRequest_READ_ONLY BeginTransactionRequest_TransactionMode = 1
+ BeginTransactionRequest_READ_WRITE BeginTransactionRequest_TransactionMode = 2
+)
+
+var BeginTransactionRequest_TransactionMode_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "READ_ONLY",
+ 2: "READ_WRITE",
+}
+var BeginTransactionRequest_TransactionMode_value = map[string]int32{
+ "UNKNOWN": 0,
+ "READ_ONLY": 1,
+ "READ_WRITE": 2,
+}
+
+func (x BeginTransactionRequest_TransactionMode) Enum() *BeginTransactionRequest_TransactionMode {
+ p := new(BeginTransactionRequest_TransactionMode)
+ *p = x
+ return p
+}
+func (x BeginTransactionRequest_TransactionMode) String() string {
+ return proto.EnumName(BeginTransactionRequest_TransactionMode_name, int32(x))
+}
+func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_TransactionMode_value, data, "BeginTransactionRequest_TransactionMode")
+ if err != nil {
+ return err
+ }
+ *x = BeginTransactionRequest_TransactionMode(value)
+ return nil
+}
+func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0}
+}
+
+type Action struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Action) Reset() { *m = Action{} }
+func (m *Action) String() string { return proto.CompactTextString(m) }
+func (*Action) ProtoMessage() {}
+func (*Action) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0}
+}
+func (m *Action) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Action.Unmarshal(m, b)
+}
+func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Action.Marshal(b, m, deterministic)
+}
+func (dst *Action) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Action.Merge(dst, src)
+}
+func (m *Action) XXX_Size() int {
+ return xxx_messageInfo_Action.Size(m)
+}
+func (m *Action) XXX_DiscardUnknown() {
+ xxx_messageInfo_Action.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Action proto.InternalMessageInfo
+
+type PropertyValue struct {
+ Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"`
+ BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"`
+ StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"`
+ DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"`
+ Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"`
+ Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"`
+ Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PropertyValue) Reset() { *m = PropertyValue{} }
+func (m *PropertyValue) String() string { return proto.CompactTextString(m) }
+func (*PropertyValue) ProtoMessage() {}
+func (*PropertyValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1}
+}
+func (m *PropertyValue) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PropertyValue.Unmarshal(m, b)
+}
+func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic)
+}
+func (dst *PropertyValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PropertyValue.Merge(dst, src)
+}
+func (m *PropertyValue) XXX_Size() int {
+ return xxx_messageInfo_PropertyValue.Size(m)
+}
+func (m *PropertyValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_PropertyValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PropertyValue proto.InternalMessageInfo
+
+func (m *PropertyValue) GetInt64Value() int64 {
+ if m != nil && m.Int64Value != nil {
+ return *m.Int64Value
+ }
+ return 0
+}
+
+func (m *PropertyValue) GetBooleanValue() bool {
+ if m != nil && m.BooleanValue != nil {
+ return *m.BooleanValue
+ }
+ return false
+}
+
+func (m *PropertyValue) GetStringValue() string {
+ if m != nil && m.StringValue != nil {
+ return *m.StringValue
+ }
+ return ""
+}
+
+func (m *PropertyValue) GetDoubleValue() float64 {
+ if m != nil && m.DoubleValue != nil {
+ return *m.DoubleValue
+ }
+ return 0
+}
+
+func (m *PropertyValue) GetPointvalue() *PropertyValue_PointValue {
+ if m != nil {
+ return m.Pointvalue
+ }
+ return nil
+}
+
+func (m *PropertyValue) GetUservalue() *PropertyValue_UserValue {
+ if m != nil {
+ return m.Uservalue
+ }
+ return nil
+}
+
+func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue {
+ if m != nil {
+ return m.Referencevalue
+ }
+ return nil
+}
+
+type PropertyValue_PointValue struct {
+ X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"`
+ Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} }
+func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) }
+func (*PropertyValue_PointValue) ProtoMessage() {}
+func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0}
+}
+func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b)
+}
+func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic)
+}
+func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src)
+}
+func (m *PropertyValue_PointValue) XXX_Size() int {
+ return xxx_messageInfo_PropertyValue_PointValue.Size(m)
+}
+func (m *PropertyValue_PointValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo
+
+func (m *PropertyValue_PointValue) GetX() float64 {
+ if m != nil && m.X != nil {
+ return *m.X
+ }
+ return 0
+}
+
+func (m *PropertyValue_PointValue) GetY() float64 {
+ if m != nil && m.Y != nil {
+ return *m.Y
+ }
+ return 0
+}
+
+type PropertyValue_UserValue struct {
+ Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"`
+ AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
+ Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"`
+ FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"`
+ FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} }
+func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) }
+func (*PropertyValue_UserValue) ProtoMessage() {}
+func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1}
+}
+func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b)
+}
+func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic)
+}
+func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src)
+}
+func (m *PropertyValue_UserValue) XXX_Size() int {
+ return xxx_messageInfo_PropertyValue_UserValue.Size(m)
+}
+func (m *PropertyValue_UserValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo
+
+func (m *PropertyValue_UserValue) GetEmail() string {
+ if m != nil && m.Email != nil {
+ return *m.Email
+ }
+ return ""
+}
+
+func (m *PropertyValue_UserValue) GetAuthDomain() string {
+ if m != nil && m.AuthDomain != nil {
+ return *m.AuthDomain
+ }
+ return ""
+}
+
+func (m *PropertyValue_UserValue) GetNickname() string {
+ if m != nil && m.Nickname != nil {
+ return *m.Nickname
+ }
+ return ""
+}
+
+func (m *PropertyValue_UserValue) GetFederatedIdentity() string {
+ if m != nil && m.FederatedIdentity != nil {
+ return *m.FederatedIdentity
+ }
+ return ""
+}
+
+func (m *PropertyValue_UserValue) GetFederatedProvider() string {
+ if m != nil && m.FederatedProvider != nil {
+ return *m.FederatedProvider
+ }
+ return ""
+}
+
+type PropertyValue_ReferenceValue struct {
+ App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"`
+ NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"`
+ Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} }
+func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) }
+func (*PropertyValue_ReferenceValue) ProtoMessage() {}
+func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2}
+}
+func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b)
+}
+func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic)
+}
+func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src)
+}
+func (m *PropertyValue_ReferenceValue) XXX_Size() int {
+ return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m)
+}
+func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo
+
+func (m *PropertyValue_ReferenceValue) GetApp() string {
+ if m != nil && m.App != nil {
+ return *m.App
+ }
+ return ""
+}
+
+func (m *PropertyValue_ReferenceValue) GetNameSpace() string {
+ if m != nil && m.NameSpace != nil {
+ return *m.NameSpace
+ }
+ return ""
+}
+
+func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement {
+ if m != nil {
+ return m.Pathelement
+ }
+ return nil
+}
+
+type PropertyValue_ReferenceValue_PathElement struct {
+ Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"`
+ Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"`
+ Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PropertyValue_ReferenceValue_PathElement) Reset() {
+ *m = PropertyValue_ReferenceValue_PathElement{}
+}
+func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) }
+func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {}
+func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0}
+}
+func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b)
+}
+func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic)
+}
+func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src)
+}
+func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int {
+ return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m)
+}
+func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() {
+ xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo
+
+func (m *PropertyValue_ReferenceValue_PathElement) GetType() string {
+ if m != nil && m.Type != nil {
+ return *m.Type
+ }
+ return ""
+}
+
+func (m *PropertyValue_ReferenceValue_PathElement) GetId() int64 {
+ if m != nil && m.Id != nil {
+ return *m.Id
+ }
+ return 0
+}
+
+func (m *PropertyValue_ReferenceValue_PathElement) GetName() string {
+ if m != nil && m.Name != nil {
+ return *m.Name
+ }
+ return ""
+}
+
+type Property struct {
+ Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.Property_Meaning,def=0" json:"meaning,omitempty"`
+ MeaningUri *string `protobuf:"bytes,2,opt,name=meaning_uri,json=meaningUri" json:"meaning_uri,omitempty"`
+ Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"`
+ Value *PropertyValue `protobuf:"bytes,5,req,name=value" json:"value,omitempty"`
+ Multiple *bool `protobuf:"varint,4,req,name=multiple" json:"multiple,omitempty"`
+ Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"`
+ FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"`
+ Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Property) Reset() { *m = Property{} }
+func (m *Property) String() string { return proto.CompactTextString(m) }
+func (*Property) ProtoMessage() {}
+func (*Property) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2}
+}
+func (m *Property) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Property.Unmarshal(m, b)
+}
+func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Property.Marshal(b, m, deterministic)
+}
+func (dst *Property) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Property.Merge(dst, src)
+}
+func (m *Property) XXX_Size() int {
+ return xxx_messageInfo_Property.Size(m)
+}
+func (m *Property) XXX_DiscardUnknown() {
+ xxx_messageInfo_Property.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Property proto.InternalMessageInfo
+
+const Default_Property_Meaning Property_Meaning = Property_NO_MEANING
+const Default_Property_Searchable bool = false
+const Default_Property_Locale string = "en"
+
+func (m *Property) GetMeaning() Property_Meaning {
+ if m != nil && m.Meaning != nil {
+ return *m.Meaning
+ }
+ return Default_Property_Meaning
+}
+
+func (m *Property) GetMeaningUri() string {
+ if m != nil && m.MeaningUri != nil {
+ return *m.MeaningUri
+ }
+ return ""
+}
+
+func (m *Property) GetName() string {
+ if m != nil && m.Name != nil {
+ return *m.Name
+ }
+ return ""
+}
+
+func (m *Property) GetValue() *PropertyValue {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (m *Property) GetMultiple() bool {
+ if m != nil && m.Multiple != nil {
+ return *m.Multiple
+ }
+ return false
+}
+
+func (m *Property) GetSearchable() bool {
+ if m != nil && m.Searchable != nil {
+ return *m.Searchable
+ }
+ return Default_Property_Searchable
+}
+
+func (m *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption {
+ if m != nil && m.FtsTokenizationOption != nil {
+ return *m.FtsTokenizationOption
+ }
+ return Property_HTML
+}
+
+func (m *Property) GetLocale() string {
+ if m != nil && m.Locale != nil {
+ return *m.Locale
+ }
+ return Default_Property_Locale
+}
+
+type Path struct {
+ Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Path) Reset() { *m = Path{} }
+func (m *Path) String() string { return proto.CompactTextString(m) }
+func (*Path) ProtoMessage() {}
+func (*Path) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3}
+}
+func (m *Path) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Path.Unmarshal(m, b)
+}
+func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Path.Marshal(b, m, deterministic)
+}
+func (dst *Path) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Path.Merge(dst, src)
+}
+func (m *Path) XXX_Size() int {
+ return xxx_messageInfo_Path.Size(m)
+}
+func (m *Path) XXX_DiscardUnknown() {
+ xxx_messageInfo_Path.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Path proto.InternalMessageInfo
+
+func (m *Path) GetElement() []*Path_Element {
+ if m != nil {
+ return m.Element
+ }
+ return nil
+}
+
+type Path_Element struct {
+ Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"`
+ Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"`
+ Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Path_Element) Reset() { *m = Path_Element{} }
+func (m *Path_Element) String() string { return proto.CompactTextString(m) }
+func (*Path_Element) ProtoMessage() {}
+func (*Path_Element) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0}
+}
+func (m *Path_Element) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Path_Element.Unmarshal(m, b)
+}
+func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic)
+}
+func (dst *Path_Element) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Path_Element.Merge(dst, src)
+}
+func (m *Path_Element) XXX_Size() int {
+ return xxx_messageInfo_Path_Element.Size(m)
+}
+func (m *Path_Element) XXX_DiscardUnknown() {
+ xxx_messageInfo_Path_Element.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Path_Element proto.InternalMessageInfo
+
+func (m *Path_Element) GetType() string {
+ if m != nil && m.Type != nil {
+ return *m.Type
+ }
+ return ""
+}
+
+func (m *Path_Element) GetId() int64 {
+ if m != nil && m.Id != nil {
+ return *m.Id
+ }
+ return 0
+}
+
+func (m *Path_Element) GetName() string {
+ if m != nil && m.Name != nil {
+ return *m.Name
+ }
+ return ""
+}
+
+type Reference struct {
+ App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"`
+ NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"`
+ Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Reference) Reset() { *m = Reference{} }
+func (m *Reference) String() string { return proto.CompactTextString(m) }
+func (*Reference) ProtoMessage() {}
+func (*Reference) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4}
+}
+func (m *Reference) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Reference.Unmarshal(m, b)
+}
+func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Reference.Marshal(b, m, deterministic)
+}
+func (dst *Reference) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Reference.Merge(dst, src)
+}
+func (m *Reference) XXX_Size() int {
+ return xxx_messageInfo_Reference.Size(m)
+}
+func (m *Reference) XXX_DiscardUnknown() {
+ xxx_messageInfo_Reference.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Reference proto.InternalMessageInfo
+
+func (m *Reference) GetApp() string {
+ if m != nil && m.App != nil {
+ return *m.App
+ }
+ return ""
+}
+
+func (m *Reference) GetNameSpace() string {
+ if m != nil && m.NameSpace != nil {
+ return *m.NameSpace
+ }
+ return ""
+}
+
+func (m *Reference) GetPath() *Path {
+ if m != nil {
+ return m.Path
+ }
+ return nil
+}
+
+type User struct {
+ Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"`
+ AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
+ Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
+ FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"`
+ FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *User) Reset() { *m = User{} }
+func (m *User) String() string { return proto.CompactTextString(m) }
+func (*User) ProtoMessage() {}
+func (*User) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5}
+}
+func (m *User) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_User.Unmarshal(m, b)
+}
+func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_User.Marshal(b, m, deterministic)
+}
+func (dst *User) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_User.Merge(dst, src)
+}
+func (m *User) XXX_Size() int {
+ return xxx_messageInfo_User.Size(m)
+}
+func (m *User) XXX_DiscardUnknown() {
+ xxx_messageInfo_User.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_User proto.InternalMessageInfo
+
+func (m *User) GetEmail() string {
+ if m != nil && m.Email != nil {
+ return *m.Email
+ }
+ return ""
+}
+
+func (m *User) GetAuthDomain() string {
+ if m != nil && m.AuthDomain != nil {
+ return *m.AuthDomain
+ }
+ return ""
+}
+
+func (m *User) GetNickname() string {
+ if m != nil && m.Nickname != nil {
+ return *m.Nickname
+ }
+ return ""
+}
+
+func (m *User) GetFederatedIdentity() string {
+ if m != nil && m.FederatedIdentity != nil {
+ return *m.FederatedIdentity
+ }
+ return ""
+}
+
+func (m *User) GetFederatedProvider() string {
+ if m != nil && m.FederatedProvider != nil {
+ return *m.FederatedProvider
+ }
+ return ""
+}
+
+type EntityProto struct {
+ Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"`
+ EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"`
+ Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"`
+ Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"`
+ KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"`
+ Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"`
+ RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"`
+ Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *EntityProto) Reset() { *m = EntityProto{} }
+func (m *EntityProto) String() string { return proto.CompactTextString(m) }
+func (*EntityProto) ProtoMessage() {}
+func (*EntityProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6}
+}
+func (m *EntityProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EntityProto.Unmarshal(m, b)
+}
+func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic)
+}
+func (dst *EntityProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EntityProto.Merge(dst, src)
+}
+func (m *EntityProto) XXX_Size() int {
+ return xxx_messageInfo_EntityProto.Size(m)
+}
+func (m *EntityProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_EntityProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EntityProto proto.InternalMessageInfo
+
+func (m *EntityProto) GetKey() *Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *EntityProto) GetEntityGroup() *Path {
+ if m != nil {
+ return m.EntityGroup
+ }
+ return nil
+}
+
+func (m *EntityProto) GetOwner() *User {
+ if m != nil {
+ return m.Owner
+ }
+ return nil
+}
+
+func (m *EntityProto) GetKind() EntityProto_Kind {
+ if m != nil && m.Kind != nil {
+ return *m.Kind
+ }
+ return EntityProto_GD_CONTACT
+}
+
+func (m *EntityProto) GetKindUri() string {
+ if m != nil && m.KindUri != nil {
+ return *m.KindUri
+ }
+ return ""
+}
+
+func (m *EntityProto) GetProperty() []*Property {
+ if m != nil {
+ return m.Property
+ }
+ return nil
+}
+
+func (m *EntityProto) GetRawProperty() []*Property {
+ if m != nil {
+ return m.RawProperty
+ }
+ return nil
+}
+
+func (m *EntityProto) GetRank() int32 {
+ if m != nil && m.Rank != nil {
+ return *m.Rank
+ }
+ return 0
+}
+
+type CompositeProperty struct {
+ IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"`
+ Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompositeProperty) Reset() { *m = CompositeProperty{} }
+func (m *CompositeProperty) String() string { return proto.CompactTextString(m) }
+func (*CompositeProperty) ProtoMessage() {}
+func (*CompositeProperty) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7}
+}
+func (m *CompositeProperty) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompositeProperty.Unmarshal(m, b)
+}
+func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic)
+}
+func (dst *CompositeProperty) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompositeProperty.Merge(dst, src)
+}
+func (m *CompositeProperty) XXX_Size() int {
+ return xxx_messageInfo_CompositeProperty.Size(m)
+}
+func (m *CompositeProperty) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompositeProperty.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo
+
+func (m *CompositeProperty) GetIndexId() int64 {
+ if m != nil && m.IndexId != nil {
+ return *m.IndexId
+ }
+ return 0
+}
+
+func (m *CompositeProperty) GetValue() []string {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+type Index struct {
+ EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"`
+ Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"`
+ Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Index) Reset() { *m = Index{} }
+func (m *Index) String() string { return proto.CompactTextString(m) }
+func (*Index) ProtoMessage() {}
+func (*Index) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8}
+}
+func (m *Index) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Index.Unmarshal(m, b)
+}
+func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Index.Marshal(b, m, deterministic)
+}
+func (dst *Index) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Index.Merge(dst, src)
+}
+func (m *Index) XXX_Size() int {
+ return xxx_messageInfo_Index.Size(m)
+}
+func (m *Index) XXX_DiscardUnknown() {
+ xxx_messageInfo_Index.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Index proto.InternalMessageInfo
+
+func (m *Index) GetEntityType() string {
+ if m != nil && m.EntityType != nil {
+ return *m.EntityType
+ }
+ return ""
+}
+
+func (m *Index) GetAncestor() bool {
+ if m != nil && m.Ancestor != nil {
+ return *m.Ancestor
+ }
+ return false
+}
+
+func (m *Index) GetProperty() []*Index_Property {
+ if m != nil {
+ return m.Property
+ }
+ return nil
+}
+
+type Index_Property struct {
+ Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"`
+ Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Index_Property) Reset() { *m = Index_Property{} }
+func (m *Index_Property) String() string { return proto.CompactTextString(m) }
+func (*Index_Property) ProtoMessage() {}
+func (*Index_Property) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0}
+}
+func (m *Index_Property) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Index_Property.Unmarshal(m, b)
+}
+func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic)
+}
+func (dst *Index_Property) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Index_Property.Merge(dst, src)
+}
+func (m *Index_Property) XXX_Size() int {
+ return xxx_messageInfo_Index_Property.Size(m)
+}
+func (m *Index_Property) XXX_DiscardUnknown() {
+ xxx_messageInfo_Index_Property.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Index_Property proto.InternalMessageInfo
+
+const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING
+
+func (m *Index_Property) GetName() string {
+ if m != nil && m.Name != nil {
+ return *m.Name
+ }
+ return ""
+}
+
+func (m *Index_Property) GetDirection() Index_Property_Direction {
+ if m != nil && m.Direction != nil {
+ return *m.Direction
+ }
+ return Default_Index_Property_Direction
+}
+
+type CompositeIndex struct {
+ AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
+ Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"`
+ Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"`
+ State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"`
+ OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompositeIndex) Reset() { *m = CompositeIndex{} }
+func (m *CompositeIndex) String() string { return proto.CompactTextString(m) }
+func (*CompositeIndex) ProtoMessage() {}
+func (*CompositeIndex) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9}
+}
+func (m *CompositeIndex) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompositeIndex.Unmarshal(m, b)
+}
+func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic)
+}
+func (dst *CompositeIndex) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompositeIndex.Merge(dst, src)
+}
+func (m *CompositeIndex) XXX_Size() int {
+ return xxx_messageInfo_CompositeIndex.Size(m)
+}
+func (m *CompositeIndex) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompositeIndex.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo
+
+const Default_CompositeIndex_OnlyUseIfRequired bool = false
+
+func (m *CompositeIndex) GetAppId() string {
+ if m != nil && m.AppId != nil {
+ return *m.AppId
+ }
+ return ""
+}
+
+func (m *CompositeIndex) GetId() int64 {
+ if m != nil && m.Id != nil {
+ return *m.Id
+ }
+ return 0
+}
+
+func (m *CompositeIndex) GetDefinition() *Index {
+ if m != nil {
+ return m.Definition
+ }
+ return nil
+}
+
+func (m *CompositeIndex) GetState() CompositeIndex_State {
+ if m != nil && m.State != nil {
+ return *m.State
+ }
+ return CompositeIndex_WRITE_ONLY
+}
+
+func (m *CompositeIndex) GetOnlyUseIfRequired() bool {
+ if m != nil && m.OnlyUseIfRequired != nil {
+ return *m.OnlyUseIfRequired
+ }
+ return Default_CompositeIndex_OnlyUseIfRequired
+}
+
+type IndexPostfix struct {
+ IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"`
+ Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
+ Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *IndexPostfix) Reset() { *m = IndexPostfix{} }
+func (m *IndexPostfix) String() string { return proto.CompactTextString(m) }
+func (*IndexPostfix) ProtoMessage() {}
+func (*IndexPostfix) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10}
+}
+func (m *IndexPostfix) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_IndexPostfix.Unmarshal(m, b)
+}
+func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic)
+}
+func (dst *IndexPostfix) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IndexPostfix.Merge(dst, src)
+}
+func (m *IndexPostfix) XXX_Size() int {
+ return xxx_messageInfo_IndexPostfix.Size(m)
+}
+func (m *IndexPostfix) XXX_DiscardUnknown() {
+ xxx_messageInfo_IndexPostfix.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo
+
+const Default_IndexPostfix_Before bool = true
+
+func (m *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue {
+ if m != nil {
+ return m.IndexValue
+ }
+ return nil
+}
+
+func (m *IndexPostfix) GetKey() *Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *IndexPostfix) GetBefore() bool {
+ if m != nil && m.Before != nil {
+ return *m.Before
+ }
+ return Default_IndexPostfix_Before
+}
+
+type IndexPostfix_IndexValue struct {
+ PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"`
+ Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} }
+func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) }
+func (*IndexPostfix_IndexValue) ProtoMessage() {}
+func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0}
+}
+func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b)
+}
+func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic)
+}
+func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src)
+}
+func (m *IndexPostfix_IndexValue) XXX_Size() int {
+ return xxx_messageInfo_IndexPostfix_IndexValue.Size(m)
+}
+func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo
+
+func (m *IndexPostfix_IndexValue) GetPropertyName() string {
+ if m != nil && m.PropertyName != nil {
+ return *m.PropertyName
+ }
+ return ""
+}
+
+func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+type IndexPosition struct {
+ Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+ Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *IndexPosition) Reset() { *m = IndexPosition{} }
+func (m *IndexPosition) String() string { return proto.CompactTextString(m) }
+func (*IndexPosition) ProtoMessage() {}
+func (*IndexPosition) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11}
+}
+func (m *IndexPosition) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_IndexPosition.Unmarshal(m, b)
+}
+func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic)
+}
+func (dst *IndexPosition) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IndexPosition.Merge(dst, src)
+}
+func (m *IndexPosition) XXX_Size() int {
+ return xxx_messageInfo_IndexPosition.Size(m)
+}
+func (m *IndexPosition) XXX_DiscardUnknown() {
+ xxx_messageInfo_IndexPosition.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IndexPosition proto.InternalMessageInfo
+
+const Default_IndexPosition_Before bool = true
+
+func (m *IndexPosition) GetKey() string {
+ if m != nil && m.Key != nil {
+ return *m.Key
+ }
+ return ""
+}
+
+func (m *IndexPosition) GetBefore() bool {
+ if m != nil && m.Before != nil {
+ return *m.Before
+ }
+ return Default_IndexPosition_Before
+}
+
+type Snapshot struct {
+ Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Snapshot) Reset() { *m = Snapshot{} }
+func (m *Snapshot) String() string { return proto.CompactTextString(m) }
+func (*Snapshot) ProtoMessage() {}
+func (*Snapshot) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12}
+}
+func (m *Snapshot) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Snapshot.Unmarshal(m, b)
+}
+func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
+}
+func (dst *Snapshot) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Snapshot.Merge(dst, src)
+}
+func (m *Snapshot) XXX_Size() int {
+ return xxx_messageInfo_Snapshot.Size(m)
+}
+func (m *Snapshot) XXX_DiscardUnknown() {
+ xxx_messageInfo_Snapshot.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Snapshot proto.InternalMessageInfo
+
+func (m *Snapshot) GetTs() int64 {
+ if m != nil && m.Ts != nil {
+ return *m.Ts
+ }
+ return 0
+}
+
+type InternalHeader struct {
+ Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InternalHeader) Reset() { *m = InternalHeader{} }
+func (m *InternalHeader) String() string { return proto.CompactTextString(m) }
+func (*InternalHeader) ProtoMessage() {}
+func (*InternalHeader) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13}
+}
+func (m *InternalHeader) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InternalHeader.Unmarshal(m, b)
+}
+func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic)
+}
+func (dst *InternalHeader) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InternalHeader.Merge(dst, src)
+}
+func (m *InternalHeader) XXX_Size() int {
+ return xxx_messageInfo_InternalHeader.Size(m)
+}
+func (m *InternalHeader) XXX_DiscardUnknown() {
+ xxx_messageInfo_InternalHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InternalHeader proto.InternalMessageInfo
+
+func (m *InternalHeader) GetQos() string {
+ if m != nil && m.Qos != nil {
+ return *m.Qos
+ }
+ return ""
+}
+
+type Transaction struct {
+ Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"`
+ Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"`
+ App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"`
+ MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Transaction) Reset() { *m = Transaction{} }
+func (m *Transaction) String() string { return proto.CompactTextString(m) }
+func (*Transaction) ProtoMessage() {}
+func (*Transaction) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14}
+}
+func (m *Transaction) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Transaction.Unmarshal(m, b)
+}
+func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Transaction.Marshal(b, m, deterministic)
+}
+func (dst *Transaction) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Transaction.Merge(dst, src)
+}
+func (m *Transaction) XXX_Size() int {
+ return xxx_messageInfo_Transaction.Size(m)
+}
+func (m *Transaction) XXX_DiscardUnknown() {
+ xxx_messageInfo_Transaction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Transaction proto.InternalMessageInfo
+
+const Default_Transaction_MarkChanges bool = false
+
+func (m *Transaction) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *Transaction) GetHandle() uint64 {
+ if m != nil && m.Handle != nil {
+ return *m.Handle
+ }
+ return 0
+}
+
+func (m *Transaction) GetApp() string {
+ if m != nil && m.App != nil {
+ return *m.App
+ }
+ return ""
+}
+
+func (m *Transaction) GetMarkChanges() bool {
+ if m != nil && m.MarkChanges != nil {
+ return *m.MarkChanges
+ }
+ return Default_Transaction_MarkChanges
+}
+
+type Query struct {
+ Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"`
+ App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"`
+ NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"`
+ Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"`
+ Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"`
+ Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"`
+ SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"`
+ Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"`
+ Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"`
+ Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"`
+ Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"`
+ Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"`
+ CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"`
+ EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"`
+ CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"`
+ RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"`
+ KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"`
+ Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"`
+ Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"`
+ FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"`
+ Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"`
+ PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"`
+ GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"`
+ Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"`
+ MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"`
+ SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"`
+ PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Query) Reset() { *m = Query{} }
+func (m *Query) String() string { return proto.CompactTextString(m) }
+func (*Query) ProtoMessage() {}
+func (*Query) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15}
+}
+func (m *Query) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Query.Unmarshal(m, b)
+}
+func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Query.Marshal(b, m, deterministic)
+}
+func (dst *Query) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Query.Merge(dst, src)
+}
+func (m *Query) XXX_Size() int {
+ return xxx_messageInfo_Query.Size(m)
+}
+func (m *Query) XXX_DiscardUnknown() {
+ xxx_messageInfo_Query.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Query proto.InternalMessageInfo
+
+const Default_Query_Offset int32 = 0
+const Default_Query_RequirePerfectPlan bool = false
+const Default_Query_KeysOnly bool = false
+const Default_Query_Compile bool = false
+const Default_Query_PersistOffset bool = false
+
+func (m *Query) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *Query) GetApp() string {
+ if m != nil && m.App != nil {
+ return *m.App
+ }
+ return ""
+}
+
+func (m *Query) GetNameSpace() string {
+ if m != nil && m.NameSpace != nil {
+ return *m.NameSpace
+ }
+ return ""
+}
+
+func (m *Query) GetKind() string {
+ if m != nil && m.Kind != nil {
+ return *m.Kind
+ }
+ return ""
+}
+
+func (m *Query) GetAncestor() *Reference {
+ if m != nil {
+ return m.Ancestor
+ }
+ return nil
+}
+
+func (m *Query) GetFilter() []*Query_Filter {
+ if m != nil {
+ return m.Filter
+ }
+ return nil
+}
+
+func (m *Query) GetSearchQuery() string {
+ if m != nil && m.SearchQuery != nil {
+ return *m.SearchQuery
+ }
+ return ""
+}
+
+func (m *Query) GetOrder() []*Query_Order {
+ if m != nil {
+ return m.Order
+ }
+ return nil
+}
+
+func (m *Query) GetHint() Query_Hint {
+ if m != nil && m.Hint != nil {
+ return *m.Hint
+ }
+ return Query_ORDER_FIRST
+}
+
+func (m *Query) GetCount() int32 {
+ if m != nil && m.Count != nil {
+ return *m.Count
+ }
+ return 0
+}
+
+func (m *Query) GetOffset() int32 {
+ if m != nil && m.Offset != nil {
+ return *m.Offset
+ }
+ return Default_Query_Offset
+}
+
+func (m *Query) GetLimit() int32 {
+ if m != nil && m.Limit != nil {
+ return *m.Limit
+ }
+ return 0
+}
+
+func (m *Query) GetCompiledCursor() *CompiledCursor {
+ if m != nil {
+ return m.CompiledCursor
+ }
+ return nil
+}
+
+func (m *Query) GetEndCompiledCursor() *CompiledCursor {
+ if m != nil {
+ return m.EndCompiledCursor
+ }
+ return nil
+}
+
+func (m *Query) GetCompositeIndex() []*CompositeIndex {
+ if m != nil {
+ return m.CompositeIndex
+ }
+ return nil
+}
+
+func (m *Query) GetRequirePerfectPlan() bool {
+ if m != nil && m.RequirePerfectPlan != nil {
+ return *m.RequirePerfectPlan
+ }
+ return Default_Query_RequirePerfectPlan
+}
+
+func (m *Query) GetKeysOnly() bool {
+ if m != nil && m.KeysOnly != nil {
+ return *m.KeysOnly
+ }
+ return Default_Query_KeysOnly
+}
+
+func (m *Query) GetTransaction() *Transaction {
+ if m != nil {
+ return m.Transaction
+ }
+ return nil
+}
+
+func (m *Query) GetCompile() bool {
+ if m != nil && m.Compile != nil {
+ return *m.Compile
+ }
+ return Default_Query_Compile
+}
+
+func (m *Query) GetFailoverMs() int64 {
+ if m != nil && m.FailoverMs != nil {
+ return *m.FailoverMs
+ }
+ return 0
+}
+
+func (m *Query) GetStrong() bool {
+ if m != nil && m.Strong != nil {
+ return *m.Strong
+ }
+ return false
+}
+
+func (m *Query) GetPropertyName() []string {
+ if m != nil {
+ return m.PropertyName
+ }
+ return nil
+}
+
+func (m *Query) GetGroupByPropertyName() []string {
+ if m != nil {
+ return m.GroupByPropertyName
+ }
+ return nil
+}
+
+func (m *Query) GetDistinct() bool {
+ if m != nil && m.Distinct != nil {
+ return *m.Distinct
+ }
+ return false
+}
+
+func (m *Query) GetMinSafeTimeSeconds() int64 {
+ if m != nil && m.MinSafeTimeSeconds != nil {
+ return *m.MinSafeTimeSeconds
+ }
+ return 0
+}
+
+func (m *Query) GetSafeReplicaName() []string {
+ if m != nil {
+ return m.SafeReplicaName
+ }
+ return nil
+}
+
+func (m *Query) GetPersistOffset() bool {
+ if m != nil && m.PersistOffset != nil {
+ return *m.PersistOffset
+ }
+ return Default_Query_PersistOffset
+}
+
+type Query_Filter struct {
+ Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"`
+ Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Query_Filter) Reset() { *m = Query_Filter{} }
+func (m *Query_Filter) String() string { return proto.CompactTextString(m) }
+func (*Query_Filter) ProtoMessage() {}
+func (*Query_Filter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0}
+}
+func (m *Query_Filter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Query_Filter.Unmarshal(m, b)
+}
+func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic)
+}
+func (dst *Query_Filter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Query_Filter.Merge(dst, src)
+}
+func (m *Query_Filter) XXX_Size() int {
+ return xxx_messageInfo_Query_Filter.Size(m)
+}
+func (m *Query_Filter) XXX_DiscardUnknown() {
+ xxx_messageInfo_Query_Filter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Query_Filter proto.InternalMessageInfo
+
+func (m *Query_Filter) GetOp() Query_Filter_Operator {
+ if m != nil && m.Op != nil {
+ return *m.Op
+ }
+ return Query_Filter_LESS_THAN
+}
+
+func (m *Query_Filter) GetProperty() []*Property {
+ if m != nil {
+ return m.Property
+ }
+ return nil
+}
+
+type Query_Order struct {
+ Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"`
+ Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Query_Order) Reset() { *m = Query_Order{} }
+func (m *Query_Order) String() string { return proto.CompactTextString(m) }
+func (*Query_Order) ProtoMessage() {}
+func (*Query_Order) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1}
+}
+func (m *Query_Order) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Query_Order.Unmarshal(m, b)
+}
+func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic)
+}
+func (dst *Query_Order) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Query_Order.Merge(dst, src)
+}
+func (m *Query_Order) XXX_Size() int {
+ return xxx_messageInfo_Query_Order.Size(m)
+}
+func (m *Query_Order) XXX_DiscardUnknown() {
+ xxx_messageInfo_Query_Order.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Query_Order proto.InternalMessageInfo
+
+const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING
+
+func (m *Query_Order) GetProperty() string {
+ if m != nil && m.Property != nil {
+ return *m.Property
+ }
+ return ""
+}
+
+func (m *Query_Order) GetDirection() Query_Order_Direction {
+ if m != nil && m.Direction != nil {
+ return *m.Direction
+ }
+ return Default_Query_Order_Direction
+}
+
+type CompiledQuery struct {
+ Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"`
+ Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"`
+ IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"`
+ Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"`
+ Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"`
+ KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"`
+ PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"`
+ DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"`
+ Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledQuery) Reset() { *m = CompiledQuery{} }
+func (m *CompiledQuery) String() string { return proto.CompactTextString(m) }
+func (*CompiledQuery) ProtoMessage() {}
+func (*CompiledQuery) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16}
+}
+func (m *CompiledQuery) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledQuery.Unmarshal(m, b)
+}
+func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic)
+}
+func (dst *CompiledQuery) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledQuery.Merge(dst, src)
+}
+func (m *CompiledQuery) XXX_Size() int {
+ return xxx_messageInfo_CompiledQuery.Size(m)
+}
+func (m *CompiledQuery) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledQuery.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo
+
+const Default_CompiledQuery_Offset int32 = 0
+
+func (m *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan {
+ if m != nil {
+ return m.Primaryscan
+ }
+ return nil
+}
+
+func (m *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan {
+ if m != nil {
+ return m.Mergejoinscan
+ }
+ return nil
+}
+
+func (m *CompiledQuery) GetIndexDef() *Index {
+ if m != nil {
+ return m.IndexDef
+ }
+ return nil
+}
+
+func (m *CompiledQuery) GetOffset() int32 {
+ if m != nil && m.Offset != nil {
+ return *m.Offset
+ }
+ return Default_CompiledQuery_Offset
+}
+
+func (m *CompiledQuery) GetLimit() int32 {
+ if m != nil && m.Limit != nil {
+ return *m.Limit
+ }
+ return 0
+}
+
+func (m *CompiledQuery) GetKeysOnly() bool {
+ if m != nil && m.KeysOnly != nil {
+ return *m.KeysOnly
+ }
+ return false
+}
+
+func (m *CompiledQuery) GetPropertyName() []string {
+ if m != nil {
+ return m.PropertyName
+ }
+ return nil
+}
+
+func (m *CompiledQuery) GetDistinctInfixSize() int32 {
+ if m != nil && m.DistinctInfixSize != nil {
+ return *m.DistinctInfixSize
+ }
+ return 0
+}
+
+func (m *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter {
+ if m != nil {
+ return m.Entityfilter
+ }
+ return nil
+}
+
+type CompiledQuery_PrimaryScan struct {
+ IndexName *string `protobuf:"bytes,2,opt,name=index_name,json=indexName" json:"index_name,omitempty"`
+ StartKey *string `protobuf:"bytes,3,opt,name=start_key,json=startKey" json:"start_key,omitempty"`
+ StartInclusive *bool `protobuf:"varint,4,opt,name=start_inclusive,json=startInclusive" json:"start_inclusive,omitempty"`
+ EndKey *string `protobuf:"bytes,5,opt,name=end_key,json=endKey" json:"end_key,omitempty"`
+ EndInclusive *bool `protobuf:"varint,6,opt,name=end_inclusive,json=endInclusive" json:"end_inclusive,omitempty"`
+ StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"`
+ EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"`
+ EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} }
+func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) }
+func (*CompiledQuery_PrimaryScan) ProtoMessage() {}
+func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0}
+}
+func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b)
+}
+func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic)
+}
+func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src)
+}
+func (m *CompiledQuery_PrimaryScan) XXX_Size() int {
+ return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m)
+}
+func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo
+
+func (m *CompiledQuery_PrimaryScan) GetIndexName() string {
+ if m != nil && m.IndexName != nil {
+ return *m.IndexName
+ }
+ return ""
+}
+
+func (m *CompiledQuery_PrimaryScan) GetStartKey() string {
+ if m != nil && m.StartKey != nil {
+ return *m.StartKey
+ }
+ return ""
+}
+
+func (m *CompiledQuery_PrimaryScan) GetStartInclusive() bool {
+ if m != nil && m.StartInclusive != nil {
+ return *m.StartInclusive
+ }
+ return false
+}
+
+func (m *CompiledQuery_PrimaryScan) GetEndKey() string {
+ if m != nil && m.EndKey != nil {
+ return *m.EndKey
+ }
+ return ""
+}
+
+func (m *CompiledQuery_PrimaryScan) GetEndInclusive() bool {
+ if m != nil && m.EndInclusive != nil {
+ return *m.EndInclusive
+ }
+ return false
+}
+
+func (m *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string {
+ if m != nil {
+ return m.StartPostfixValue
+ }
+ return nil
+}
+
+func (m *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string {
+ if m != nil {
+ return m.EndPostfixValue
+ }
+ return nil
+}
+
+func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 {
+ if m != nil && m.EndUnappliedLogTimestampUs != nil {
+ return *m.EndUnappliedLogTimestampUs
+ }
+ return 0
+}
+
+type CompiledQuery_MergeJoinScan struct {
+ IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"`
+ PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"`
+ ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} }
+func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) }
+func (*CompiledQuery_MergeJoinScan) ProtoMessage() {}
+func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1}
+}
+func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b)
+}
+func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic)
+}
+func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src)
+}
+func (m *CompiledQuery_MergeJoinScan) XXX_Size() int {
+ return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m)
+}
+func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo
+
+const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false
+
+func (m *CompiledQuery_MergeJoinScan) GetIndexName() string {
+ if m != nil && m.IndexName != nil {
+ return *m.IndexName
+ }
+ return ""
+}
+
+func (m *CompiledQuery_MergeJoinScan) GetPrefixValue() []string {
+ if m != nil {
+ return m.PrefixValue
+ }
+ return nil
+}
+
+func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool {
+ if m != nil && m.ValuePrefix != nil {
+ return *m.ValuePrefix
+ }
+ return Default_CompiledQuery_MergeJoinScan_ValuePrefix
+}
+
+type CompiledQuery_EntityFilter struct {
+ Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"`
+ Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"`
+ Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} }
+func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) }
+func (*CompiledQuery_EntityFilter) ProtoMessage() {}
+func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2}
+}
+func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b)
+}
+func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic)
+}
+func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src)
+}
+func (m *CompiledQuery_EntityFilter) XXX_Size() int {
+ return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m)
+}
+func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo
+
+const Default_CompiledQuery_EntityFilter_Distinct bool = false
+
+func (m *CompiledQuery_EntityFilter) GetDistinct() bool {
+ if m != nil && m.Distinct != nil {
+ return *m.Distinct
+ }
+ return Default_CompiledQuery_EntityFilter_Distinct
+}
+
+func (m *CompiledQuery_EntityFilter) GetKind() string {
+ if m != nil && m.Kind != nil {
+ return *m.Kind
+ }
+ return ""
+}
+
+func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference {
+ if m != nil {
+ return m.Ancestor
+ }
+ return nil
+}
+
+type CompiledCursor struct {
+ Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledCursor) Reset() { *m = CompiledCursor{} }
+func (m *CompiledCursor) String() string { return proto.CompactTextString(m) }
+func (*CompiledCursor) ProtoMessage() {}
+func (*CompiledCursor) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17}
+}
+func (m *CompiledCursor) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledCursor.Unmarshal(m, b)
+}
+func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic)
+}
+func (dst *CompiledCursor) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledCursor.Merge(dst, src)
+}
+func (m *CompiledCursor) XXX_Size() int {
+ return xxx_messageInfo_CompiledCursor.Size(m)
+}
+func (m *CompiledCursor) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledCursor.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo
+
+func (m *CompiledCursor) GetPosition() *CompiledCursor_Position {
+ if m != nil {
+ return m.Position
+ }
+ return nil
+}
+
+type CompiledCursor_Position struct {
+ StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"`
+ Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"`
+ Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"`
+ StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} }
+func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) }
+func (*CompiledCursor_Position) ProtoMessage() {}
+func (*CompiledCursor_Position) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0}
+}
+func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b)
+}
+func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic)
+}
+func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledCursor_Position.Merge(dst, src)
+}
+func (m *CompiledCursor_Position) XXX_Size() int {
+ return xxx_messageInfo_CompiledCursor_Position.Size(m)
+}
+func (m *CompiledCursor_Position) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo
+
+const Default_CompiledCursor_Position_StartInclusive bool = true
+
+func (m *CompiledCursor_Position) GetStartKey() string {
+ if m != nil && m.StartKey != nil {
+ return *m.StartKey
+ }
+ return ""
+}
+
+func (m *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue {
+ if m != nil {
+ return m.Indexvalue
+ }
+ return nil
+}
+
+func (m *CompiledCursor_Position) GetKey() *Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *CompiledCursor_Position) GetStartInclusive() bool {
+ if m != nil && m.StartInclusive != nil {
+ return *m.StartInclusive
+ }
+ return Default_CompiledCursor_Position_StartInclusive
+}
+
+type CompiledCursor_Position_IndexValue struct {
+ Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"`
+ Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} }
+func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) }
+func (*CompiledCursor_Position_IndexValue) ProtoMessage() {}
+func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0}
+}
+func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b)
+}
+func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic)
+}
+func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src)
+}
+func (m *CompiledCursor_Position_IndexValue) XXX_Size() int {
+ return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m)
+}
+func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo
+
+func (m *CompiledCursor_Position_IndexValue) GetProperty() string {
+ if m != nil && m.Property != nil {
+ return *m.Property
+ }
+ return ""
+}
+
+func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+type Cursor struct {
+ Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"`
+ App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Cursor) Reset() { *m = Cursor{} }
+func (m *Cursor) String() string { return proto.CompactTextString(m) }
+func (*Cursor) ProtoMessage() {}
+func (*Cursor) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18}
+}
+func (m *Cursor) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Cursor.Unmarshal(m, b)
+}
+func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Cursor.Marshal(b, m, deterministic)
+}
+func (dst *Cursor) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Cursor.Merge(dst, src)
+}
+func (m *Cursor) XXX_Size() int {
+ return xxx_messageInfo_Cursor.Size(m)
+}
+func (m *Cursor) XXX_DiscardUnknown() {
+ xxx_messageInfo_Cursor.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Cursor proto.InternalMessageInfo
+
+func (m *Cursor) GetCursor() uint64 {
+ if m != nil && m.Cursor != nil {
+ return *m.Cursor
+ }
+ return 0
+}
+
+func (m *Cursor) GetApp() string {
+ if m != nil && m.App != nil {
+ return *m.App
+ }
+ return ""
+}
+
+type Error struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Error) Reset() { *m = Error{} }
+func (m *Error) String() string { return proto.CompactTextString(m) }
+func (*Error) ProtoMessage() {}
+func (*Error) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19}
+}
+func (m *Error) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Error.Unmarshal(m, b)
+}
+func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Error.Marshal(b, m, deterministic)
+}
+func (dst *Error) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Error.Merge(dst, src)
+}
+func (m *Error) XXX_Size() int {
+ return xxx_messageInfo_Error.Size(m)
+}
+func (m *Error) XXX_DiscardUnknown() {
+ xxx_messageInfo_Error.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Error proto.InternalMessageInfo
+
+type Cost struct {
+ IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"`
+ IndexWriteBytes *int32 `protobuf:"varint,2,opt,name=index_write_bytes,json=indexWriteBytes" json:"index_write_bytes,omitempty"`
+ EntityWrites *int32 `protobuf:"varint,3,opt,name=entity_writes,json=entityWrites" json:"entity_writes,omitempty"`
+ EntityWriteBytes *int32 `protobuf:"varint,4,opt,name=entity_write_bytes,json=entityWriteBytes" json:"entity_write_bytes,omitempty"`
+ Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"`
+ ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"`
+ IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Cost) Reset() { *m = Cost{} }
+func (m *Cost) String() string { return proto.CompactTextString(m) }
+func (*Cost) ProtoMessage() {}
+func (*Cost) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20}
+}
+func (m *Cost) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Cost.Unmarshal(m, b)
+}
+func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Cost.Marshal(b, m, deterministic)
+}
+func (dst *Cost) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Cost.Merge(dst, src)
+}
+func (m *Cost) XXX_Size() int {
+ return xxx_messageInfo_Cost.Size(m)
+}
+func (m *Cost) XXX_DiscardUnknown() {
+ xxx_messageInfo_Cost.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Cost proto.InternalMessageInfo
+
+func (m *Cost) GetIndexWrites() int32 {
+ if m != nil && m.IndexWrites != nil {
+ return *m.IndexWrites
+ }
+ return 0
+}
+
+func (m *Cost) GetIndexWriteBytes() int32 {
+ if m != nil && m.IndexWriteBytes != nil {
+ return *m.IndexWriteBytes
+ }
+ return 0
+}
+
+func (m *Cost) GetEntityWrites() int32 {
+ if m != nil && m.EntityWrites != nil {
+ return *m.EntityWrites
+ }
+ return 0
+}
+
+func (m *Cost) GetEntityWriteBytes() int32 {
+ if m != nil && m.EntityWriteBytes != nil {
+ return *m.EntityWriteBytes
+ }
+ return 0
+}
+
+func (m *Cost) GetCommitcost() *Cost_CommitCost {
+ if m != nil {
+ return m.Commitcost
+ }
+ return nil
+}
+
+func (m *Cost) GetApproximateStorageDelta() int32 {
+ if m != nil && m.ApproximateStorageDelta != nil {
+ return *m.ApproximateStorageDelta
+ }
+ return 0
+}
+
+func (m *Cost) GetIdSequenceUpdates() int32 {
+ if m != nil && m.IdSequenceUpdates != nil {
+ return *m.IdSequenceUpdates
+ }
+ return 0
+}
+
+type Cost_CommitCost struct {
+ RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"`
+ RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} }
+func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) }
+func (*Cost_CommitCost) ProtoMessage() {}
+func (*Cost_CommitCost) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0}
+}
+func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b)
+}
+func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic)
+}
+func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Cost_CommitCost.Merge(dst, src)
+}
+func (m *Cost_CommitCost) XXX_Size() int {
+ return xxx_messageInfo_Cost_CommitCost.Size(m)
+}
+func (m *Cost_CommitCost) XXX_DiscardUnknown() {
+ xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo
+
+func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 {
+ if m != nil && m.RequestedEntityPuts != nil {
+ return *m.RequestedEntityPuts
+ }
+ return 0
+}
+
+func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 {
+ if m != nil && m.RequestedEntityDeletes != nil {
+ return *m.RequestedEntityDeletes
+ }
+ return 0
+}
+
+type GetRequest struct {
+ Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"`
+ Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
+ Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
+ FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"`
+ Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"`
+ AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetRequest) Reset() { *m = GetRequest{} }
+func (m *GetRequest) String() string { return proto.CompactTextString(m) }
+func (*GetRequest) ProtoMessage() {}
+func (*GetRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21}
+}
+func (m *GetRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetRequest.Unmarshal(m, b)
+}
+func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
+}
+func (dst *GetRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetRequest.Merge(dst, src)
+}
+func (m *GetRequest) XXX_Size() int {
+ return xxx_messageInfo_GetRequest.Size(m)
+}
+func (m *GetRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetRequest proto.InternalMessageInfo
+
+const Default_GetRequest_AllowDeferred bool = false
+
+func (m *GetRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *GetRequest) GetKey() []*Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *GetRequest) GetTransaction() *Transaction {
+ if m != nil {
+ return m.Transaction
+ }
+ return nil
+}
+
+func (m *GetRequest) GetFailoverMs() int64 {
+ if m != nil && m.FailoverMs != nil {
+ return *m.FailoverMs
+ }
+ return 0
+}
+
+func (m *GetRequest) GetStrong() bool {
+ if m != nil && m.Strong != nil {
+ return *m.Strong
+ }
+ return false
+}
+
+func (m *GetRequest) GetAllowDeferred() bool {
+ if m != nil && m.AllowDeferred != nil {
+ return *m.AllowDeferred
+ }
+ return Default_GetRequest_AllowDeferred
+}
+
+type GetResponse struct {
+ Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"`
+ Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"`
+ InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetResponse) Reset() { *m = GetResponse{} }
+func (m *GetResponse) String() string { return proto.CompactTextString(m) }
+func (*GetResponse) ProtoMessage() {}
+func (*GetResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22}
+}
+func (m *GetResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetResponse.Unmarshal(m, b)
+}
+func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic)
+}
+func (dst *GetResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetResponse.Merge(dst, src)
+}
+func (m *GetResponse) XXX_Size() int {
+ return xxx_messageInfo_GetResponse.Size(m)
+}
+func (m *GetResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetResponse proto.InternalMessageInfo
+
+const Default_GetResponse_InOrder bool = true
+
+func (m *GetResponse) GetEntity() []*GetResponse_Entity {
+ if m != nil {
+ return m.Entity
+ }
+ return nil
+}
+
+func (m *GetResponse) GetDeferred() []*Reference {
+ if m != nil {
+ return m.Deferred
+ }
+ return nil
+}
+
+func (m *GetResponse) GetInOrder() bool {
+ if m != nil && m.InOrder != nil {
+ return *m.InOrder
+ }
+ return Default_GetResponse_InOrder
+}
+
+type GetResponse_Entity struct {
+ Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"`
+ Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"`
+ Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} }
+func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) }
+func (*GetResponse_Entity) ProtoMessage() {}
+func (*GetResponse_Entity) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0}
+}
+func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b)
+}
+func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic)
+}
+func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetResponse_Entity.Merge(dst, src)
+}
+func (m *GetResponse_Entity) XXX_Size() int {
+ return xxx_messageInfo_GetResponse_Entity.Size(m)
+}
+func (m *GetResponse_Entity) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo
+
+func (m *GetResponse_Entity) GetEntity() *EntityProto {
+ if m != nil {
+ return m.Entity
+ }
+ return nil
+}
+
+func (m *GetResponse_Entity) GetKey() *Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *GetResponse_Entity) GetVersion() int64 {
+ if m != nil && m.Version != nil {
+ return *m.Version
+ }
+ return 0
+}
+
+type PutRequest struct {
+ Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"`
+ Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"`
+ Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
+ CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"`
+ Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"`
+ Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"`
+ MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"`
+ Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"`
+ AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PutRequest) Reset() { *m = PutRequest{} }
+func (m *PutRequest) String() string { return proto.CompactTextString(m) }
+func (*PutRequest) ProtoMessage() {}
+func (*PutRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23}
+}
+func (m *PutRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PutRequest.Unmarshal(m, b)
+}
+func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic)
+}
+func (dst *PutRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PutRequest.Merge(dst, src)
+}
+func (m *PutRequest) XXX_Size() int {
+ return xxx_messageInfo_PutRequest.Size(m)
+}
+func (m *PutRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PutRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PutRequest proto.InternalMessageInfo
+
+const Default_PutRequest_Trusted bool = false
+const Default_PutRequest_Force bool = false
+const Default_PutRequest_MarkChanges bool = false
+const Default_PutRequest_AutoIdPolicy PutRequest_AutoIdPolicy = PutRequest_CURRENT
+
+func (m *PutRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *PutRequest) GetEntity() []*EntityProto {
+ if m != nil {
+ return m.Entity
+ }
+ return nil
+}
+
+func (m *PutRequest) GetTransaction() *Transaction {
+ if m != nil {
+ return m.Transaction
+ }
+ return nil
+}
+
+func (m *PutRequest) GetCompositeIndex() []*CompositeIndex {
+ if m != nil {
+ return m.CompositeIndex
+ }
+ return nil
+}
+
+func (m *PutRequest) GetTrusted() bool {
+ if m != nil && m.Trusted != nil {
+ return *m.Trusted
+ }
+ return Default_PutRequest_Trusted
+}
+
+func (m *PutRequest) GetForce() bool {
+ if m != nil && m.Force != nil {
+ return *m.Force
+ }
+ return Default_PutRequest_Force
+}
+
+func (m *PutRequest) GetMarkChanges() bool {
+ if m != nil && m.MarkChanges != nil {
+ return *m.MarkChanges
+ }
+ return Default_PutRequest_MarkChanges
+}
+
+func (m *PutRequest) GetSnapshot() []*Snapshot {
+ if m != nil {
+ return m.Snapshot
+ }
+ return nil
+}
+
+func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy {
+ if m != nil && m.AutoIdPolicy != nil {
+ return *m.AutoIdPolicy
+ }
+ return Default_PutRequest_AutoIdPolicy
+}
+
+type PutResponse struct {
+ Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
+ Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"`
+ Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PutResponse) Reset() { *m = PutResponse{} }
+func (m *PutResponse) String() string { return proto.CompactTextString(m) }
+func (*PutResponse) ProtoMessage() {}
+func (*PutResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24}
+}
+func (m *PutResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PutResponse.Unmarshal(m, b)
+}
+func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic)
+}
+func (dst *PutResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PutResponse.Merge(dst, src)
+}
+func (m *PutResponse) XXX_Size() int {
+ return xxx_messageInfo_PutResponse.Size(m)
+}
+func (m *PutResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_PutResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PutResponse proto.InternalMessageInfo
+
+func (m *PutResponse) GetKey() []*Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *PutResponse) GetCost() *Cost {
+ if m != nil {
+ return m.Cost
+ }
+ return nil
+}
+
+func (m *PutResponse) GetVersion() []int64 {
+ if m != nil {
+ return m.Version
+ }
+ return nil
+}
+
+type TouchRequest struct {
+ Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"`
+ Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
+ CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"`
+ Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"`
+ Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *TouchRequest) Reset() { *m = TouchRequest{} }
+func (m *TouchRequest) String() string { return proto.CompactTextString(m) }
+func (*TouchRequest) ProtoMessage() {}
+func (*TouchRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25}
+}
+func (m *TouchRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TouchRequest.Unmarshal(m, b)
+}
+func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic)
+}
+func (dst *TouchRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TouchRequest.Merge(dst, src)
+}
+func (m *TouchRequest) XXX_Size() int {
+ return xxx_messageInfo_TouchRequest.Size(m)
+}
+func (m *TouchRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_TouchRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TouchRequest proto.InternalMessageInfo
+
+const Default_TouchRequest_Force bool = false
+
+func (m *TouchRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *TouchRequest) GetKey() []*Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *TouchRequest) GetCompositeIndex() []*CompositeIndex {
+ if m != nil {
+ return m.CompositeIndex
+ }
+ return nil
+}
+
+func (m *TouchRequest) GetForce() bool {
+ if m != nil && m.Force != nil {
+ return *m.Force
+ }
+ return Default_TouchRequest_Force
+}
+
+func (m *TouchRequest) GetSnapshot() []*Snapshot {
+ if m != nil {
+ return m.Snapshot
+ }
+ return nil
+}
+
+type TouchResponse struct {
+ Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *TouchResponse) Reset() { *m = TouchResponse{} }
+func (m *TouchResponse) String() string { return proto.CompactTextString(m) }
+func (*TouchResponse) ProtoMessage() {}
+func (*TouchResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26}
+}
+func (m *TouchResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TouchResponse.Unmarshal(m, b)
+}
+func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic)
+}
+func (dst *TouchResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TouchResponse.Merge(dst, src)
+}
+func (m *TouchResponse) XXX_Size() int {
+ return xxx_messageInfo_TouchResponse.Size(m)
+}
+func (m *TouchResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_TouchResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TouchResponse proto.InternalMessageInfo
+
+func (m *TouchResponse) GetCost() *Cost {
+ if m != nil {
+ return m.Cost
+ }
+ return nil
+}
+
+type DeleteRequest struct {
+ Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"`
+ Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"`
+ Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"`
+ Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"`
+ Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"`
+ MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"`
+ Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
+func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
+func (*DeleteRequest) ProtoMessage() {}
+func (*DeleteRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27}
+}
+func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DeleteRequest.Unmarshal(m, b)
+}
+func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
+}
+func (dst *DeleteRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteRequest.Merge(dst, src)
+}
+func (m *DeleteRequest) XXX_Size() int {
+ return xxx_messageInfo_DeleteRequest.Size(m)
+}
+func (m *DeleteRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
+
+const Default_DeleteRequest_Trusted bool = false
+const Default_DeleteRequest_Force bool = false
+const Default_DeleteRequest_MarkChanges bool = false
+
+func (m *DeleteRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *DeleteRequest) GetKey() []*Reference {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *DeleteRequest) GetTransaction() *Transaction {
+ if m != nil {
+ return m.Transaction
+ }
+ return nil
+}
+
+func (m *DeleteRequest) GetTrusted() bool {
+ if m != nil && m.Trusted != nil {
+ return *m.Trusted
+ }
+ return Default_DeleteRequest_Trusted
+}
+
+func (m *DeleteRequest) GetForce() bool {
+ if m != nil && m.Force != nil {
+ return *m.Force
+ }
+ return Default_DeleteRequest_Force
+}
+
+func (m *DeleteRequest) GetMarkChanges() bool {
+ if m != nil && m.MarkChanges != nil {
+ return *m.MarkChanges
+ }
+ return Default_DeleteRequest_MarkChanges
+}
+
+func (m *DeleteRequest) GetSnapshot() []*Snapshot {
+ if m != nil {
+ return m.Snapshot
+ }
+ return nil
+}
+
+type DeleteResponse struct {
+ Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"`
+ Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
+func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
+func (*DeleteResponse) ProtoMessage() {}
+func (*DeleteResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28}
+}
+func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DeleteResponse.Unmarshal(m, b)
+}
+func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic)
+}
+func (dst *DeleteResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteResponse.Merge(dst, src)
+}
+func (m *DeleteResponse) XXX_Size() int {
+ return xxx_messageInfo_DeleteResponse.Size(m)
+}
+func (m *DeleteResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
+
+func (m *DeleteResponse) GetCost() *Cost {
+ if m != nil {
+ return m.Cost
+ }
+ return nil
+}
+
+func (m *DeleteResponse) GetVersion() []int64 {
+ if m != nil {
+ return m.Version
+ }
+ return nil
+}
+
+type NextRequest struct {
+ Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"`
+ Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"`
+ Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
+ Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"`
+ Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *NextRequest) Reset() { *m = NextRequest{} }
+func (m *NextRequest) String() string { return proto.CompactTextString(m) }
+func (*NextRequest) ProtoMessage() {}
+func (*NextRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29}
+}
+func (m *NextRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_NextRequest.Unmarshal(m, b)
+}
+func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic)
+}
+func (dst *NextRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_NextRequest.Merge(dst, src)
+}
+func (m *NextRequest) XXX_Size() int {
+ return xxx_messageInfo_NextRequest.Size(m)
+}
+func (m *NextRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_NextRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_NextRequest proto.InternalMessageInfo
+
+const Default_NextRequest_Offset int32 = 0
+const Default_NextRequest_Compile bool = false
+
+func (m *NextRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *NextRequest) GetCursor() *Cursor {
+ if m != nil {
+ return m.Cursor
+ }
+ return nil
+}
+
+func (m *NextRequest) GetCount() int32 {
+ if m != nil && m.Count != nil {
+ return *m.Count
+ }
+ return 0
+}
+
+func (m *NextRequest) GetOffset() int32 {
+ if m != nil && m.Offset != nil {
+ return *m.Offset
+ }
+ return Default_NextRequest_Offset
+}
+
+func (m *NextRequest) GetCompile() bool {
+ if m != nil && m.Compile != nil {
+ return *m.Compile
+ }
+ return Default_NextRequest_Compile
+}
+
+type QueryResult struct {
+ Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"`
+ Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"`
+ SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"`
+ MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"`
+ KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"`
+ IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"`
+ SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"`
+ CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"`
+ CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"`
+ Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"`
+ Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *QueryResult) Reset() { *m = QueryResult{} }
+func (m *QueryResult) String() string { return proto.CompactTextString(m) }
+func (*QueryResult) ProtoMessage() {}
+func (*QueryResult) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30}
+}
+func (m *QueryResult) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_QueryResult.Unmarshal(m, b)
+}
+func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic)
+}
+func (dst *QueryResult) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryResult.Merge(dst, src)
+}
+func (m *QueryResult) XXX_Size() int {
+ return xxx_messageInfo_QueryResult.Size(m)
+}
+func (m *QueryResult) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryResult.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryResult proto.InternalMessageInfo
+
+func (m *QueryResult) GetCursor() *Cursor {
+ if m != nil {
+ return m.Cursor
+ }
+ return nil
+}
+
+func (m *QueryResult) GetResult() []*EntityProto {
+ if m != nil {
+ return m.Result
+ }
+ return nil
+}
+
+func (m *QueryResult) GetSkippedResults() int32 {
+ if m != nil && m.SkippedResults != nil {
+ return *m.SkippedResults
+ }
+ return 0
+}
+
+func (m *QueryResult) GetMoreResults() bool {
+ if m != nil && m.MoreResults != nil {
+ return *m.MoreResults
+ }
+ return false
+}
+
+func (m *QueryResult) GetKeysOnly() bool {
+ if m != nil && m.KeysOnly != nil {
+ return *m.KeysOnly
+ }
+ return false
+}
+
+func (m *QueryResult) GetIndexOnly() bool {
+ if m != nil && m.IndexOnly != nil {
+ return *m.IndexOnly
+ }
+ return false
+}
+
+func (m *QueryResult) GetSmallOps() bool {
+ if m != nil && m.SmallOps != nil {
+ return *m.SmallOps
+ }
+ return false
+}
+
+func (m *QueryResult) GetCompiledQuery() *CompiledQuery {
+ if m != nil {
+ return m.CompiledQuery
+ }
+ return nil
+}
+
+func (m *QueryResult) GetCompiledCursor() *CompiledCursor {
+ if m != nil {
+ return m.CompiledCursor
+ }
+ return nil
+}
+
+func (m *QueryResult) GetIndex() []*CompositeIndex {
+ if m != nil {
+ return m.Index
+ }
+ return nil
+}
+
+func (m *QueryResult) GetVersion() []int64 {
+ if m != nil {
+ return m.Version
+ }
+ return nil
+}
+
+type AllocateIdsRequest struct {
+ Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"`
+ ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"`
+ Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
+ Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"`
+ Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} }
+func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) }
+func (*AllocateIdsRequest) ProtoMessage() {}
+func (*AllocateIdsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31}
+}
+func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b)
+}
+func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic)
+}
+func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AllocateIdsRequest.Merge(dst, src)
+}
+func (m *AllocateIdsRequest) XXX_Size() int {
+ return xxx_messageInfo_AllocateIdsRequest.Size(m)
+}
+func (m *AllocateIdsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo
+
+func (m *AllocateIdsRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *AllocateIdsRequest) GetModelKey() *Reference {
+ if m != nil {
+ return m.ModelKey
+ }
+ return nil
+}
+
+func (m *AllocateIdsRequest) GetSize() int64 {
+ if m != nil && m.Size != nil {
+ return *m.Size
+ }
+ return 0
+}
+
+func (m *AllocateIdsRequest) GetMax() int64 {
+ if m != nil && m.Max != nil {
+ return *m.Max
+ }
+ return 0
+}
+
+func (m *AllocateIdsRequest) GetReserve() []*Reference {
+ if m != nil {
+ return m.Reserve
+ }
+ return nil
+}
+
+type AllocateIdsResponse struct {
+ Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"`
+ End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"`
+ Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} }
+func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) }
+func (*AllocateIdsResponse) ProtoMessage() {}
+func (*AllocateIdsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32}
+}
+func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b)
+}
+func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic)
+}
+func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AllocateIdsResponse.Merge(dst, src)
+}
+func (m *AllocateIdsResponse) XXX_Size() int {
+ return xxx_messageInfo_AllocateIdsResponse.Size(m)
+}
+func (m *AllocateIdsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo
+
+func (m *AllocateIdsResponse) GetStart() int64 {
+ if m != nil && m.Start != nil {
+ return *m.Start
+ }
+ return 0
+}
+
+func (m *AllocateIdsResponse) GetEnd() int64 {
+ if m != nil && m.End != nil {
+ return *m.End
+ }
+ return 0
+}
+
+func (m *AllocateIdsResponse) GetCost() *Cost {
+ if m != nil {
+ return m.Cost
+ }
+ return nil
+}
+
+type CompositeIndices struct {
+ Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CompositeIndices) Reset() { *m = CompositeIndices{} }
+func (m *CompositeIndices) String() string { return proto.CompactTextString(m) }
+func (*CompositeIndices) ProtoMessage() {}
+func (*CompositeIndices) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33}
+}
+func (m *CompositeIndices) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CompositeIndices.Unmarshal(m, b)
+}
+func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic)
+}
+func (dst *CompositeIndices) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CompositeIndices.Merge(dst, src)
+}
+func (m *CompositeIndices) XXX_Size() int {
+ return xxx_messageInfo_CompositeIndices.Size(m)
+}
+func (m *CompositeIndices) XXX_DiscardUnknown() {
+ xxx_messageInfo_CompositeIndices.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo
+
+func (m *CompositeIndices) GetIndex() []*CompositeIndex {
+ if m != nil {
+ return m.Index
+ }
+ return nil
+}
+
+type AddActionsRequest struct {
+ Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"`
+ Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"`
+ Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} }
+func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) }
+func (*AddActionsRequest) ProtoMessage() {}
+func (*AddActionsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34}
+}
+func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b)
+}
+func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic)
+}
+func (dst *AddActionsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AddActionsRequest.Merge(dst, src)
+}
+func (m *AddActionsRequest) XXX_Size() int {
+ return xxx_messageInfo_AddActionsRequest.Size(m)
+}
+func (m *AddActionsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_AddActionsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo
+
+func (m *AddActionsRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *AddActionsRequest) GetTransaction() *Transaction {
+ if m != nil {
+ return m.Transaction
+ }
+ return nil
+}
+
+func (m *AddActionsRequest) GetAction() []*Action {
+ if m != nil {
+ return m.Action
+ }
+ return nil
+}
+
+type AddActionsResponse struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} }
+func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) }
+func (*AddActionsResponse) ProtoMessage() {}
+func (*AddActionsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35}
+}
+func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b)
+}
+func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic)
+}
+func (dst *AddActionsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AddActionsResponse.Merge(dst, src)
+}
+func (m *AddActionsResponse) XXX_Size() int {
+ return xxx_messageInfo_AddActionsResponse.Size(m)
+}
+func (m *AddActionsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_AddActionsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo
+
+type BeginTransactionRequest struct {
+ Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"`
+ App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"`
+ AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"`
+ DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"`
+ Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"`
+ PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} }
+func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) }
+func (*BeginTransactionRequest) ProtoMessage() {}
+func (*BeginTransactionRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36}
+}
+func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b)
+}
+func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic)
+}
+func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_BeginTransactionRequest.Merge(dst, src)
+}
+func (m *BeginTransactionRequest) XXX_Size() int {
+ return xxx_messageInfo_BeginTransactionRequest.Size(m)
+}
+func (m *BeginTransactionRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo
+
+const Default_BeginTransactionRequest_AllowMultipleEg bool = false
+const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN
+
+func (m *BeginTransactionRequest) GetHeader() *InternalHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *BeginTransactionRequest) GetApp() string {
+ if m != nil && m.App != nil {
+ return *m.App
+ }
+ return ""
+}
+
+func (m *BeginTransactionRequest) GetAllowMultipleEg() bool {
+ if m != nil && m.AllowMultipleEg != nil {
+ return *m.AllowMultipleEg
+ }
+ return Default_BeginTransactionRequest_AllowMultipleEg
+}
+
+func (m *BeginTransactionRequest) GetDatabaseId() string {
+ if m != nil && m.DatabaseId != nil {
+ return *m.DatabaseId
+ }
+ return ""
+}
+
+func (m *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode {
+ if m != nil && m.Mode != nil {
+ return *m.Mode
+ }
+ return Default_BeginTransactionRequest_Mode
+}
+
+func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction {
+ if m != nil {
+ return m.PreviousTransaction
+ }
+ return nil
+}
+
+type CommitResponse struct {
+ Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"`
+ Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CommitResponse) Reset() { *m = CommitResponse{} }
+func (m *CommitResponse) String() string { return proto.CompactTextString(m) }
+func (*CommitResponse) ProtoMessage() {}
+func (*CommitResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37}
+}
+func (m *CommitResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CommitResponse.Unmarshal(m, b)
+}
+func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic)
+}
+func (dst *CommitResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CommitResponse.Merge(dst, src)
+}
+func (m *CommitResponse) XXX_Size() int {
+ return xxx_messageInfo_CommitResponse.Size(m)
+}
+func (m *CommitResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CommitResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CommitResponse proto.InternalMessageInfo
+
+func (m *CommitResponse) GetCost() *Cost {
+ if m != nil {
+ return m.Cost
+ }
+ return nil
+}
+
+func (m *CommitResponse) GetVersion() []*CommitResponse_Version {
+ if m != nil {
+ return m.Version
+ }
+ return nil
+}
+
+type CommitResponse_Version struct {
+ RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"`
+ Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} }
+func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) }
+func (*CommitResponse_Version) ProtoMessage() {}
+func (*CommitResponse_Version) Descriptor() ([]byte, []int) {
+ return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0}
+}
+func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b)
+}
+func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic)
+}
+func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CommitResponse_Version.Merge(dst, src)
+}
+func (m *CommitResponse_Version) XXX_Size() int {
+ return xxx_messageInfo_CommitResponse_Version.Size(m)
+}
+func (m *CommitResponse_Version) XXX_DiscardUnknown() {
+ xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo
+
+func (m *CommitResponse_Version) GetRootEntityKey() *Reference {
+ if m != nil {
+ return m.RootEntityKey
+ }
+ return nil
+}
+
+func (m *CommitResponse_Version) GetVersion() int64 {
+ if m != nil && m.Version != nil {
+ return *m.Version
+ }
+ return 0
+}
+
+func init() {
+ proto.RegisterType((*Action)(nil), "appengine.Action")
+ proto.RegisterType((*PropertyValue)(nil), "appengine.PropertyValue")
+ proto.RegisterType((*PropertyValue_PointValue)(nil), "appengine.PropertyValue.PointValue")
+ proto.RegisterType((*PropertyValue_UserValue)(nil), "appengine.PropertyValue.UserValue")
+ proto.RegisterType((*PropertyValue_ReferenceValue)(nil), "appengine.PropertyValue.ReferenceValue")
+ proto.RegisterType((*PropertyValue_ReferenceValue_PathElement)(nil), "appengine.PropertyValue.ReferenceValue.PathElement")
+ proto.RegisterType((*Property)(nil), "appengine.Property")
+ proto.RegisterType((*Path)(nil), "appengine.Path")
+ proto.RegisterType((*Path_Element)(nil), "appengine.Path.Element")
+ proto.RegisterType((*Reference)(nil), "appengine.Reference")
+ proto.RegisterType((*User)(nil), "appengine.User")
+ proto.RegisterType((*EntityProto)(nil), "appengine.EntityProto")
+ proto.RegisterType((*CompositeProperty)(nil), "appengine.CompositeProperty")
+ proto.RegisterType((*Index)(nil), "appengine.Index")
+ proto.RegisterType((*Index_Property)(nil), "appengine.Index.Property")
+ proto.RegisterType((*CompositeIndex)(nil), "appengine.CompositeIndex")
+ proto.RegisterType((*IndexPostfix)(nil), "appengine.IndexPostfix")
+ proto.RegisterType((*IndexPostfix_IndexValue)(nil), "appengine.IndexPostfix.IndexValue")
+ proto.RegisterType((*IndexPosition)(nil), "appengine.IndexPosition")
+ proto.RegisterType((*Snapshot)(nil), "appengine.Snapshot")
+ proto.RegisterType((*InternalHeader)(nil), "appengine.InternalHeader")
+ proto.RegisterType((*Transaction)(nil), "appengine.Transaction")
+ proto.RegisterType((*Query)(nil), "appengine.Query")
+ proto.RegisterType((*Query_Filter)(nil), "appengine.Query.Filter")
+ proto.RegisterType((*Query_Order)(nil), "appengine.Query.Order")
+ proto.RegisterType((*CompiledQuery)(nil), "appengine.CompiledQuery")
+ proto.RegisterType((*CompiledQuery_PrimaryScan)(nil), "appengine.CompiledQuery.PrimaryScan")
+ proto.RegisterType((*CompiledQuery_MergeJoinScan)(nil), "appengine.CompiledQuery.MergeJoinScan")
+ proto.RegisterType((*CompiledQuery_EntityFilter)(nil), "appengine.CompiledQuery.EntityFilter")
+ proto.RegisterType((*CompiledCursor)(nil), "appengine.CompiledCursor")
+ proto.RegisterType((*CompiledCursor_Position)(nil), "appengine.CompiledCursor.Position")
+ proto.RegisterType((*CompiledCursor_Position_IndexValue)(nil), "appengine.CompiledCursor.Position.IndexValue")
+ proto.RegisterType((*Cursor)(nil), "appengine.Cursor")
+ proto.RegisterType((*Error)(nil), "appengine.Error")
+ proto.RegisterType((*Cost)(nil), "appengine.Cost")
+ proto.RegisterType((*Cost_CommitCost)(nil), "appengine.Cost.CommitCost")
+ proto.RegisterType((*GetRequest)(nil), "appengine.GetRequest")
+ proto.RegisterType((*GetResponse)(nil), "appengine.GetResponse")
+ proto.RegisterType((*GetResponse_Entity)(nil), "appengine.GetResponse.Entity")
+ proto.RegisterType((*PutRequest)(nil), "appengine.PutRequest")
+ proto.RegisterType((*PutResponse)(nil), "appengine.PutResponse")
+ proto.RegisterType((*TouchRequest)(nil), "appengine.TouchRequest")
+ proto.RegisterType((*TouchResponse)(nil), "appengine.TouchResponse")
+ proto.RegisterType((*DeleteRequest)(nil), "appengine.DeleteRequest")
+ proto.RegisterType((*DeleteResponse)(nil), "appengine.DeleteResponse")
+ proto.RegisterType((*NextRequest)(nil), "appengine.NextRequest")
+ proto.RegisterType((*QueryResult)(nil), "appengine.QueryResult")
+ proto.RegisterType((*AllocateIdsRequest)(nil), "appengine.AllocateIdsRequest")
+ proto.RegisterType((*AllocateIdsResponse)(nil), "appengine.AllocateIdsResponse")
+ proto.RegisterType((*CompositeIndices)(nil), "appengine.CompositeIndices")
+ proto.RegisterType((*AddActionsRequest)(nil), "appengine.AddActionsRequest")
+ proto.RegisterType((*AddActionsResponse)(nil), "appengine.AddActionsResponse")
+ proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest")
+ proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse")
+ proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version")
+}
+
+func init() {
+ proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179)
+}
+
+var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{
+ // 4156 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46,
+ 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d,
+ 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4a, 0x76, 0x1d, 0x4a, 0xc4, 0x68, 0x90, 0xa1, 0x48,
+ 0xb9, 0x09, 0xd9, 0x9e, 0x5c, 0x50, 0x18, 0xa2, 0x29, 0x21, 0x43, 0x02, 0x30, 0x00, 0x6a, 0x46,
+ 0x93, 0xe4, 0x90, 0x4b, 0x2a, 0x55, 0x5b, 0xa9, 0x1c, 0x92, 0x4a, 0x25, 0xf9, 0x07, 0x72, 0xc8,
+ 0x39, 0x95, 0xaa, 0x54, 0xf6, 0x98, 0x5b, 0x0e, 0x7b, 0xc9, 0x31, 0x95, 0x73, 0xf2, 0x27, 0x24,
+ 0x39, 0xa4, 0xfa, 0x75, 0x03, 0x02, 0x28, 0x4a, 0x23, 0x6d, 0xf6, 0x90, 0x13, 0xd1, 0xef, 0xfd,
+ 0xba, 0xf1, 0xfa, 0xf5, 0xfb, 0x6c, 0x10, 0xba, 0xc7, 0xbe, 0x7f, 0x3c, 0x65, 0x9d, 0x63, 0x7f,
+ 0x6a, 0x7b, 0xc7, 0x1d, 0x3f, 0x3c, 0x7e, 0x68, 0x07, 0x01, 0xf3, 0x8e, 0x5d, 0x8f, 0x3d, 0x74,
+ 0xbd, 0x98, 0x85, 0x9e, 0x3d, 0x7d, 0xe8, 0xd8, 0xb1, 0x1d, 0xc5, 0x7e, 0xc8, 0xce, 0x9f, 0xac,
+ 0xd3, 0xcf, 0x3b, 0x41, 0xe8, 0xc7, 0x3e, 0xa9, 0xa7, 0x13, 0xb4, 0x1a, 0x54, 0xba, 0xe3, 0xd8,
+ 0xf5, 0x3d, 0xed, 0x1f, 0x2b, 0xb0, 0x7a, 0x18, 0xfa, 0x01, 0x0b, 0xe3, 0xb3, 0x6f, 0xed, 0xe9,
+ 0x9c, 0x91, 0x77, 0x00, 0x5c, 0x2f, 0xfe, 0xea, 0x0b, 0x1c, 0xb5, 0x0a, 0x9b, 0x85, 0xad, 0x22,
+ 0xcd, 0x50, 0x88, 0x06, 0x2b, 0xcf, 0x7c, 0x7f, 0xca, 0x6c, 0x4f, 0x20, 0x94, 0xcd, 0xc2, 0x56,
+ 0x8d, 0xe6, 0x68, 0x64, 0x13, 0x1a, 0x51, 0x1c, 0xba, 0xde, 0xb1, 0x80, 0x14, 0x37, 0x0b, 0x5b,
+ 0x75, 0x9a, 0x25, 0x71, 0x84, 0xe3, 0xcf, 0x9f, 0x4d, 0x99, 0x40, 0x94, 0x36, 0x0b, 0x5b, 0x05,
+ 0x9a, 0x25, 0x91, 0x3d, 0x80, 0xc0, 0x77, 0xbd, 0xf8, 0x14, 0x01, 0xe5, 0xcd, 0xc2, 0x16, 0x6c,
+ 0x3f, 0xe8, 0xa4, 0x7b, 0xe8, 0xe4, 0xa4, 0xee, 0x1c, 0x72, 0x28, 0x3e, 0xd2, 0xcc, 0x34, 0xf2,
+ 0xdb, 0x50, 0x9f, 0x47, 0x2c, 0x14, 0x6b, 0xd4, 0x70, 0x0d, 0xed, 0xd2, 0x35, 0x8e, 0x22, 0x16,
+ 0x8a, 0x25, 0xce, 0x27, 0x91, 0x21, 0x34, 0x43, 0x36, 0x61, 0x21, 0xf3, 0xc6, 0x4c, 0x2c, 0xb3,
+ 0x82, 0xcb, 0x7c, 0x70, 0xe9, 0x32, 0x34, 0x81, 0x8b, 0xb5, 0x16, 0xa6, 0xb7, 0xb7, 0x00, 0xce,
+ 0x85, 0x25, 0x2b, 0x50, 0x78, 0xd9, 0xaa, 0x6c, 0x2a, 0x5b, 0x05, 0x5a, 0x78, 0xc9, 0x47, 0x67,
+ 0xad, 0xaa, 0x18, 0x9d, 0xb5, 0xff, 0xa9, 0x00, 0xf5, 0x54, 0x26, 0x72, 0x0b, 0xca, 0x6c, 0x66,
+ 0xbb, 0xd3, 0x56, 0x7d, 0x53, 0xd9, 0xaa, 0x53, 0x31, 0x20, 0xf7, 0xa1, 0x61, 0xcf, 0xe3, 0x13,
+ 0xcb, 0xf1, 0x67, 0xb6, 0xeb, 0xb5, 0x00, 0x79, 0xc0, 0x49, 0x3d, 0xa4, 0x90, 0x36, 0xd4, 0x3c,
+ 0x77, 0xfc, 0xdc, 0xb3, 0x67, 0xac, 0xd5, 0xc0, 0x73, 0x48, 0xc7, 0xe4, 0x13, 0x20, 0x13, 0xe6,
+ 0xb0, 0xd0, 0x8e, 0x99, 0x63, 0xb9, 0x0e, 0xf3, 0x62, 0x37, 0x3e, 0x6b, 0xdd, 0x46, 0xd4, 0x7a,
+ 0xca, 0x31, 0x24, 0x23, 0x0f, 0x0f, 0x42, 0xff, 0xd4, 0x75, 0x58, 0xd8, 0xba, 0xb3, 0x00, 0x3f,
+ 0x94, 0x8c, 0xf6, 0xbf, 0x17, 0xa0, 0x99, 0xd7, 0x05, 0x51, 0xa1, 0x68, 0x07, 0x41, 0x6b, 0x15,
+ 0xa5, 0xe4, 0x8f, 0xe4, 0x6d, 0x00, 0x2e, 0x8a, 0x15, 0x05, 0xf6, 0x98, 0xb5, 0x6e, 0xe1, 0x5a,
+ 0x75, 0x4e, 0x19, 0x71, 0x02, 0x39, 0x82, 0x46, 0x60, 0xc7, 0x27, 0x6c, 0xca, 0x66, 0xcc, 0x8b,
+ 0x5b, 0xcd, 0xcd, 0xe2, 0x16, 0x6c, 0x7f, 0x7e, 0x4d, 0xd5, 0x77, 0x0e, 0xed, 0xf8, 0x44, 0x17,
+ 0x53, 0x69, 0x76, 0x9d, 0xb6, 0x0e, 0x8d, 0x0c, 0x8f, 0x10, 0x28, 0xc5, 0x67, 0x01, 0x6b, 0xad,
+ 0xa1, 0x5c, 0xf8, 0x4c, 0x9a, 0xa0, 0xb8, 0x4e, 0x4b, 0x45, 0xf3, 0x57, 0x5c, 0x87, 0x63, 0x50,
+ 0x87, 0xeb, 0x28, 0x22, 0x3e, 0x6b, 0xff, 0x51, 0x86, 0x5a, 0x22, 0x00, 0xe9, 0x42, 0x75, 0xc6,
+ 0x6c, 0xcf, 0xf5, 0x8e, 0xd1, 0x69, 0x9a, 0xdb, 0x6f, 0x2e, 0x11, 0xb3, 0x73, 0x20, 0x20, 0x3b,
+ 0x30, 0x18, 0x5a, 0x07, 0x7a, 0x77, 0x60, 0x0c, 0xf6, 0x69, 0x32, 0x8f, 0x1f, 0xa6, 0x7c, 0xb4,
+ 0xe6, 0xa1, 0x8b, 0x9e, 0x55, 0xa7, 0x20, 0x49, 0x47, 0xa1, 0x9b, 0x0a, 0x51, 0x14, 0x82, 0xe2,
+ 0x21, 0x76, 0xa0, 0x9c, 0xb8, 0x88, 0xb2, 0xd5, 0xd8, 0x6e, 0x5d, 0xa6, 0x1c, 0x2a, 0x60, 0xdc,
+ 0x20, 0x66, 0xf3, 0x69, 0xec, 0x06, 0x53, 0xee, 0x76, 0xca, 0x56, 0x8d, 0xa6, 0x63, 0xf2, 0x1e,
+ 0x40, 0xc4, 0xec, 0x70, 0x7c, 0x62, 0x3f, 0x9b, 0xb2, 0x56, 0x85, 0x7b, 0xf6, 0x4e, 0x79, 0x62,
+ 0x4f, 0x23, 0x46, 0x33, 0x0c, 0x62, 0xc3, 0xdd, 0x49, 0x1c, 0x59, 0xb1, 0xff, 0x9c, 0x79, 0xee,
+ 0x2b, 0x9b, 0x07, 0x12, 0xcb, 0x0f, 0xf8, 0x0f, 0xfa, 0x58, 0x73, 0xfb, 0xc3, 0x65, 0x5b, 0x7f,
+ 0x14, 0x47, 0x66, 0x66, 0xc6, 0x10, 0x27, 0xd0, 0xdb, 0x93, 0x65, 0x64, 0xd2, 0x86, 0xca, 0xd4,
+ 0x1f, 0xdb, 0x53, 0xd6, 0xaa, 0x73, 0x2d, 0xec, 0x28, 0xcc, 0xa3, 0x92, 0xa2, 0xfd, 0xb3, 0x02,
+ 0x55, 0xa9, 0x47, 0xd2, 0x84, 0x8c, 0x26, 0xd5, 0x37, 0x48, 0x0d, 0x4a, 0xbb, 0xfd, 0xe1, 0xae,
+ 0xda, 0xe4, 0x4f, 0xa6, 0xfe, 0xbd, 0xa9, 0xae, 0x71, 0xcc, 0xee, 0x53, 0x53, 0x1f, 0x99, 0x94,
+ 0x63, 0x54, 0xb2, 0x0e, 0xab, 0x5d, 0x73, 0x78, 0x60, 0xed, 0x75, 0x4d, 0x7d, 0x7f, 0x48, 0x9f,
+ 0xaa, 0x05, 0xb2, 0x0a, 0x75, 0x24, 0xf5, 0x8d, 0xc1, 0x13, 0x55, 0xe1, 0x33, 0x70, 0x68, 0x1a,
+ 0x66, 0x5f, 0x57, 0x8b, 0x44, 0x85, 0x15, 0x31, 0x63, 0x38, 0x30, 0xf5, 0x81, 0xa9, 0x96, 0x52,
+ 0xca, 0xe8, 0xe8, 0xe0, 0xa0, 0x4b, 0x9f, 0xaa, 0x65, 0xb2, 0x06, 0x0d, 0xa4, 0x74, 0x8f, 0xcc,
+ 0xc7, 0x43, 0xaa, 0x56, 0x48, 0x03, 0xaa, 0xfb, 0x3d, 0xeb, 0xbb, 0xc7, 0xfa, 0x40, 0xad, 0x92,
+ 0x15, 0xa8, 0xed, 0xf7, 0x2c, 0xfd, 0xa0, 0x6b, 0xf4, 0xd5, 0x1a, 0x9f, 0xbd, 0xaf, 0x0f, 0xe9,
+ 0x68, 0x64, 0x1d, 0x0e, 0x8d, 0x81, 0xa9, 0xd6, 0x49, 0x1d, 0xca, 0xfb, 0x3d, 0xcb, 0x38, 0x50,
+ 0x81, 0x10, 0x68, 0xee, 0xf7, 0xac, 0xc3, 0xc7, 0xc3, 0x81, 0x3e, 0x38, 0x3a, 0xd8, 0xd5, 0xa9,
+ 0xda, 0x20, 0xb7, 0x40, 0xe5, 0xb4, 0xe1, 0xc8, 0xec, 0xf6, 0xbb, 0xbd, 0x1e, 0xd5, 0x47, 0x23,
+ 0x75, 0x85, 0x4b, 0xbd, 0xdf, 0xb3, 0x68, 0xd7, 0xe4, 0xfb, 0x5a, 0xe5, 0x2f, 0xe4, 0x7b, 0x7f,
+ 0xa2, 0x3f, 0x55, 0xd7, 0xf9, 0x2b, 0xf4, 0x81, 0x69, 0x98, 0x4f, 0xad, 0x43, 0x3a, 0x34, 0x87,
+ 0xea, 0x06, 0x17, 0xd0, 0x18, 0xf4, 0xf4, 0xef, 0xad, 0x6f, 0xbb, 0xfd, 0x23, 0x5d, 0x25, 0xda,
+ 0x8f, 0xe1, 0xf6, 0xd2, 0x33, 0xe1, 0xaa, 0x7b, 0x6c, 0x1e, 0xf4, 0xd5, 0x02, 0x7f, 0xe2, 0x9b,
+ 0x52, 0x15, 0xed, 0x0f, 0xa0, 0xc4, 0x5d, 0x86, 0x7c, 0x06, 0xd5, 0xc4, 0x1b, 0x0b, 0xe8, 0x8d,
+ 0x77, 0xb3, 0x67, 0x6d, 0xc7, 0x27, 0x9d, 0xc4, 0xe3, 0x12, 0x5c, 0xbb, 0x0b, 0xd5, 0x45, 0x4f,
+ 0x53, 0x2e, 0x78, 0x5a, 0xf1, 0x82, 0xa7, 0x95, 0x32, 0x9e, 0x66, 0x43, 0x3d, 0xf5, 0xed, 0x9b,
+ 0x47, 0x91, 0x07, 0x50, 0xe2, 0xde, 0xdf, 0x6a, 0xa2, 0x87, 0xac, 0x2d, 0x08, 0x4c, 0x91, 0xa9,
+ 0xfd, 0x43, 0x01, 0x4a, 0x3c, 0xda, 0x9e, 0x07, 0xda, 0xc2, 0x15, 0x81, 0x56, 0xb9, 0x32, 0xd0,
+ 0x16, 0xaf, 0x15, 0x68, 0x2b, 0x37, 0x0b, 0xb4, 0xd5, 0x4b, 0x02, 0xad, 0xf6, 0x67, 0x45, 0x68,
+ 0xe8, 0x38, 0xf3, 0x10, 0x13, 0xfd, 0xfb, 0x50, 0x7c, 0xce, 0xce, 0x50, 0x3f, 0x8d, 0xed, 0x5b,
+ 0x99, 0xdd, 0xa6, 0x2a, 0xa4, 0x1c, 0x40, 0xb6, 0x61, 0x45, 0xbc, 0xd0, 0x3a, 0x0e, 0xfd, 0x79,
+ 0xd0, 0x52, 0x97, 0xab, 0xa7, 0x21, 0x40, 0xfb, 0x1c, 0x43, 0xde, 0x83, 0xb2, 0xff, 0xc2, 0x63,
+ 0x21, 0xc6, 0xc1, 0x3c, 0x98, 0x2b, 0x8f, 0x0a, 0x2e, 0x79, 0x08, 0xa5, 0xe7, 0xae, 0xe7, 0xe0,
+ 0x19, 0xe6, 0x23, 0x61, 0x46, 0xd0, 0xce, 0x13, 0xd7, 0x73, 0x28, 0x02, 0xc9, 0x3d, 0xa8, 0xf1,
+ 0x5f, 0x8c, 0x7b, 0x65, 0xdc, 0x68, 0x95, 0x8f, 0x79, 0xd0, 0x7b, 0x08, 0xb5, 0x40, 0xc6, 0x10,
+ 0x4c, 0x00, 0x8d, 0xed, 0x8d, 0x25, 0xe1, 0x85, 0xa6, 0x20, 0xf2, 0x15, 0xac, 0x84, 0xf6, 0x0b,
+ 0x2b, 0x9d, 0xb4, 0x76, 0xf9, 0xa4, 0x46, 0x68, 0xbf, 0x48, 0x23, 0x38, 0x81, 0x52, 0x68, 0x7b,
+ 0xcf, 0x5b, 0x64, 0xb3, 0xb0, 0x55, 0xa6, 0xf8, 0xac, 0x7d, 0x01, 0x25, 0x2e, 0x25, 0x8f, 0x08,
+ 0xfb, 0x3d, 0xf4, 0xff, 0xee, 0x9e, 0xa9, 0x16, 0x12, 0x7f, 0xfe, 0x96, 0x47, 0x03, 0x45, 0x72,
+ 0x0f, 0xf4, 0xd1, 0xa8, 0xbb, 0xaf, 0xab, 0x45, 0xad, 0x07, 0xeb, 0x7b, 0xfe, 0x2c, 0xf0, 0x23,
+ 0x37, 0x66, 0xe9, 0xf2, 0xf7, 0xa0, 0xe6, 0x7a, 0x0e, 0x7b, 0x69, 0xb9, 0x0e, 0x9a, 0x56, 0x91,
+ 0x56, 0x71, 0x6c, 0x38, 0xdc, 0xe4, 0x4e, 0x65, 0x31, 0x55, 0xe4, 0x26, 0x87, 0x03, 0xed, 0x2f,
+ 0x15, 0x28, 0x1b, 0x1c, 0xc1, 0x8d, 0x4f, 0x9e, 0x14, 0x7a, 0x8f, 0x30, 0x4c, 0x10, 0x24, 0x93,
+ 0xfb, 0x50, 0x1b, 0x6a, 0xb6, 0x37, 0x66, 0xbc, 0xe2, 0xc3, 0x3c, 0x50, 0xa3, 0xe9, 0x98, 0x7c,
+ 0x99, 0xd1, 0x9f, 0x82, 0x2e, 0x7b, 0x2f, 0xa3, 0x0a, 0x7c, 0xc1, 0x12, 0x2d, 0xb6, 0xff, 0xaa,
+ 0x90, 0x49, 0x6e, 0xcb, 0x12, 0x4f, 0x1f, 0xea, 0x8e, 0x1b, 0x32, 0xac, 0x23, 0xe5, 0x41, 0x3f,
+ 0xb8, 0x74, 0xe1, 0x4e, 0x2f, 0x81, 0xee, 0xd4, 0xbb, 0xa3, 0x3d, 0x7d, 0xd0, 0xe3, 0x99, 0xef,
+ 0x7c, 0x01, 0xed, 0x23, 0xa8, 0xa7, 0x10, 0x0c, 0xc7, 0x09, 0x48, 0x2d, 0x70, 0xf5, 0xf6, 0xf4,
+ 0x74, 0xac, 0x68, 0x7f, 0xad, 0x40, 0x33, 0xd5, 0xaf, 0xd0, 0xd0, 0x6d, 0xa8, 0xd8, 0x41, 0x90,
+ 0xa8, 0xb6, 0x4e, 0xcb, 0x76, 0x10, 0x18, 0x8e, 0x8c, 0x2d, 0x0a, 0x6a, 0x9b, 0xc7, 0x96, 0x4f,
+ 0x01, 0x1c, 0x36, 0x71, 0x3d, 0x17, 0x85, 0x2e, 0xa2, 0xc1, 0xab, 0x8b, 0x42, 0xd3, 0x0c, 0x86,
+ 0x7c, 0x09, 0xe5, 0x28, 0xb6, 0x63, 0x91, 0x2b, 0x9b, 0xdb, 0xf7, 0x33, 0xe0, 0xbc, 0x08, 0x9d,
+ 0x11, 0x87, 0x51, 0x81, 0x26, 0x5f, 0xc1, 0x2d, 0xdf, 0x9b, 0x9e, 0x59, 0xf3, 0x88, 0x59, 0xee,
+ 0xc4, 0x0a, 0xd9, 0x0f, 0x73, 0x37, 0x64, 0x4e, 0x3e, 0xa7, 0xae, 0x73, 0xc8, 0x51, 0xc4, 0x8c,
+ 0x09, 0x95, 0x7c, 0xed, 0x6b, 0x28, 0xe3, 0x3a, 0x7c, 0xcf, 0xdf, 0x51, 0xc3, 0xd4, 0xad, 0xe1,
+ 0xa0, 0xff, 0x54, 0xe8, 0x80, 0xea, 0xdd, 0x9e, 0x85, 0x44, 0x55, 0xe1, 0xc1, 0xbe, 0xa7, 0xf7,
+ 0x75, 0x53, 0xef, 0xa9, 0x45, 0x9e, 0x3d, 0x74, 0x4a, 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80,
+ 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c,
+ 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21,
+ 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6,
+ 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26,
+ 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba,
+ 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c,
+ 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2,
+ 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8,
+ 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90,
+ 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91,
+ 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58,
+ 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c,
+ 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b,
+ 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f,
+ 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02,
+ 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22,
+ 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b,
+ 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0,
+ 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18,
+ 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8,
+ 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b,
+ 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e,
+ 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 0xa7, 0x54, 0x12, 0xf8, 0x84,
+ 0xa9, 0x3b, 0x73, 0x63, 0xec, 0x43, 0xca, 0x54, 0x0c, 0xc8, 0x2e, 0xac, 0x8d, 0xfd, 0x59, 0xe0,
+ 0x4e, 0x99, 0x63, 0x8d, 0xe7, 0x61, 0xe4, 0x87, 0xad, 0x77, 0x2e, 0x1c, 0xd3, 0x9e, 0x44, 0xec,
+ 0x21, 0x80, 0x36, 0xc7, 0xb9, 0x31, 0x31, 0x60, 0x83, 0x79, 0x8e, 0xb5, 0xb8, 0xce, 0xfd, 0xd7,
+ 0xad, 0xb3, 0xce, 0x3c, 0x27, 0x4f, 0x4a, 0xc4, 0xc1, 0x48, 0x68, 0x61, 0xcc, 0x68, 0x6d, 0x60,
+ 0x90, 0xb9, 0x77, 0x69, 0xac, 0x14, 0xe2, 0x64, 0xc2, 0xf7, 0x6f, 0xc0, 0x2d, 0x19, 0x22, 0xad,
+ 0x80, 0x85, 0x13, 0x36, 0x8e, 0xad, 0x60, 0x6a, 0x7b, 0x58, 0xca, 0xa5, 0xc6, 0x4a, 0x24, 0xe4,
+ 0x50, 0x20, 0x0e, 0xa7, 0xb6, 0x47, 0x34, 0xa8, 0x3f, 0x67, 0x67, 0x91, 0xc5, 0x23, 0x29, 0x76,
+ 0xae, 0x29, 0xba, 0xc6, 0xe9, 0x43, 0x6f, 0x7a, 0x46, 0x7e, 0x02, 0x8d, 0xf8, 0xdc, 0xdb, 0xb0,
+ 0x61, 0x6d, 0xe4, 0x4e, 0x35, 0xe3, 0x8b, 0x34, 0x0b, 0x25, 0xf7, 0xa1, 0x2a, 0x35, 0xd4, 0xba,
+ 0x97, 0x5d, 0x3b, 0xa1, 0xf2, 0xc4, 0x3c, 0xb1, 0xdd, 0xa9, 0x7f, 0xca, 0x42, 0x6b, 0x16, 0xb5,
+ 0xda, 0xe2, 0xb6, 0x24, 0x21, 0x1d, 0x44, 0xdc, 0x4f, 0xa3, 0x38, 0xf4, 0xbd, 0xe3, 0xd6, 0x26,
+ 0xde, 0x93, 0xc8, 0xd1, 0xc5, 0xe0, 0xf7, 0x2e, 0x66, 0xfe, 0x7c, 0xf0, 0xfb, 0x1c, 0xee, 0x60,
+ 0x65, 0x66, 0x3d, 0x3b, 0xb3, 0xf2, 0x68, 0x0d, 0xd1, 0x1b, 0xc8, 0xdd, 0x3d, 0x3b, 0xcc, 0x4e,
+ 0x6a, 0x43, 0xcd, 0x71, 0xa3, 0xd8, 0xf5, 0xc6, 0x71, 0xab, 0x85, 0xef, 0x4c, 0xc7, 0xe4, 0x33,
+ 0xb8, 0x3d, 0x73, 0x3d, 0x2b, 0xb2, 0x27, 0xcc, 0x8a, 0x5d, 0xee, 0x9b, 0x6c, 0xec, 0x7b, 0x4e,
+ 0xd4, 0x7a, 0x80, 0x82, 0x93, 0x99, 0xeb, 0x8d, 0xec, 0x09, 0x33, 0xdd, 0x19, 0x1b, 0x09, 0x0e,
+ 0xf9, 0x08, 0xd6, 0x11, 0x1e, 0xb2, 0x60, 0xea, 0x8e, 0x6d, 0xf1, 0xfa, 0x1f, 0xe1, 0xeb, 0xd7,
+ 0x38, 0x83, 0x0a, 0x3a, 0xbe, 0xfa, 0x63, 0x68, 0x06, 0x2c, 0x8c, 0xdc, 0x28, 0xb6, 0xa4, 0x45,
+ 0xbf, 0x97, 0xd5, 0xda, 0xaa, 0x64, 0x0e, 0x91, 0xd7, 0xfe, 0xcf, 0x02, 0x54, 0x84, 0x73, 0x92,
+ 0x4f, 0x41, 0xf1, 0x03, 0xbc, 0x06, 0x69, 0x6e, 0x6f, 0x5e, 0xe2, 0xc1, 0x9d, 0x61, 0xc0, 0xeb,
+ 0x5e, 0x3f, 0xa4, 0x8a, 0x1f, 0xdc, 0xb8, 0x28, 0xd4, 0xfe, 0x10, 0x6a, 0xc9, 0x02, 0xbc, 0xbc,
+ 0xe8, 0xeb, 0xa3, 0x91, 0x65, 0x3e, 0xee, 0x0e, 0xd4, 0x02, 0xb9, 0x03, 0x24, 0x1d, 0x5a, 0x43,
+ 0x6a, 0xe9, 0xdf, 0x1c, 0x75, 0xfb, 0xaa, 0x82, 0x5d, 0x1a, 0xd5, 0xbb, 0xa6, 0x4e, 0x05, 0xb2,
+ 0x48, 0xee, 0xc1, 0xed, 0x2c, 0xe5, 0x1c, 0x5c, 0xc2, 0x14, 0x8c, 0x8f, 0x65, 0x52, 0x01, 0xc5,
+ 0x18, 0xa8, 0x15, 0x9e, 0x16, 0xf4, 0xef, 0x8d, 0x91, 0x39, 0x52, 0xab, 0xed, 0xbf, 0x29, 0x40,
+ 0x19, 0xc3, 0x06, 0x3f, 0x9f, 0x54, 0x72, 0x71, 0x5d, 0x73, 0x5e, 0xb9, 0x1a, 0xd9, 0x92, 0xaa,
+ 0x81, 0x01, 0x65, 0x73, 0x79, 0xf4, 0xf9, 0xb5, 0xd6, 0x53, 0x3f, 0x85, 0x12, 0x8f, 0x52, 0xbc,
+ 0x43, 0x1c, 0xd2, 0x9e, 0x4e, 0xad, 0x47, 0x06, 0x1d, 0xf1, 0x2a, 0x97, 0x40, 0xb3, 0x3b, 0xd8,
+ 0xd3, 0x47, 0xe6, 0x30, 0xa1, 0xa1, 0x56, 0x1e, 0x19, 0x7d, 0x33, 0x45, 0x15, 0xb5, 0x9f, 0xd7,
+ 0x60, 0x35, 0x89, 0x09, 0x22, 0x82, 0x3e, 0x82, 0x46, 0x10, 0xba, 0x33, 0x3b, 0x3c, 0x8b, 0xc6,
+ 0xb6, 0x87, 0x49, 0x01, 0xb6, 0x7f, 0xb4, 0x24, 0xaa, 0x88, 0x1d, 0x1d, 0x0a, 0xec, 0x68, 0x6c,
+ 0x7b, 0x34, 0x3b, 0x91, 0xf4, 0x61, 0x75, 0xc6, 0xc2, 0x63, 0xf6, 0x7b, 0xbe, 0xeb, 0xe1, 0x4a,
+ 0x55, 0x8c, 0xc8, 0xef, 0x5f, 0xba, 0xd2, 0x01, 0x47, 0xff, 0x8e, 0xef, 0x7a, 0xb8, 0x56, 0x7e,
+ 0x32, 0xf9, 0x04, 0xea, 0xa2, 0x12, 0x72, 0xd8, 0x04, 0x63, 0xc5, 0xb2, 0xda, 0x4f, 0xd4, 0xe8,
+ 0x3d, 0x36, 0xc9, 0xc4, 0x65, 0xb8, 0x34, 0x2e, 0x37, 0xb2, 0x71, 0xf9, 0xcd, 0x6c, 0x2c, 0x5a,
+ 0x11, 0x55, 0x78, 0x1a, 0x84, 0x2e, 0x38, 0x7c, 0x6b, 0x89, 0xc3, 0x77, 0x60, 0x23, 0xf1, 0x55,
+ 0xcb, 0xf5, 0x26, 0xee, 0x4b, 0x2b, 0x72, 0x5f, 0x89, 0xd8, 0x53, 0xa6, 0xeb, 0x09, 0xcb, 0xe0,
+ 0x9c, 0x91, 0xfb, 0x8a, 0x11, 0x23, 0xe9, 0xe0, 0x64, 0x0e, 0x5c, 0xc5, 0xab, 0xc9, 0xf7, 0x2e,
+ 0x55, 0x8f, 0x68, 0xbe, 0x64, 0x46, 0xcc, 0x4d, 0x6d, 0xff, 0x52, 0x81, 0x46, 0xe6, 0x1c, 0x78,
+ 0xf6, 0x16, 0xca, 0x42, 0x61, 0xc5, 0x55, 0x94, 0x50, 0x1f, 0x4a, 0xfa, 0x26, 0xd4, 0xa3, 0xd8,
+ 0x0e, 0x63, 0x8b, 0x17, 0x57, 0xb2, 0xdd, 0x45, 0xc2, 0x13, 0x76, 0x46, 0x3e, 0x80, 0x35, 0xc1,
+ 0x74, 0xbd, 0xf1, 0x74, 0x1e, 0xb9, 0xa7, 0xa2, 0x99, 0xaf, 0xd1, 0x26, 0x92, 0x8d, 0x84, 0x4a,
+ 0xee, 0x42, 0x95, 0x67, 0x21, 0xbe, 0x86, 0x68, 0xfa, 0x2a, 0xcc, 0x73, 0xf8, 0x0a, 0x0f, 0x60,
+ 0x95, 0x33, 0xce, 0xe7, 0x57, 0xc4, 0x2d, 0x33, 0xf3, 0x9c, 0xf3, 0xd9, 0x1d, 0xd8, 0x10, 0xaf,
+ 0x09, 0x44, 0xf1, 0x2a, 0x2b, 0xdc, 0x3b, 0xa8, 0xd8, 0x75, 0x64, 0xc9, 0xb2, 0x56, 0x14, 0x9c,
+ 0x1f, 0x01, 0xcf, 0x5e, 0x0b, 0xe8, 0xbb, 0x22, 0x94, 0x31, 0xcf, 0xc9, 0x61, 0x77, 0xe1, 0x1d,
+ 0x8e, 0x9d, 0x7b, 0x76, 0x10, 0x4c, 0x5d, 0xe6, 0x58, 0x53, 0xff, 0x18, 0x43, 0x66, 0x14, 0xdb,
+ 0xb3, 0xc0, 0x9a, 0x47, 0xad, 0x0d, 0x0c, 0x99, 0x6d, 0xe6, 0x39, 0x47, 0x09, 0xa8, 0xef, 0x1f,
+ 0x9b, 0x09, 0xe4, 0x28, 0x6a, 0xff, 0x3e, 0xac, 0xe6, 0xec, 0x71, 0x41, 0xa7, 0x35, 0x74, 0xfe,
+ 0x8c, 0x4e, 0xdf, 0x85, 0x95, 0x20, 0x64, 0xe7, 0xa2, 0xd5, 0x51, 0xb4, 0x86, 0xa0, 0x09, 0xb1,
+ 0xb6, 0x60, 0x05, 0x79, 0x96, 0x20, 0xe6, 0xf3, 0x63, 0x03, 0x59, 0x87, 0xc8, 0x69, 0xbf, 0x80,
+ 0x95, 0xec, 0x69, 0x93, 0x77, 0x33, 0x69, 0xa1, 0x99, 0xcb, 0x93, 0x69, 0x76, 0x48, 0x2a, 0xb2,
+ 0xf5, 0x4b, 0x2a, 0x32, 0x72, 0x9d, 0x8a, 0x4c, 0xfb, 0x2f, 0xd9, 0x9c, 0x65, 0x2a, 0x84, 0x9f,
+ 0x41, 0x2d, 0x90, 0xf5, 0x38, 0x5a, 0x52, 0xfe, 0x12, 0x3e, 0x0f, 0xee, 0x24, 0x95, 0x3b, 0x4d,
+ 0xe7, 0xb4, 0xff, 0x56, 0x81, 0x5a, 0x5a, 0xd0, 0xe7, 0x2c, 0xef, 0xcd, 0x05, 0xcb, 0x3b, 0x90,
+ 0x1a, 0x16, 0x0a, 0x7c, 0x1b, 0xa3, 0xc5, 0x27, 0xaf, 0x7f, 0xd7, 0xc5, 0xb6, 0xe7, 0x34, 0xdb,
+ 0xf6, 0x6c, 0xbe, 0xae, 0xed, 0xf9, 0xe4, 0xa2, 0xc1, 0xbf, 0x95, 0xe9, 0x2d, 0x16, 0xcc, 0xbe,
+ 0xfd, 0x7d, 0xae, 0x0f, 0xca, 0x26, 0x84, 0x77, 0xc4, 0x7e, 0xd2, 0x84, 0x90, 0xb6, 0x3f, 0xf7,
+ 0xaf, 0xd7, 0xfe, 0x6c, 0x43, 0x45, 0xea, 0xfc, 0x0e, 0x54, 0x64, 0x4d, 0x27, 0x1b, 0x04, 0x31,
+ 0x3a, 0x6f, 0x10, 0x0a, 0xb2, 0x4e, 0xd7, 0x7e, 0xae, 0x40, 0x59, 0x0f, 0x43, 0x3f, 0xd4, 0xfe,
+ 0x48, 0x81, 0x3a, 0x3e, 0xed, 0xf9, 0x0e, 0xe3, 0xd9, 0x60, 0xb7, 0xdb, 0xb3, 0xa8, 0xfe, 0xcd,
+ 0x91, 0x8e, 0xd9, 0xa0, 0x0d, 0x77, 0xf6, 0x86, 0x83, 0xbd, 0x23, 0x4a, 0xf5, 0x81, 0x69, 0x99,
+ 0xb4, 0x3b, 0x18, 0xf1, 0xb6, 0x67, 0x38, 0x50, 0x15, 0x9e, 0x29, 0x8c, 0x81, 0xa9, 0xd3, 0x41,
+ 0xb7, 0x6f, 0x89, 0x56, 0xb4, 0x88, 0x77, 0xb3, 0xba, 0xde, 0xb3, 0xf0, 0xd6, 0x51, 0x2d, 0xf1,
+ 0x96, 0xd5, 0x34, 0x0e, 0xf4, 0xe1, 0x91, 0xa9, 0x96, 0xc9, 0x6d, 0x58, 0x3f, 0xd4, 0xe9, 0x81,
+ 0x31, 0x1a, 0x19, 0xc3, 0x81, 0xd5, 0xd3, 0x07, 0x86, 0xde, 0x53, 0x2b, 0x7c, 0x9d, 0x5d, 0x63,
+ 0xdf, 0xec, 0xee, 0xf6, 0x75, 0xb9, 0x4e, 0x95, 0x6c, 0xc2, 0x5b, 0x7b, 0xc3, 0x83, 0x03, 0xc3,
+ 0x34, 0xf5, 0x9e, 0xb5, 0x7b, 0x64, 0x5a, 0x23, 0xd3, 0xe8, 0xf7, 0xad, 0xee, 0xe1, 0x61, 0xff,
+ 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f,
+ 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14,
+ 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2,
+ 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4,
+ 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1,
+ 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b,
+ 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9,
+ 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18,
+ 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e,
+ 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9,
+ 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95,
+ 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0xce, 0xe6, 0x71, 0xd7, 0x75, 0xac, 0x88, 0xfd, 0x30,
+ 0xe7, 0x1e, 0x60, 0xcd, 0x03, 0xc7, 0xe6, 0x62, 0xd6, 0x45, 0x96, 0x72, 0x9d, 0x91, 0xe4, 0x1c,
+ 0x09, 0x46, 0xfb, 0x15, 0xc0, 0xb9, 0x14, 0x64, 0x1b, 0x6e, 0xf3, 0x3a, 0x9e, 0x45, 0x31, 0x73,
+ 0x2c, 0xb9, 0xdb, 0x60, 0x1e, 0x47, 0x18, 0xe2, 0xcb, 0x74, 0x23, 0x65, 0xca, 0x9b, 0xc2, 0x79,
+ 0x1c, 0x91, 0x9f, 0x40, 0xeb, 0xc2, 0x1c, 0x87, 0x4d, 0x19, 0x7f, 0x6d, 0x15, 0xa7, 0xdd, 0x59,
+ 0x98, 0xd6, 0x13, 0x5c, 0xed, 0x4f, 0x14, 0x80, 0x7d, 0x16, 0x53, 0xc1, 0xcd, 0x34, 0xb6, 0x95,
+ 0xeb, 0x36, 0xb6, 0xef, 0x27, 0x17, 0x08, 0xc5, 0xab, 0x63, 0xc0, 0x42, 0x97, 0xa1, 0xdc, 0xa4,
+ 0xcb, 0xc8, 0x35, 0x11, 0xc5, 0x2b, 0x9a, 0x88, 0x52, 0xae, 0x89, 0xf8, 0x18, 0x9a, 0xf6, 0x74,
+ 0xea, 0xbf, 0xe0, 0x05, 0x0d, 0x0b, 0x43, 0xe6, 0xa0, 0x11, 0x9c, 0xd7, 0xdb, 0xc8, 0xec, 0x49,
+ 0x9e, 0xf6, 0xe7, 0x0a, 0x34, 0x50, 0x15, 0x51, 0xe0, 0x7b, 0x11, 0x23, 0x5f, 0x42, 0x45, 0x5e,
+ 0x44, 0x8b, 0x8b, 0xfc, 0xb7, 0x33, 0xb2, 0x66, 0x70, 0xb2, 0x68, 0xa0, 0x12, 0xcc, 0x33, 0x42,
+ 0xe6, 0x75, 0x97, 0x2b, 0x25, 0x45, 0x91, 0xfb, 0x50, 0x73, 0x3d, 0x4b, 0xb4, 0xd4, 0x95, 0x4c,
+ 0x58, 0xac, 0xba, 0x1e, 0xd6, 0xb2, 0xed, 0x57, 0x50, 0x11, 0x2f, 0x21, 0x9d, 0x54, 0xa6, 0x8b,
+ 0xfa, 0xcb, 0xdc, 0x1c, 0xa7, 0xc2, 0xc8, 0xc3, 0x29, 0xbd, 0x2e, 0x40, 0xb7, 0xa0, 0x7a, 0xca,
+ 0x9b, 0x0f, 0xbc, 0xf4, 0xe3, 0xea, 0x4d, 0x86, 0xda, 0x1f, 0x97, 0x00, 0x0e, 0xe7, 0x4b, 0x0c,
+ 0xa4, 0x71, 0x5d, 0x03, 0xe9, 0xe4, 0xf4, 0xf8, 0x7a, 0x99, 0x7f, 0x75, 0x43, 0x59, 0xd2, 0x69,
+ 0x17, 0x6f, 0xda, 0x69, 0xdf, 0x87, 0x6a, 0x1c, 0xce, 0xb9, 0xa3, 0x08, 0x63, 0x4a, 0x5b, 0x5a,
+ 0x49, 0x25, 0x6f, 0x42, 0x79, 0xe2, 0x87, 0x63, 0x86, 0x8e, 0x95, 0xb2, 0x05, 0xed, 0xc2, 0x65,
+ 0x52, 0xed, 0xb2, 0xcb, 0x24, 0xde, 0xa0, 0x45, 0xf2, 0x1e, 0x0d, 0x0b, 0x99, 0x7c, 0x83, 0x96,
+ 0x5c, 0xb1, 0xd1, 0x14, 0x44, 0xbe, 0x81, 0xa6, 0x3d, 0x8f, 0x7d, 0xcb, 0xe5, 0x15, 0xda, 0xd4,
+ 0x1d, 0x9f, 0x61, 0xd9, 0xdd, 0xcc, 0x7f, 0xaf, 0x4f, 0x0f, 0xaa, 0xd3, 0x9d, 0xc7, 0xbe, 0xe1,
+ 0x1c, 0x22, 0x72, 0xa7, 0x2a, 0x93, 0x12, 0x5d, 0xb1, 0x33, 0x64, 0xed, 0xc7, 0xb0, 0x92, 0x85,
+ 0xf1, 0x04, 0x24, 0x81, 0xea, 0x1b, 0x3c, 0x3b, 0x8d, 0x78, 0x6a, 0x1b, 0x98, 0x46, 0xb7, 0xaf,
+ 0x16, 0xb4, 0x18, 0x1a, 0xb8, 0xbc, 0xf4, 0x8e, 0xeb, 0xba, 0xfd, 0x03, 0x28, 0x61, 0xf8, 0x55,
+ 0x2e, 0x7c, 0x0f, 0xc1, 0x98, 0x8b, 0xcc, 0xbc, 0xf9, 0x15, 0xb3, 0xe6, 0xf7, 0xdf, 0x05, 0x58,
+ 0x31, 0xfd, 0xf9, 0xf8, 0xe4, 0xa2, 0x01, 0xc2, 0xaf, 0x3b, 0x42, 0x2d, 0x31, 0x1f, 0xe5, 0xa6,
+ 0xe6, 0x93, 0x5a, 0x47, 0x71, 0x89, 0x75, 0xdc, 0xf4, 0xcc, 0xb5, 0x2f, 0x60, 0x55, 0x6e, 0x5e,
+ 0x6a, 0x3d, 0xd1, 0x66, 0xe1, 0x0a, 0x6d, 0x6a, 0xbf, 0x50, 0x60, 0x55, 0xc4, 0xf7, 0xff, 0xbb,
+ 0xd2, 0x2a, 0x37, 0x0c, 0xeb, 0xe5, 0x1b, 0x5d, 0x1e, 0xfd, 0xbf, 0xf4, 0x34, 0x6d, 0x08, 0xcd,
+ 0x44, 0x7d, 0x37, 0x50, 0xfb, 0x15, 0x46, 0xfc, 0x8b, 0x02, 0x34, 0x06, 0xec, 0xe5, 0x92, 0x20,
+ 0x5a, 0xbe, 0xee, 0x71, 0x7c, 0x98, 0x2b, 0x57, 0x1b, 0xdb, 0xeb, 0x59, 0x19, 0xc4, 0xd5, 0x63,
+ 0x52, 0xc1, 0xa6, 0xb7, 0xa8, 0xca, 0xf2, 0x5b, 0xd4, 0xd2, 0x62, 0xb7, 0x9e, 0xb9, 0xc5, 0x2b,
+ 0x2e, 0xbb, 0xc5, 0xd3, 0xfe, 0xad, 0x08, 0x0d, 0x6c, 0x90, 0x29, 0x8b, 0xe6, 0xd3, 0x38, 0x27,
+ 0x4c, 0xe1, 0x6a, 0x61, 0x3a, 0x50, 0x09, 0x71, 0x92, 0x74, 0xa5, 0x4b, 0x83, 0xbf, 0x40, 0x61,
+ 0x6b, 0xfc, 0xdc, 0x0d, 0x02, 0xe6, 0x58, 0x82, 0x92, 0x14, 0x30, 0x4d, 0x49, 0x16, 0x22, 0x44,
+ 0xbc, 0xfc, 0x9c, 0xf9, 0x21, 0x4b, 0x51, 0x45, 0xbc, 0x4f, 0x68, 0x70, 0x5a, 0x02, 0xc9, 0xdd,
+ 0x37, 0x88, 0xca, 0xe0, 0xfc, 0xbe, 0x21, 0xed, 0x35, 0x91, 0x5b, 0x47, 0xae, 0xe8, 0x35, 0x91,
+ 0xcd, 0xbb, 0xa8, 0x99, 0x3d, 0x9d, 0x5a, 0x7e, 0x10, 0xa1, 0xd3, 0xd4, 0x68, 0x0d, 0x09, 0xc3,
+ 0x20, 0x22, 0x5f, 0x43, 0x7a, 0x5d, 0x2c, 0x6f, 0xc9, 0xc5, 0x39, 0xb6, 0x2e, 0xbb, 0x58, 0xa0,
+ 0xab, 0xe3, 0xdc, 0xfd, 0xcf, 0x92, 0x1b, 0xea, 0xca, 0x4d, 0x6f, 0xa8, 0x1f, 0x42, 0x59, 0xc4,
+ 0xa8, 0xda, 0xeb, 0x62, 0x94, 0xc0, 0x65, 0xed, 0xb3, 0x91, 0xb7, 0xcf, 0x5f, 0x16, 0x80, 0x74,
+ 0xa7, 0x53, 0x7f, 0x6c, 0xc7, 0xcc, 0x70, 0xa2, 0x8b, 0x66, 0x7a, 0xed, 0xcf, 0x2e, 0x9f, 0x41,
+ 0x7d, 0xe6, 0x3b, 0x6c, 0x6a, 0x25, 0xdf, 0x94, 0x2e, 0xad, 0x7e, 0x10, 0xc6, 0x5b, 0x52, 0x02,
+ 0x25, 0xbc, 0xc4, 0x51, 0xb0, 0xee, 0xc0, 0x67, 0xde, 0x84, 0xcd, 0xec, 0x97, 0xb2, 0x14, 0xe1,
+ 0x8f, 0xa4, 0x03, 0xd5, 0x90, 0x45, 0x2c, 0x3c, 0x65, 0x57, 0x16, 0x55, 0x09, 0x48, 0x7b, 0x06,
+ 0x1b, 0xb9, 0x1d, 0x49, 0x47, 0xbe, 0x85, 0x5f, 0x2b, 0xc3, 0x58, 0x7e, 0xb4, 0x12, 0x03, 0xfe,
+ 0x3a, 0xe6, 0x25, 0x9f, 0x41, 0xf9, 0x63, 0xea, 0xf0, 0xc5, 0xab, 0xe2, 0xec, 0x1e, 0xa8, 0x59,
+ 0x4d, 0xbb, 0x63, 0x0c, 0x36, 0xf2, 0x54, 0x0a, 0xd7, 0x3b, 0x15, 0xed, 0xef, 0x0a, 0xb0, 0xde,
+ 0x75, 0x1c, 0xf1, 0x77, 0xc3, 0x25, 0xaa, 0x2f, 0x5e, 0x57, 0xf5, 0x0b, 0x81, 0x58, 0x84, 0x89,
+ 0x6b, 0x05, 0xe2, 0x0f, 0xa1, 0x92, 0xd6, 0x5a, 0xc5, 0x05, 0x77, 0x16, 0x72, 0x51, 0x09, 0xd0,
+ 0x6e, 0x01, 0xc9, 0x0a, 0x2b, 0xb4, 0xaa, 0xfd, 0x69, 0x11, 0xee, 0xee, 0xb2, 0x63, 0xd7, 0xcb,
+ 0xbe, 0xe2, 0x57, 0xdf, 0xc9, 0xc5, 0x4f, 0x65, 0x9f, 0xc1, 0xba, 0x28, 0xe4, 0x93, 0x7f, 0x62,
+ 0x59, 0xec, 0x58, 0x7e, 0x9d, 0x94, 0xb1, 0x6a, 0x0d, 0xf9, 0x07, 0x92, 0xad, 0xe3, 0x7f, 0xc5,
+ 0x1c, 0x3b, 0xb6, 0x9f, 0xd9, 0x11, 0xb3, 0x5c, 0x47, 0xfe, 0x59, 0x06, 0x12, 0x92, 0xe1, 0x90,
+ 0x21, 0x94, 0xb8, 0x0d, 0xa2, 0xeb, 0x36, 0xb7, 0xb7, 0x33, 0x62, 0x5d, 0xb2, 0x95, 0xac, 0x02,
+ 0x0f, 0x7c, 0x87, 0xed, 0x54, 0x8f, 0x06, 0x4f, 0x06, 0xc3, 0xef, 0x06, 0x14, 0x17, 0x22, 0x06,
+ 0xdc, 0x0a, 0x42, 0x76, 0xea, 0xfa, 0xf3, 0xc8, 0xca, 0x9e, 0x44, 0xf5, 0xca, 0x94, 0xb8, 0x91,
+ 0xcc, 0xc9, 0x10, 0xb5, 0x9f, 0xc2, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41,
+ 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37,
+ 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3,
+ 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71,
+ 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd,
+ 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01,
+ 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00,
+}
diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
new file mode 100644
index 00000000..497b4d9a
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
@@ -0,0 +1,551 @@
+syntax = "proto2";
+option go_package = "datastore";
+
+package appengine;
+
+message Action{}
+
+message PropertyValue {
+ optional int64 int64Value = 1;
+ optional bool booleanValue = 2;
+ optional string stringValue = 3;
+ optional double doubleValue = 4;
+
+ optional group PointValue = 5 {
+ required double x = 6;
+ required double y = 7;
+ }
+
+ optional group UserValue = 8 {
+ required string email = 9;
+ required string auth_domain = 10;
+ optional string nickname = 11;
+ optional string federated_identity = 21;
+ optional string federated_provider = 22;
+ }
+
+ optional group ReferenceValue = 12 {
+ required string app = 13;
+ optional string name_space = 20;
+ repeated group PathElement = 14 {
+ required string type = 15;
+ optional int64 id = 16;
+ optional string name = 17;
+ }
+ }
+}
+
+message Property {
+ enum Meaning {
+ NO_MEANING = 0;
+ BLOB = 14;
+ TEXT = 15;
+ BYTESTRING = 16;
+
+ ATOM_CATEGORY = 1;
+ ATOM_LINK = 2;
+ ATOM_TITLE = 3;
+ ATOM_CONTENT = 4;
+ ATOM_SUMMARY = 5;
+ ATOM_AUTHOR = 6;
+
+ GD_WHEN = 7;
+ GD_EMAIL = 8;
+ GEORSS_POINT = 9;
+ GD_IM = 10;
+
+ GD_PHONENUMBER = 11;
+ GD_POSTALADDRESS = 12;
+
+ GD_RATING = 13;
+
+ BLOBKEY = 17;
+ ENTITY_PROTO = 19;
+
+ INDEX_VALUE = 18;
+ };
+
+ optional Meaning meaning = 1 [default = NO_MEANING];
+ optional string meaning_uri = 2;
+
+ required string name = 3;
+
+ required PropertyValue value = 5;
+
+ required bool multiple = 4;
+
+ optional bool searchable = 6 [default=false];
+
+ enum FtsTokenizationOption {
+ HTML = 1;
+ ATOM = 2;
+ }
+
+ optional FtsTokenizationOption fts_tokenization_option = 8;
+
+ optional string locale = 9 [default = "en"];
+}
+
+message Path {
+ repeated group Element = 1 {
+ required string type = 2;
+ optional int64 id = 3;
+ optional string name = 4;
+ }
+}
+
+message Reference {
+ required string app = 13;
+ optional string name_space = 20;
+ required Path path = 14;
+}
+
+message User {
+ required string email = 1;
+ required string auth_domain = 2;
+ optional string nickname = 3;
+ optional string federated_identity = 6;
+ optional string federated_provider = 7;
+}
+
+message EntityProto {
+ required Reference key = 13;
+ required Path entity_group = 16;
+ optional User owner = 17;
+
+ enum Kind {
+ GD_CONTACT = 1;
+ GD_EVENT = 2;
+ GD_MESSAGE = 3;
+ }
+ optional Kind kind = 4;
+ optional string kind_uri = 5;
+
+ repeated Property property = 14;
+ repeated Property raw_property = 15;
+
+ optional int32 rank = 18;
+}
+
+message CompositeProperty {
+ required int64 index_id = 1;
+ repeated string value = 2;
+}
+
+message Index {
+ required string entity_type = 1;
+ required bool ancestor = 5;
+ repeated group Property = 2 {
+ required string name = 3;
+ enum Direction {
+ ASCENDING = 1;
+ DESCENDING = 2;
+ }
+ optional Direction direction = 4 [default = ASCENDING];
+ }
+}
+
+message CompositeIndex {
+ required string app_id = 1;
+ required int64 id = 2;
+ required Index definition = 3;
+
+ enum State {
+ WRITE_ONLY = 1;
+ READ_WRITE = 2;
+ DELETED = 3;
+ ERROR = 4;
+ }
+ required State state = 4;
+
+ optional bool only_use_if_required = 6 [default = false];
+}
+
+message IndexPostfix {
+ message IndexValue {
+ required string property_name = 1;
+ required PropertyValue value = 2;
+ }
+
+ repeated IndexValue index_value = 1;
+
+ optional Reference key = 2;
+
+ optional bool before = 3 [default=true];
+}
+
+message IndexPosition {
+ optional string key = 1;
+
+ optional bool before = 2 [default=true];
+}
+
+message Snapshot {
+ enum Status {
+ INACTIVE = 0;
+ ACTIVE = 1;
+ }
+
+ required int64 ts = 1;
+}
+
+message InternalHeader {
+ optional string qos = 1;
+}
+
+message Transaction {
+ optional InternalHeader header = 4;
+ required fixed64 handle = 1;
+ required string app = 2;
+ optional bool mark_changes = 3 [default = false];
+}
+
+message Query {
+ optional InternalHeader header = 39;
+
+ required string app = 1;
+ optional string name_space = 29;
+
+ optional string kind = 3;
+ optional Reference ancestor = 17;
+
+ repeated group Filter = 4 {
+ enum Operator {
+ LESS_THAN = 1;
+ LESS_THAN_OR_EQUAL = 2;
+ GREATER_THAN = 3;
+ GREATER_THAN_OR_EQUAL = 4;
+ EQUAL = 5;
+ IN = 6;
+ EXISTS = 7;
+ }
+
+ required Operator op = 6;
+ repeated Property property = 14;
+ }
+
+ optional string search_query = 8;
+
+ repeated group Order = 9 {
+ enum Direction {
+ ASCENDING = 1;
+ DESCENDING = 2;
+ }
+
+ required string property = 10;
+ optional Direction direction = 11 [default = ASCENDING];
+ }
+
+ enum Hint {
+ ORDER_FIRST = 1;
+ ANCESTOR_FIRST = 2;
+ FILTER_FIRST = 3;
+ }
+ optional Hint hint = 18;
+
+ optional int32 count = 23;
+
+ optional int32 offset = 12 [default = 0];
+
+ optional int32 limit = 16;
+
+ optional CompiledCursor compiled_cursor = 30;
+ optional CompiledCursor end_compiled_cursor = 31;
+
+ repeated CompositeIndex composite_index = 19;
+
+ optional bool require_perfect_plan = 20 [default = false];
+
+ optional bool keys_only = 21 [default = false];
+
+ optional Transaction transaction = 22;
+
+ optional bool compile = 25 [default = false];
+
+ optional int64 failover_ms = 26;
+
+ optional bool strong = 32;
+
+ repeated string property_name = 33;
+
+ repeated string group_by_property_name = 34;
+
+ optional bool distinct = 24;
+
+ optional int64 min_safe_time_seconds = 35;
+
+ repeated string safe_replica_name = 36;
+
+ optional bool persist_offset = 37 [default=false];
+}
+
+message CompiledQuery {
+ required group PrimaryScan = 1 {
+ optional string index_name = 2;
+
+ optional string start_key = 3;
+ optional bool start_inclusive = 4;
+ optional string end_key = 5;
+ optional bool end_inclusive = 6;
+
+ repeated string start_postfix_value = 22;
+ repeated string end_postfix_value = 23;
+
+ optional int64 end_unapplied_log_timestamp_us = 19;
+ }
+
+ repeated group MergeJoinScan = 7 {
+ required string index_name = 8;
+
+ repeated string prefix_value = 9;
+
+ optional bool value_prefix = 20 [default=false];
+ }
+
+ optional Index index_def = 21;
+
+ optional int32 offset = 10 [default = 0];
+
+ optional int32 limit = 11;
+
+ required bool keys_only = 12;
+
+ repeated string property_name = 24;
+
+ optional int32 distinct_infix_size = 25;
+
+ optional group EntityFilter = 13 {
+ optional bool distinct = 14 [default=false];
+
+ optional string kind = 17;
+ optional Reference ancestor = 18;
+ }
+}
+
+message CompiledCursor {
+ optional group Position = 2 {
+ optional string start_key = 27;
+
+ repeated group IndexValue = 29 {
+ optional string property = 30;
+ required PropertyValue value = 31;
+ }
+
+ optional Reference key = 32;
+
+ optional bool start_inclusive = 28 [default=true];
+ }
+}
+
+message Cursor {
+ required fixed64 cursor = 1;
+
+ optional string app = 2;
+}
+
+message Error {
+ enum ErrorCode {
+ BAD_REQUEST = 1;
+ CONCURRENT_TRANSACTION = 2;
+ INTERNAL_ERROR = 3;
+ NEED_INDEX = 4;
+ TIMEOUT = 5;
+ PERMISSION_DENIED = 6;
+ BIGTABLE_ERROR = 7;
+ COMMITTED_BUT_STILL_APPLYING = 8;
+ CAPABILITY_DISABLED = 9;
+ TRY_ALTERNATE_BACKEND = 10;
+ SAFE_TIME_TOO_OLD = 11;
+ }
+}
+
+message Cost {
+ optional int32 index_writes = 1;
+ optional int32 index_write_bytes = 2;
+ optional int32 entity_writes = 3;
+ optional int32 entity_write_bytes = 4;
+ optional group CommitCost = 5 {
+ optional int32 requested_entity_puts = 6;
+ optional int32 requested_entity_deletes = 7;
+ };
+ optional int32 approximate_storage_delta = 8;
+ optional int32 id_sequence_updates = 9;
+}
+
+message GetRequest {
+ optional InternalHeader header = 6;
+
+ repeated Reference key = 1;
+ optional Transaction transaction = 2;
+
+ optional int64 failover_ms = 3;
+
+ optional bool strong = 4;
+
+ optional bool allow_deferred = 5 [default=false];
+}
+
+message GetResponse {
+ repeated group Entity = 1 {
+ optional EntityProto entity = 2;
+ optional Reference key = 4;
+
+ optional int64 version = 3;
+ }
+
+ repeated Reference deferred = 5;
+
+ optional bool in_order = 6 [default=true];
+}
+
+message PutRequest {
+ optional InternalHeader header = 11;
+
+ repeated EntityProto entity = 1;
+ optional Transaction transaction = 2;
+ repeated CompositeIndex composite_index = 3;
+
+ optional bool trusted = 4 [default = false];
+
+ optional bool force = 7 [default = false];
+
+ optional bool mark_changes = 8 [default = false];
+ repeated Snapshot snapshot = 9;
+
+ enum AutoIdPolicy {
+ CURRENT = 0;
+ SEQUENTIAL = 1;
+ }
+ optional AutoIdPolicy auto_id_policy = 10 [default = CURRENT];
+}
+
+message PutResponse {
+ repeated Reference key = 1;
+ optional Cost cost = 2;
+ repeated int64 version = 3;
+}
+
+message TouchRequest {
+ optional InternalHeader header = 10;
+
+ repeated Reference key = 1;
+ repeated CompositeIndex composite_index = 2;
+ optional bool force = 3 [default = false];
+ repeated Snapshot snapshot = 9;
+}
+
+message TouchResponse {
+ optional Cost cost = 1;
+}
+
+message DeleteRequest {
+ optional InternalHeader header = 10;
+
+ repeated Reference key = 6;
+ optional Transaction transaction = 5;
+
+ optional bool trusted = 4 [default = false];
+
+ optional bool force = 7 [default = false];
+
+ optional bool mark_changes = 8 [default = false];
+ repeated Snapshot snapshot = 9;
+}
+
+message DeleteResponse {
+ optional Cost cost = 1;
+ repeated int64 version = 3;
+}
+
+message NextRequest {
+ optional InternalHeader header = 5;
+
+ required Cursor cursor = 1;
+ optional int32 count = 2;
+
+ optional int32 offset = 4 [default = 0];
+
+ optional bool compile = 3 [default = false];
+}
+
+message QueryResult {
+ optional Cursor cursor = 1;
+
+ repeated EntityProto result = 2;
+
+ optional int32 skipped_results = 7;
+
+ required bool more_results = 3;
+
+ optional bool keys_only = 4;
+
+ optional bool index_only = 9;
+
+ optional bool small_ops = 10;
+
+ optional CompiledQuery compiled_query = 5;
+
+ optional CompiledCursor compiled_cursor = 6;
+
+ repeated CompositeIndex index = 8;
+
+ repeated int64 version = 11;
+}
+
+message AllocateIdsRequest {
+ optional InternalHeader header = 4;
+
+ optional Reference model_key = 1;
+
+ optional int64 size = 2;
+
+ optional int64 max = 3;
+
+ repeated Reference reserve = 5;
+}
+
+message AllocateIdsResponse {
+ required int64 start = 1;
+ required int64 end = 2;
+ optional Cost cost = 3;
+}
+
+message CompositeIndices {
+ repeated CompositeIndex index = 1;
+}
+
+message AddActionsRequest {
+ optional InternalHeader header = 3;
+
+ required Transaction transaction = 1;
+ repeated Action action = 2;
+}
+
+message AddActionsResponse {
+}
+
+message BeginTransactionRequest {
+ optional InternalHeader header = 3;
+
+ required string app = 1;
+ optional bool allow_multiple_eg = 2 [default = false];
+ optional string database_id = 4;
+
+ enum TransactionMode {
+ UNKNOWN = 0;
+ READ_ONLY = 1;
+ READ_WRITE = 2;
+ }
+ optional TransactionMode mode = 5 [default = UNKNOWN];
+
+ optional Transaction previous_transaction = 7;
+}
+
+message CommitResponse {
+ optional Cost cost = 1;
+
+ repeated group Version = 3 {
+ required Reference root_entity_key = 4;
+ required int64 version = 5;
+ }
+}
diff --git a/vendor/google.golang.org/appengine/internal/identity.go b/vendor/google.golang.org/appengine/internal/identity.go
new file mode 100644
index 00000000..9b4134e4
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/identity.go
@@ -0,0 +1,55 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package internal
+
+import (
+ "os"
+
+ netcontext "golang.org/x/net/context"
+)
+
+var (
+ // This is set to true in identity_classic.go, which is behind the appengine build tag.
+ // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not
+ // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a
+ // first-gen runtime. See IsStandard below for the second-gen check.
+ appengineStandard bool
+
+ // This is set to true in identity_flex.go, which is behind the appenginevm build tag.
+ appengineFlex bool
+)
+
+// AppID is the implementation of the wrapper function of the same name in
+// ../identity.go. See that file for commentary.
+func AppID(c netcontext.Context) string {
+ return appID(FullyQualifiedAppID(c))
+}
+
+// IsStandard is the implementation of the wrapper function of the same name in
+// ../appengine.go. See that file for commentary.
+func IsStandard() bool {
+ // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not
+ // second-gen (>= Go 1.11).
+ return appengineStandard || IsSecondGen()
+}
+
+// IsStandard is the implementation of the wrapper function of the same name in
+// ../appengine.go. See that file for commentary.
+func IsSecondGen() bool {
+ // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime.
+ return os.Getenv("GAE_ENV") == "standard"
+}
+
+// IsFlex is the implementation of the wrapper function of the same name in
+// ../appengine.go. See that file for commentary.
+func IsFlex() bool {
+ return appengineFlex
+}
+
+// IsAppEngine is the implementation of the wrapper function of the same name in
+// ../appengine.go. See that file for commentary.
+func IsAppEngine() bool {
+ return IsStandard() || IsFlex()
+}
diff --git a/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/google.golang.org/appengine/internal/identity_classic.go
new file mode 100644
index 00000000..4e979f45
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/identity_classic.go
@@ -0,0 +1,61 @@
+// Copyright 2015 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build appengine
+
+package internal
+
+import (
+ "appengine"
+
+ netcontext "golang.org/x/net/context"
+)
+
+func init() {
+ appengineStandard = true
+}
+
+func DefaultVersionHostname(ctx netcontext.Context) string {
+ c := fromContext(ctx)
+ if c == nil {
+ panic(errNotAppEngineContext)
+ }
+ return appengine.DefaultVersionHostname(c)
+}
+
+func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() }
+func ServerSoftware() string { return appengine.ServerSoftware() }
+func InstanceID() string { return appengine.InstanceID() }
+func IsDevAppServer() bool { return appengine.IsDevAppServer() }
+
+func RequestID(ctx netcontext.Context) string {
+ c := fromContext(ctx)
+ if c == nil {
+ panic(errNotAppEngineContext)
+ }
+ return appengine.RequestID(c)
+}
+
+func ModuleName(ctx netcontext.Context) string {
+ c := fromContext(ctx)
+ if c == nil {
+ panic(errNotAppEngineContext)
+ }
+ return appengine.ModuleName(c)
+}
+func VersionID(ctx netcontext.Context) string {
+ c := fromContext(ctx)
+ if c == nil {
+ panic(errNotAppEngineContext)
+ }
+ return appengine.VersionID(c)
+}
+
+func fullyQualifiedAppID(ctx netcontext.Context) string {
+ c := fromContext(ctx)
+ if c == nil {
+ panic(errNotAppEngineContext)
+ }
+ return c.FullyQualifiedAppID()
+}
diff --git a/vendor/google.golang.org/appengine/internal/identity_flex.go b/vendor/google.golang.org/appengine/internal/identity_flex.go
new file mode 100644
index 00000000..d5e2e7b5
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/identity_flex.go
@@ -0,0 +1,11 @@
+// Copyright 2018 Google LLC. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build appenginevm
+
+package internal
+
+func init() {
+ appengineFlex = true
+}
diff --git a/vendor/google.golang.org/appengine/internal/identity_vm.go b/vendor/google.golang.org/appengine/internal/identity_vm.go
new file mode 100644
index 00000000..5d806726
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/identity_vm.go
@@ -0,0 +1,134 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+
+package internal
+
+import (
+ "log"
+ "net/http"
+ "os"
+ "strings"
+
+ netcontext "golang.org/x/net/context"
+)
+
+// These functions are implementations of the wrapper functions
+// in ../appengine/identity.go. See that file for commentary.
+
+const (
+ hDefaultVersionHostname = "X-AppEngine-Default-Version-Hostname"
+ hRequestLogId = "X-AppEngine-Request-Log-Id"
+ hDatacenter = "X-AppEngine-Datacenter"
+)
+
+func ctxHeaders(ctx netcontext.Context) http.Header {
+ c := fromContext(ctx)
+ if c == nil {
+ return nil
+ }
+ return c.Request().Header
+}
+
+func DefaultVersionHostname(ctx netcontext.Context) string {
+ return ctxHeaders(ctx).Get(hDefaultVersionHostname)
+}
+
+func RequestID(ctx netcontext.Context) string {
+ return ctxHeaders(ctx).Get(hRequestLogId)
+}
+
+func Datacenter(ctx netcontext.Context) string {
+ if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" {
+ return dc
+ }
+ // If the header isn't set, read zone from the metadata service.
+ // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE]
+ zone, err := getMetadata("instance/zone")
+ if err != nil {
+ log.Printf("Datacenter: %v", err)
+ return ""
+ }
+ parts := strings.Split(string(zone), "/")
+ if len(parts) == 0 {
+ return ""
+ }
+ return parts[len(parts)-1]
+}
+
+func ServerSoftware() string {
+ // TODO(dsymonds): Remove fallback when we've verified this.
+ if s := os.Getenv("SERVER_SOFTWARE"); s != "" {
+ return s
+ }
+ if s := os.Getenv("GAE_ENV"); s != "" {
+ return s
+ }
+ return "Google App Engine/1.x.x"
+}
+
+// TODO(dsymonds): Remove the metadata fetches.
+
+func ModuleName(_ netcontext.Context) string {
+ if s := os.Getenv("GAE_MODULE_NAME"); s != "" {
+ return s
+ }
+ if s := os.Getenv("GAE_SERVICE"); s != "" {
+ return s
+ }
+ return string(mustGetMetadata("instance/attributes/gae_backend_name"))
+}
+
+func VersionID(_ netcontext.Context) string {
+ if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" {
+ return s1 + "." + s2
+ }
+ if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" {
+ return s1 + "." + s2
+ }
+ return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version"))
+}
+
+func InstanceID() string {
+ if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" {
+ return s
+ }
+ if s := os.Getenv("GAE_INSTANCE"); s != "" {
+ return s
+ }
+ return string(mustGetMetadata("instance/attributes/gae_backend_instance"))
+}
+
+func partitionlessAppID() string {
+ // gae_project has everything except the partition prefix.
+ if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" {
+ return appID
+ }
+ if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" {
+ return project
+ }
+ return string(mustGetMetadata("instance/attributes/gae_project"))
+}
+
+func fullyQualifiedAppID(_ netcontext.Context) string {
+ if s := os.Getenv("GAE_APPLICATION"); s != "" {
+ return s
+ }
+ appID := partitionlessAppID()
+
+ part := os.Getenv("GAE_PARTITION")
+ if part == "" {
+ part = string(mustGetMetadata("instance/attributes/gae_partition"))
+ }
+
+ if part != "" {
+ appID = part + "~" + appID
+ }
+ return appID
+}
+
+func IsDevAppServer() bool {
+ return os.Getenv("RUN_WITH_DEVAPPSERVER") != ""
+}
diff --git a/vendor/google.golang.org/appengine/internal/internal.go b/vendor/google.golang.org/appengine/internal/internal.go
new file mode 100644
index 00000000..051ea398
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/internal.go
@@ -0,0 +1,110 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// Package internal provides support for package appengine.
+//
+// Programs should not use this package directly. Its API is not stable.
+// Use packages appengine and appengine/* instead.
+package internal
+
+import (
+ "fmt"
+
+ "github.com/golang/protobuf/proto"
+
+ remotepb "google.golang.org/appengine/internal/remote_api"
+)
+
+// errorCodeMaps is a map of service name to the error code map for the service.
+var errorCodeMaps = make(map[string]map[int32]string)
+
+// RegisterErrorCodeMap is called from API implementations to register their
+// error code map. This should only be called from init functions.
+func RegisterErrorCodeMap(service string, m map[int32]string) {
+ errorCodeMaps[service] = m
+}
+
+type timeoutCodeKey struct {
+ service string
+ code int32
+}
+
+// timeoutCodes is the set of service+code pairs that represent timeouts.
+var timeoutCodes = make(map[timeoutCodeKey]bool)
+
+func RegisterTimeoutErrorCode(service string, code int32) {
+ timeoutCodes[timeoutCodeKey{service, code}] = true
+}
+
+// APIError is the type returned by appengine.Context's Call method
+// when an API call fails in an API-specific way. This may be, for instance,
+// a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE.
+type APIError struct {
+ Service string
+ Detail string
+ Code int32 // API-specific error code
+}
+
+func (e *APIError) Error() string {
+ if e.Code == 0 {
+ if e.Detail == "" {
+ return "APIError "
+ }
+ return e.Detail
+ }
+ s := fmt.Sprintf("API error %d", e.Code)
+ if m, ok := errorCodeMaps[e.Service]; ok {
+ s += " (" + e.Service + ": " + m[e.Code] + ")"
+ } else {
+ // Shouldn't happen, but provide a bit more detail if it does.
+ s = e.Service + " " + s
+ }
+ if e.Detail != "" {
+ s += ": " + e.Detail
+ }
+ return s
+}
+
+func (e *APIError) IsTimeout() bool {
+ return timeoutCodes[timeoutCodeKey{e.Service, e.Code}]
+}
+
+// CallError is the type returned by appengine.Context's Call method when an
+// API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED.
+type CallError struct {
+ Detail string
+ Code int32
+ // TODO: Remove this if we get a distinguishable error code.
+ Timeout bool
+}
+
+func (e *CallError) Error() string {
+ var msg string
+ switch remotepb.RpcError_ErrorCode(e.Code) {
+ case remotepb.RpcError_UNKNOWN:
+ return e.Detail
+ case remotepb.RpcError_OVER_QUOTA:
+ msg = "Over quota"
+ case remotepb.RpcError_CAPABILITY_DISABLED:
+ msg = "Capability disabled"
+ case remotepb.RpcError_CANCELLED:
+ msg = "Canceled"
+ default:
+ msg = fmt.Sprintf("Call error %d", e.Code)
+ }
+ s := msg + ": " + e.Detail
+ if e.Timeout {
+ s += " (timeout)"
+ }
+ return s
+}
+
+func (e *CallError) IsTimeout() bool {
+ return e.Timeout
+}
+
+// NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace.
+// The function should be prepared to be called on the same message more than once; it should only modify the
+// RPC request the first time.
+var NamespaceMods = make(map[string]func(m proto.Message, namespace string))
diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go
new file mode 100644
index 00000000..8545ac4a
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go
@@ -0,0 +1,1313 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: google.golang.org/appengine/internal/log/log_service.proto
+
+package log
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type LogServiceError_ErrorCode int32
+
+const (
+ LogServiceError_OK LogServiceError_ErrorCode = 0
+ LogServiceError_INVALID_REQUEST LogServiceError_ErrorCode = 1
+ LogServiceError_STORAGE_ERROR LogServiceError_ErrorCode = 2
+)
+
+var LogServiceError_ErrorCode_name = map[int32]string{
+ 0: "OK",
+ 1: "INVALID_REQUEST",
+ 2: "STORAGE_ERROR",
+}
+var LogServiceError_ErrorCode_value = map[string]int32{
+ "OK": 0,
+ "INVALID_REQUEST": 1,
+ "STORAGE_ERROR": 2,
+}
+
+func (x LogServiceError_ErrorCode) Enum() *LogServiceError_ErrorCode {
+ p := new(LogServiceError_ErrorCode)
+ *p = x
+ return p
+}
+func (x LogServiceError_ErrorCode) String() string {
+ return proto.EnumName(LogServiceError_ErrorCode_name, int32(x))
+}
+func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(LogServiceError_ErrorCode_value, data, "LogServiceError_ErrorCode")
+ if err != nil {
+ return err
+ }
+ *x = LogServiceError_ErrorCode(value)
+ return nil
+}
+func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0}
+}
+
+type LogServiceError struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogServiceError) Reset() { *m = LogServiceError{} }
+func (m *LogServiceError) String() string { return proto.CompactTextString(m) }
+func (*LogServiceError) ProtoMessage() {}
+func (*LogServiceError) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{0}
+}
+func (m *LogServiceError) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogServiceError.Unmarshal(m, b)
+}
+func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic)
+}
+func (dst *LogServiceError) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogServiceError.Merge(dst, src)
+}
+func (m *LogServiceError) XXX_Size() int {
+ return xxx_messageInfo_LogServiceError.Size(m)
+}
+func (m *LogServiceError) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogServiceError.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogServiceError proto.InternalMessageInfo
+
+type UserAppLogLine struct {
+ TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"`
+ Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"`
+ Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} }
+func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) }
+func (*UserAppLogLine) ProtoMessage() {}
+func (*UserAppLogLine) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{1}
+}
+func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b)
+}
+func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic)
+}
+func (dst *UserAppLogLine) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UserAppLogLine.Merge(dst, src)
+}
+func (m *UserAppLogLine) XXX_Size() int {
+ return xxx_messageInfo_UserAppLogLine.Size(m)
+}
+func (m *UserAppLogLine) XXX_DiscardUnknown() {
+ xxx_messageInfo_UserAppLogLine.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo
+
+func (m *UserAppLogLine) GetTimestampUsec() int64 {
+ if m != nil && m.TimestampUsec != nil {
+ return *m.TimestampUsec
+ }
+ return 0
+}
+
+func (m *UserAppLogLine) GetLevel() int64 {
+ if m != nil && m.Level != nil {
+ return *m.Level
+ }
+ return 0
+}
+
+func (m *UserAppLogLine) GetMessage() string {
+ if m != nil && m.Message != nil {
+ return *m.Message
+ }
+ return ""
+}
+
+type UserAppLogGroup struct {
+ LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} }
+func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) }
+func (*UserAppLogGroup) ProtoMessage() {}
+func (*UserAppLogGroup) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{2}
+}
+func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b)
+}
+func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic)
+}
+func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UserAppLogGroup.Merge(dst, src)
+}
+func (m *UserAppLogGroup) XXX_Size() int {
+ return xxx_messageInfo_UserAppLogGroup.Size(m)
+}
+func (m *UserAppLogGroup) XXX_DiscardUnknown() {
+ xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo
+
+func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine {
+ if m != nil {
+ return m.LogLine
+ }
+ return nil
+}
+
+type FlushRequest struct {
+ Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *FlushRequest) Reset() { *m = FlushRequest{} }
+func (m *FlushRequest) String() string { return proto.CompactTextString(m) }
+func (*FlushRequest) ProtoMessage() {}
+func (*FlushRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{3}
+}
+func (m *FlushRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_FlushRequest.Unmarshal(m, b)
+}
+func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic)
+}
+func (dst *FlushRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FlushRequest.Merge(dst, src)
+}
+func (m *FlushRequest) XXX_Size() int {
+ return xxx_messageInfo_FlushRequest.Size(m)
+}
+func (m *FlushRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_FlushRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlushRequest proto.InternalMessageInfo
+
+func (m *FlushRequest) GetLogs() []byte {
+ if m != nil {
+ return m.Logs
+ }
+ return nil
+}
+
+type SetStatusRequest struct {
+ Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} }
+func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) }
+func (*SetStatusRequest) ProtoMessage() {}
+func (*SetStatusRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{4}
+}
+func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b)
+}
+func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic)
+}
+func (dst *SetStatusRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SetStatusRequest.Merge(dst, src)
+}
+func (m *SetStatusRequest) XXX_Size() int {
+ return xxx_messageInfo_SetStatusRequest.Size(m)
+}
+func (m *SetStatusRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_SetStatusRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo
+
+func (m *SetStatusRequest) GetStatus() string {
+ if m != nil && m.Status != nil {
+ return *m.Status
+ }
+ return ""
+}
+
+type LogOffset struct {
+ RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogOffset) Reset() { *m = LogOffset{} }
+func (m *LogOffset) String() string { return proto.CompactTextString(m) }
+func (*LogOffset) ProtoMessage() {}
+func (*LogOffset) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{5}
+}
+func (m *LogOffset) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogOffset.Unmarshal(m, b)
+}
+func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic)
+}
+func (dst *LogOffset) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogOffset.Merge(dst, src)
+}
+func (m *LogOffset) XXX_Size() int {
+ return xxx_messageInfo_LogOffset.Size(m)
+}
+func (m *LogOffset) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogOffset.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogOffset proto.InternalMessageInfo
+
+func (m *LogOffset) GetRequestId() []byte {
+ if m != nil {
+ return m.RequestId
+ }
+ return nil
+}
+
+type LogLine struct {
+ Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"`
+ Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"`
+ LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogLine) Reset() { *m = LogLine{} }
+func (m *LogLine) String() string { return proto.CompactTextString(m) }
+func (*LogLine) ProtoMessage() {}
+func (*LogLine) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{6}
+}
+func (m *LogLine) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogLine.Unmarshal(m, b)
+}
+func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogLine.Marshal(b, m, deterministic)
+}
+func (dst *LogLine) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogLine.Merge(dst, src)
+}
+func (m *LogLine) XXX_Size() int {
+ return xxx_messageInfo_LogLine.Size(m)
+}
+func (m *LogLine) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogLine.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogLine proto.InternalMessageInfo
+
+func (m *LogLine) GetTime() int64 {
+ if m != nil && m.Time != nil {
+ return *m.Time
+ }
+ return 0
+}
+
+func (m *LogLine) GetLevel() int32 {
+ if m != nil && m.Level != nil {
+ return *m.Level
+ }
+ return 0
+}
+
+func (m *LogLine) GetLogMessage() string {
+ if m != nil && m.LogMessage != nil {
+ return *m.LogMessage
+ }
+ return ""
+}
+
+type RequestLog struct {
+ AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
+ ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"`
+ VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"`
+ RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"`
+ Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"`
+ Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"`
+ Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"`
+ StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"`
+ EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"`
+ Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"`
+ Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"`
+ Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"`
+ Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"`
+ HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"`
+ Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"`
+ ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"`
+ Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"`
+ UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"`
+ UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"`
+ Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"`
+ ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"`
+ Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"`
+ Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"`
+ TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"`
+ TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"`
+ WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"`
+ PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"`
+ ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"`
+ Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"`
+ CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"`
+ Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"`
+ LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"`
+ AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"`
+ ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"`
+ WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"`
+ WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"`
+ ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"`
+ ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *RequestLog) Reset() { *m = RequestLog{} }
+func (m *RequestLog) String() string { return proto.CompactTextString(m) }
+func (*RequestLog) ProtoMessage() {}
+func (*RequestLog) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{7}
+}
+func (m *RequestLog) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_RequestLog.Unmarshal(m, b)
+}
+func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic)
+}
+func (dst *RequestLog) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_RequestLog.Merge(dst, src)
+}
+func (m *RequestLog) XXX_Size() int {
+ return xxx_messageInfo_RequestLog.Size(m)
+}
+func (m *RequestLog) XXX_DiscardUnknown() {
+ xxx_messageInfo_RequestLog.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RequestLog proto.InternalMessageInfo
+
+const Default_RequestLog_ModuleId string = "default"
+const Default_RequestLog_ReplicaIndex int32 = -1
+const Default_RequestLog_Finished bool = true
+
+func (m *RequestLog) GetAppId() string {
+ if m != nil && m.AppId != nil {
+ return *m.AppId
+ }
+ return ""
+}
+
+func (m *RequestLog) GetModuleId() string {
+ if m != nil && m.ModuleId != nil {
+ return *m.ModuleId
+ }
+ return Default_RequestLog_ModuleId
+}
+
+func (m *RequestLog) GetVersionId() string {
+ if m != nil && m.VersionId != nil {
+ return *m.VersionId
+ }
+ return ""
+}
+
+func (m *RequestLog) GetRequestId() []byte {
+ if m != nil {
+ return m.RequestId
+ }
+ return nil
+}
+
+func (m *RequestLog) GetOffset() *LogOffset {
+ if m != nil {
+ return m.Offset
+ }
+ return nil
+}
+
+func (m *RequestLog) GetIp() string {
+ if m != nil && m.Ip != nil {
+ return *m.Ip
+ }
+ return ""
+}
+
+func (m *RequestLog) GetNickname() string {
+ if m != nil && m.Nickname != nil {
+ return *m.Nickname
+ }
+ return ""
+}
+
+func (m *RequestLog) GetStartTime() int64 {
+ if m != nil && m.StartTime != nil {
+ return *m.StartTime
+ }
+ return 0
+}
+
+func (m *RequestLog) GetEndTime() int64 {
+ if m != nil && m.EndTime != nil {
+ return *m.EndTime
+ }
+ return 0
+}
+
+func (m *RequestLog) GetLatency() int64 {
+ if m != nil && m.Latency != nil {
+ return *m.Latency
+ }
+ return 0
+}
+
+func (m *RequestLog) GetMcycles() int64 {
+ if m != nil && m.Mcycles != nil {
+ return *m.Mcycles
+ }
+ return 0
+}
+
+func (m *RequestLog) GetMethod() string {
+ if m != nil && m.Method != nil {
+ return *m.Method
+ }
+ return ""
+}
+
+func (m *RequestLog) GetResource() string {
+ if m != nil && m.Resource != nil {
+ return *m.Resource
+ }
+ return ""
+}
+
+func (m *RequestLog) GetHttpVersion() string {
+ if m != nil && m.HttpVersion != nil {
+ return *m.HttpVersion
+ }
+ return ""
+}
+
+func (m *RequestLog) GetStatus() int32 {
+ if m != nil && m.Status != nil {
+ return *m.Status
+ }
+ return 0
+}
+
+func (m *RequestLog) GetResponseSize() int64 {
+ if m != nil && m.ResponseSize != nil {
+ return *m.ResponseSize
+ }
+ return 0
+}
+
+func (m *RequestLog) GetReferrer() string {
+ if m != nil && m.Referrer != nil {
+ return *m.Referrer
+ }
+ return ""
+}
+
+func (m *RequestLog) GetUserAgent() string {
+ if m != nil && m.UserAgent != nil {
+ return *m.UserAgent
+ }
+ return ""
+}
+
+func (m *RequestLog) GetUrlMapEntry() string {
+ if m != nil && m.UrlMapEntry != nil {
+ return *m.UrlMapEntry
+ }
+ return ""
+}
+
+func (m *RequestLog) GetCombined() string {
+ if m != nil && m.Combined != nil {
+ return *m.Combined
+ }
+ return ""
+}
+
+func (m *RequestLog) GetApiMcycles() int64 {
+ if m != nil && m.ApiMcycles != nil {
+ return *m.ApiMcycles
+ }
+ return 0
+}
+
+func (m *RequestLog) GetHost() string {
+ if m != nil && m.Host != nil {
+ return *m.Host
+ }
+ return ""
+}
+
+func (m *RequestLog) GetCost() float64 {
+ if m != nil && m.Cost != nil {
+ return *m.Cost
+ }
+ return 0
+}
+
+func (m *RequestLog) GetTaskQueueName() string {
+ if m != nil && m.TaskQueueName != nil {
+ return *m.TaskQueueName
+ }
+ return ""
+}
+
+func (m *RequestLog) GetTaskName() string {
+ if m != nil && m.TaskName != nil {
+ return *m.TaskName
+ }
+ return ""
+}
+
+func (m *RequestLog) GetWasLoadingRequest() bool {
+ if m != nil && m.WasLoadingRequest != nil {
+ return *m.WasLoadingRequest
+ }
+ return false
+}
+
+func (m *RequestLog) GetPendingTime() int64 {
+ if m != nil && m.PendingTime != nil {
+ return *m.PendingTime
+ }
+ return 0
+}
+
+func (m *RequestLog) GetReplicaIndex() int32 {
+ if m != nil && m.ReplicaIndex != nil {
+ return *m.ReplicaIndex
+ }
+ return Default_RequestLog_ReplicaIndex
+}
+
+func (m *RequestLog) GetFinished() bool {
+ if m != nil && m.Finished != nil {
+ return *m.Finished
+ }
+ return Default_RequestLog_Finished
+}
+
+func (m *RequestLog) GetCloneKey() []byte {
+ if m != nil {
+ return m.CloneKey
+ }
+ return nil
+}
+
+func (m *RequestLog) GetLine() []*LogLine {
+ if m != nil {
+ return m.Line
+ }
+ return nil
+}
+
+func (m *RequestLog) GetLinesIncomplete() bool {
+ if m != nil && m.LinesIncomplete != nil {
+ return *m.LinesIncomplete
+ }
+ return false
+}
+
+func (m *RequestLog) GetAppEngineRelease() []byte {
+ if m != nil {
+ return m.AppEngineRelease
+ }
+ return nil
+}
+
+func (m *RequestLog) GetExitReason() int32 {
+ if m != nil && m.ExitReason != nil {
+ return *m.ExitReason
+ }
+ return 0
+}
+
+func (m *RequestLog) GetWasThrottledForTime() bool {
+ if m != nil && m.WasThrottledForTime != nil {
+ return *m.WasThrottledForTime
+ }
+ return false
+}
+
+func (m *RequestLog) GetWasThrottledForRequests() bool {
+ if m != nil && m.WasThrottledForRequests != nil {
+ return *m.WasThrottledForRequests
+ }
+ return false
+}
+
+func (m *RequestLog) GetThrottledTime() int64 {
+ if m != nil && m.ThrottledTime != nil {
+ return *m.ThrottledTime
+ }
+ return 0
+}
+
+func (m *RequestLog) GetServerName() []byte {
+ if m != nil {
+ return m.ServerName
+ }
+ return nil
+}
+
+type LogModuleVersion struct {
+ ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"`
+ VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} }
+func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) }
+func (*LogModuleVersion) ProtoMessage() {}
+func (*LogModuleVersion) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{8}
+}
+func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b)
+}
+func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic)
+}
+func (dst *LogModuleVersion) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogModuleVersion.Merge(dst, src)
+}
+func (m *LogModuleVersion) XXX_Size() int {
+ return xxx_messageInfo_LogModuleVersion.Size(m)
+}
+func (m *LogModuleVersion) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogModuleVersion.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo
+
+const Default_LogModuleVersion_ModuleId string = "default"
+
+func (m *LogModuleVersion) GetModuleId() string {
+ if m != nil && m.ModuleId != nil {
+ return *m.ModuleId
+ }
+ return Default_LogModuleVersion_ModuleId
+}
+
+func (m *LogModuleVersion) GetVersionId() string {
+ if m != nil && m.VersionId != nil {
+ return *m.VersionId
+ }
+ return ""
+}
+
+type LogReadRequest struct {
+ AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
+ VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"`
+ ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"`
+ StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
+ EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
+ Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"`
+ RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"`
+ MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"`
+ IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"`
+ Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"`
+ CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"`
+ HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"`
+ ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"`
+ IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"`
+ AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"`
+ IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"`
+ IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"`
+ CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"`
+ NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogReadRequest) Reset() { *m = LogReadRequest{} }
+func (m *LogReadRequest) String() string { return proto.CompactTextString(m) }
+func (*LogReadRequest) ProtoMessage() {}
+func (*LogReadRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{9}
+}
+func (m *LogReadRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogReadRequest.Unmarshal(m, b)
+}
+func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic)
+}
+func (dst *LogReadRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogReadRequest.Merge(dst, src)
+}
+func (m *LogReadRequest) XXX_Size() int {
+ return xxx_messageInfo_LogReadRequest.Size(m)
+}
+func (m *LogReadRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogReadRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo
+
+func (m *LogReadRequest) GetAppId() string {
+ if m != nil && m.AppId != nil {
+ return *m.AppId
+ }
+ return ""
+}
+
+func (m *LogReadRequest) GetVersionId() []string {
+ if m != nil {
+ return m.VersionId
+ }
+ return nil
+}
+
+func (m *LogReadRequest) GetModuleVersion() []*LogModuleVersion {
+ if m != nil {
+ return m.ModuleVersion
+ }
+ return nil
+}
+
+func (m *LogReadRequest) GetStartTime() int64 {
+ if m != nil && m.StartTime != nil {
+ return *m.StartTime
+ }
+ return 0
+}
+
+func (m *LogReadRequest) GetEndTime() int64 {
+ if m != nil && m.EndTime != nil {
+ return *m.EndTime
+ }
+ return 0
+}
+
+func (m *LogReadRequest) GetOffset() *LogOffset {
+ if m != nil {
+ return m.Offset
+ }
+ return nil
+}
+
+func (m *LogReadRequest) GetRequestId() [][]byte {
+ if m != nil {
+ return m.RequestId
+ }
+ return nil
+}
+
+func (m *LogReadRequest) GetMinimumLogLevel() int32 {
+ if m != nil && m.MinimumLogLevel != nil {
+ return *m.MinimumLogLevel
+ }
+ return 0
+}
+
+func (m *LogReadRequest) GetIncludeIncomplete() bool {
+ if m != nil && m.IncludeIncomplete != nil {
+ return *m.IncludeIncomplete
+ }
+ return false
+}
+
+func (m *LogReadRequest) GetCount() int64 {
+ if m != nil && m.Count != nil {
+ return *m.Count
+ }
+ return 0
+}
+
+func (m *LogReadRequest) GetCombinedLogRegex() string {
+ if m != nil && m.CombinedLogRegex != nil {
+ return *m.CombinedLogRegex
+ }
+ return ""
+}
+
+func (m *LogReadRequest) GetHostRegex() string {
+ if m != nil && m.HostRegex != nil {
+ return *m.HostRegex
+ }
+ return ""
+}
+
+func (m *LogReadRequest) GetReplicaIndex() int32 {
+ if m != nil && m.ReplicaIndex != nil {
+ return *m.ReplicaIndex
+ }
+ return 0
+}
+
+func (m *LogReadRequest) GetIncludeAppLogs() bool {
+ if m != nil && m.IncludeAppLogs != nil {
+ return *m.IncludeAppLogs
+ }
+ return false
+}
+
+func (m *LogReadRequest) GetAppLogsPerRequest() int32 {
+ if m != nil && m.AppLogsPerRequest != nil {
+ return *m.AppLogsPerRequest
+ }
+ return 0
+}
+
+func (m *LogReadRequest) GetIncludeHost() bool {
+ if m != nil && m.IncludeHost != nil {
+ return *m.IncludeHost
+ }
+ return false
+}
+
+func (m *LogReadRequest) GetIncludeAll() bool {
+ if m != nil && m.IncludeAll != nil {
+ return *m.IncludeAll
+ }
+ return false
+}
+
+func (m *LogReadRequest) GetCacheIterator() bool {
+ if m != nil && m.CacheIterator != nil {
+ return *m.CacheIterator
+ }
+ return false
+}
+
+func (m *LogReadRequest) GetNumShards() int32 {
+ if m != nil && m.NumShards != nil {
+ return *m.NumShards
+ }
+ return 0
+}
+
+type LogReadResponse struct {
+ Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"`
+ Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"`
+ LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogReadResponse) Reset() { *m = LogReadResponse{} }
+func (m *LogReadResponse) String() string { return proto.CompactTextString(m) }
+func (*LogReadResponse) ProtoMessage() {}
+func (*LogReadResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{10}
+}
+func (m *LogReadResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogReadResponse.Unmarshal(m, b)
+}
+func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic)
+}
+func (dst *LogReadResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogReadResponse.Merge(dst, src)
+}
+func (m *LogReadResponse) XXX_Size() int {
+ return xxx_messageInfo_LogReadResponse.Size(m)
+}
+func (m *LogReadResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogReadResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo
+
+func (m *LogReadResponse) GetLog() []*RequestLog {
+ if m != nil {
+ return m.Log
+ }
+ return nil
+}
+
+func (m *LogReadResponse) GetOffset() *LogOffset {
+ if m != nil {
+ return m.Offset
+ }
+ return nil
+}
+
+func (m *LogReadResponse) GetLastEndTime() int64 {
+ if m != nil && m.LastEndTime != nil {
+ return *m.LastEndTime
+ }
+ return 0
+}
+
+type LogUsageRecord struct {
+ VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"`
+ StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
+ EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
+ Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
+ TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"`
+ Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} }
+func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) }
+func (*LogUsageRecord) ProtoMessage() {}
+func (*LogUsageRecord) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{11}
+}
+func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b)
+}
+func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic)
+}
+func (dst *LogUsageRecord) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogUsageRecord.Merge(dst, src)
+}
+func (m *LogUsageRecord) XXX_Size() int {
+ return xxx_messageInfo_LogUsageRecord.Size(m)
+}
+func (m *LogUsageRecord) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogUsageRecord.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo
+
+func (m *LogUsageRecord) GetVersionId() string {
+ if m != nil && m.VersionId != nil {
+ return *m.VersionId
+ }
+ return ""
+}
+
+func (m *LogUsageRecord) GetStartTime() int32 {
+ if m != nil && m.StartTime != nil {
+ return *m.StartTime
+ }
+ return 0
+}
+
+func (m *LogUsageRecord) GetEndTime() int32 {
+ if m != nil && m.EndTime != nil {
+ return *m.EndTime
+ }
+ return 0
+}
+
+func (m *LogUsageRecord) GetCount() int64 {
+ if m != nil && m.Count != nil {
+ return *m.Count
+ }
+ return 0
+}
+
+func (m *LogUsageRecord) GetTotalSize() int64 {
+ if m != nil && m.TotalSize != nil {
+ return *m.TotalSize
+ }
+ return 0
+}
+
+func (m *LogUsageRecord) GetRecords() int32 {
+ if m != nil && m.Records != nil {
+ return *m.Records
+ }
+ return 0
+}
+
+type LogUsageRequest struct {
+ AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
+ VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"`
+ StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
+ EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
+ ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"`
+ CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"`
+ UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"`
+ VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} }
+func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) }
+func (*LogUsageRequest) ProtoMessage() {}
+func (*LogUsageRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{12}
+}
+func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b)
+}
+func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic)
+}
+func (dst *LogUsageRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogUsageRequest.Merge(dst, src)
+}
+func (m *LogUsageRequest) XXX_Size() int {
+ return xxx_messageInfo_LogUsageRequest.Size(m)
+}
+func (m *LogUsageRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogUsageRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo
+
+const Default_LogUsageRequest_ResolutionHours uint32 = 1
+
+func (m *LogUsageRequest) GetAppId() string {
+ if m != nil && m.AppId != nil {
+ return *m.AppId
+ }
+ return ""
+}
+
+func (m *LogUsageRequest) GetVersionId() []string {
+ if m != nil {
+ return m.VersionId
+ }
+ return nil
+}
+
+func (m *LogUsageRequest) GetStartTime() int32 {
+ if m != nil && m.StartTime != nil {
+ return *m.StartTime
+ }
+ return 0
+}
+
+func (m *LogUsageRequest) GetEndTime() int32 {
+ if m != nil && m.EndTime != nil {
+ return *m.EndTime
+ }
+ return 0
+}
+
+func (m *LogUsageRequest) GetResolutionHours() uint32 {
+ if m != nil && m.ResolutionHours != nil {
+ return *m.ResolutionHours
+ }
+ return Default_LogUsageRequest_ResolutionHours
+}
+
+func (m *LogUsageRequest) GetCombineVersions() bool {
+ if m != nil && m.CombineVersions != nil {
+ return *m.CombineVersions
+ }
+ return false
+}
+
+func (m *LogUsageRequest) GetUsageVersion() int32 {
+ if m != nil && m.UsageVersion != nil {
+ return *m.UsageVersion
+ }
+ return 0
+}
+
+func (m *LogUsageRequest) GetVersionsOnly() bool {
+ if m != nil && m.VersionsOnly != nil {
+ return *m.VersionsOnly
+ }
+ return false
+}
+
+type LogUsageResponse struct {
+ Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"`
+ Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} }
+func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) }
+func (*LogUsageResponse) ProtoMessage() {}
+func (*LogUsageResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_log_service_f054fd4b5012319d, []int{13}
+}
+func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b)
+}
+func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic)
+}
+func (dst *LogUsageResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogUsageResponse.Merge(dst, src)
+}
+func (m *LogUsageResponse) XXX_Size() int {
+ return xxx_messageInfo_LogUsageResponse.Size(m)
+}
+func (m *LogUsageResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogUsageResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo
+
+func (m *LogUsageResponse) GetUsage() []*LogUsageRecord {
+ if m != nil {
+ return m.Usage
+ }
+ return nil
+}
+
+func (m *LogUsageResponse) GetSummary() *LogUsageRecord {
+ if m != nil {
+ return m.Summary
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError")
+ proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine")
+ proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup")
+ proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest")
+ proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest")
+ proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset")
+ proto.RegisterType((*LogLine)(nil), "appengine.LogLine")
+ proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog")
+ proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion")
+ proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest")
+ proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse")
+ proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord")
+ proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest")
+ proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse")
+}
+
+func init() {
+ proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d)
+}
+
+var fileDescriptor_log_service_f054fd4b5012319d = []byte{
+ // 1553 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6,
+ 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e,
+ 0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40,
+ 0x72, 0x3a, 0xd3, 0x1b, 0x0c, 0x0a, 0x1c, 0x81, 0x18, 0x2f, 0xb1, 0xc8, 0xee, 0xc2, 0x91, 0x72,
+ 0xdb, 0xdb, 0x3e, 0x46, 0x1f, 0xa2, 0xaf, 0xd2, 0xb7, 0xe9, 0xec, 0xd9, 0x05, 0x44, 0x2a, 0x4d,
+ 0xc6, 0x33, 0xb9, 0xe0, 0x10, 0xfb, 0x9d, 0x83, 0xdd, 0xf3, 0xf3, 0x9d, 0x6f, 0x01, 0xc7, 0xb9,
+ 0x94, 0xb9, 0xc0, 0xc3, 0x5c, 0x8a, 0xa4, 0xcc, 0x0f, 0xa5, 0xca, 0x8f, 0x92, 0xaa, 0xc2, 0x32,
+ 0x2f, 0x4a, 0x3c, 0x2a, 0x4a, 0x83, 0xaa, 0x4c, 0xc4, 0x91, 0x90, 0xb9, 0xfd, 0xc5, 0x1a, 0xd5,
+ 0xbb, 0x22, 0xc5, 0xc3, 0x4a, 0x49, 0x23, 0xd9, 0xb0, 0xf5, 0x0c, 0x5f, 0xc3, 0x74, 0x29, 0xf3,
+ 0x73, 0x67, 0x3e, 0x51, 0x4a, 0xaa, 0xf0, 0x4b, 0x18, 0xd2, 0xc3, 0x9f, 0x65, 0x86, 0x6c, 0x17,
+ 0x3a, 0x67, 0xdf, 0xce, 0x7e, 0xc7, 0xee, 0xc0, 0xf4, 0xf4, 0xf5, 0xf7, 0x2f, 0x96, 0xa7, 0x7f,
+ 0x89, 0xa3, 0x93, 0xef, 0xde, 0x9c, 0x9c, 0x5f, 0xcc, 0x02, 0xb6, 0x0f, 0x93, 0xf3, 0x8b, 0xb3,
+ 0xe8, 0xc5, 0xcb, 0x93, 0xf8, 0x24, 0x8a, 0xce, 0xa2, 0x59, 0x27, 0xcc, 0x61, 0xef, 0x8d, 0x46,
+ 0xf5, 0xa2, 0xaa, 0x96, 0x32, 0x5f, 0x16, 0x25, 0xb2, 0x8f, 0x60, 0xcf, 0x14, 0x6b, 0xd4, 0x26,
+ 0x59, 0x57, 0x71, 0xad, 0x31, 0xe5, 0xc1, 0xbc, 0xb3, 0xe8, 0x46, 0x93, 0x16, 0x7d, 0xa3, 0x31,
+ 0x65, 0x07, 0xd0, 0x13, 0xf8, 0x0e, 0x05, 0xef, 0x90, 0xd5, 0x2d, 0x18, 0x87, 0xfe, 0x1a, 0xb5,
+ 0x4e, 0x72, 0xe4, 0xdd, 0x79, 0x67, 0x31, 0x8c, 0x9a, 0x65, 0xf8, 0x12, 0xa6, 0x37, 0x07, 0xbd,
+ 0x54, 0xb2, 0xae, 0xd8, 0x9f, 0x60, 0x60, 0x73, 0x15, 0x45, 0x89, 0xbc, 0x33, 0xef, 0x2e, 0x46,
+ 0x9f, 0xdf, 0x3f, 0x6c, 0x33, 0x3d, 0xdc, 0x0e, 0x2b, 0xea, 0x0b, 0xf7, 0x10, 0x86, 0x30, 0xfe,
+ 0x5a, 0xd4, 0x7a, 0x15, 0xe1, 0x0f, 0x35, 0x6a, 0xc3, 0x18, 0xec, 0x08, 0x99, 0x6b, 0x1e, 0xcc,
+ 0x83, 0xc5, 0x38, 0xa2, 0xe7, 0xf0, 0x39, 0xcc, 0xce, 0xd1, 0x9c, 0x9b, 0xc4, 0xd4, 0xba, 0xf1,
+ 0xbb, 0x07, 0xbb, 0x9a, 0x00, 0xca, 0x67, 0x18, 0xf9, 0x55, 0xf8, 0x1c, 0x86, 0x4b, 0x99, 0x9f,
+ 0x5d, 0x5e, 0x6a, 0x34, 0xec, 0x11, 0x80, 0x72, 0xfe, 0x71, 0x91, 0xf9, 0x2d, 0x87, 0x1e, 0x39,
+ 0xcd, 0xc2, 0x0b, 0xe8, 0x37, 0x65, 0x62, 0xb0, 0x63, 0x0b, 0xe2, 0x8b, 0x43, 0xcf, 0xdb, 0x35,
+ 0xe9, 0x35, 0x35, 0x79, 0x0c, 0x23, 0x9b, 0xe6, 0x76, 0x5d, 0x40, 0xc8, 0xfc, 0x95, 0x2f, 0xcd,
+ 0x3f, 0x01, 0xc0, 0x47, 0xb9, 0x94, 0x39, 0xbb, 0x0b, 0xbb, 0x49, 0x55, 0xb9, 0xf3, 0xad, 0x6b,
+ 0x2f, 0xa9, 0xaa, 0xd3, 0x8c, 0x7d, 0x08, 0xc3, 0xb5, 0xcc, 0x6a, 0x81, 0xd6, 0xf2, 0xd1, 0x3c,
+ 0x58, 0x0c, 0x8f, 0xfb, 0x19, 0x5e, 0x26, 0xb5, 0x30, 0xd1, 0xc0, 0x59, 0x4e, 0x33, 0x9b, 0xc0,
+ 0x3b, 0x54, 0xba, 0x90, 0xa5, 0x75, 0xeb, 0xd0, 0x06, 0x43, 0x8f, 0x38, 0xf3, 0x46, 0x7e, 0x36,
+ 0x94, 0xcd, 0xfc, 0xd8, 0x27, 0xb0, 0x2b, 0xa9, 0x10, 0xfc, 0xe9, 0x3c, 0x58, 0x8c, 0x3e, 0x3f,
+ 0xd8, 0xe8, 0x47, 0x5b, 0xa4, 0xc8, 0xfb, 0xb0, 0x3d, 0xe8, 0x14, 0x15, 0xdf, 0xa1, 0x33, 0x3a,
+ 0x45, 0xc5, 0x1e, 0xc0, 0xa0, 0x2c, 0xd2, 0xb7, 0x65, 0xb2, 0x46, 0xde, 0xb3, 0x01, 0x46, 0xed,
+ 0xda, 0x1e, 0xac, 0x4d, 0xa2, 0x4c, 0x4c, 0x45, 0xdb, 0xa5, 0xa2, 0x0d, 0x09, 0xb9, 0xb0, 0x95,
+ 0xbb, 0x0f, 0x03, 0x2c, 0x33, 0x67, 0xec, 0x93, 0xb1, 0x8f, 0x65, 0x46, 0x26, 0x0e, 0x7d, 0x91,
+ 0x18, 0x2c, 0xd3, 0x6b, 0x3e, 0x70, 0x16, 0xbf, 0x24, 0xb2, 0xa5, 0xd7, 0xa9, 0x40, 0xcd, 0x87,
+ 0xce, 0xe2, 0x97, 0xb6, 0xd7, 0x6b, 0x34, 0x2b, 0x99, 0x71, 0x70, 0xbd, 0x76, 0x2b, 0x1b, 0xa1,
+ 0x42, 0x2d, 0x6b, 0x95, 0x22, 0x1f, 0x91, 0xa5, 0x5d, 0xb3, 0x27, 0x30, 0x5e, 0x19, 0x53, 0xc5,
+ 0xbe, 0x58, 0x7c, 0x4c, 0xf6, 0x91, 0xc5, 0xbe, 0x77, 0xd0, 0x06, 0x85, 0x26, 0xd4, 0x60, 0xbf,
+ 0x62, 0x4f, 0x61, 0xa2, 0x50, 0x57, 0xb2, 0xd4, 0x18, 0xeb, 0xe2, 0x27, 0xe4, 0x7b, 0x14, 0xce,
+ 0xb8, 0x01, 0xcf, 0x8b, 0x9f, 0xd0, 0x9d, 0x7d, 0x89, 0x4a, 0xa1, 0xe2, 0x53, 0x57, 0x9d, 0x66,
+ 0x6d, 0xab, 0x53, 0x6b, 0x54, 0x71, 0x92, 0x63, 0x69, 0xf8, 0x8c, 0xac, 0x43, 0x8b, 0xbc, 0xb0,
+ 0x00, 0x0b, 0x61, 0x52, 0x2b, 0x11, 0xaf, 0x93, 0x2a, 0xc6, 0xd2, 0xa8, 0x6b, 0xbe, 0xef, 0x62,
+ 0xab, 0x95, 0x78, 0x95, 0x54, 0x27, 0x16, 0xb2, 0xdb, 0xa7, 0x72, 0xfd, 0x8f, 0xa2, 0xc4, 0x8c,
+ 0x33, 0x97, 0x5a, 0xb3, 0xb6, 0x0c, 0x4c, 0xaa, 0x22, 0x6e, 0x8a, 0x75, 0x67, 0x1e, 0x2c, 0xba,
+ 0x11, 0x24, 0x55, 0xf1, 0xca, 0xd7, 0x8b, 0xc1, 0xce, 0x4a, 0x6a, 0xc3, 0x0f, 0xe8, 0x64, 0x7a,
+ 0xb6, 0x58, 0x6a, 0xb1, 0xbb, 0xf3, 0x60, 0x11, 0x44, 0xf4, 0xcc, 0x9e, 0xc1, 0xd4, 0x24, 0xfa,
+ 0x6d, 0xfc, 0x43, 0x8d, 0x35, 0xc6, 0xd4, 0xe8, 0x7b, 0xf4, 0xca, 0xc4, 0xc2, 0xdf, 0x59, 0xf4,
+ 0xb5, 0xed, 0xf6, 0x43, 0x18, 0x92, 0x1f, 0x79, 0x7c, 0xe0, 0x92, 0xb5, 0x00, 0x19, 0x0f, 0xe1,
+ 0xce, 0x8f, 0x89, 0x8e, 0x85, 0x4c, 0xb2, 0xa2, 0xcc, 0x63, 0xcf, 0x3e, 0xce, 0xe7, 0xc1, 0x62,
+ 0x10, 0xed, 0xff, 0x98, 0xe8, 0xa5, 0xb3, 0x34, 0x83, 0xfb, 0x04, 0xc6, 0x15, 0x96, 0xe4, 0x4b,
+ 0xfc, 0xb8, 0x4f, 0xe1, 0x8f, 0x3c, 0x46, 0x1c, 0xf9, 0xd8, 0x36, 0xa0, 0x12, 0x45, 0x9a, 0xc4,
+ 0x45, 0x99, 0xe1, 0x15, 0x7f, 0x30, 0x0f, 0x16, 0xbd, 0xe3, 0xce, 0xa7, 0x9f, 0xd9, 0x26, 0x90,
+ 0xe1, 0xd4, 0xe2, 0x6c, 0x0e, 0x83, 0xcb, 0xa2, 0x2c, 0xf4, 0x0a, 0x33, 0xfe, 0xd0, 0x1e, 0x78,
+ 0xbc, 0x63, 0x54, 0x8d, 0x51, 0x8b, 0xda, 0xd0, 0x53, 0x21, 0x4b, 0x8c, 0xdf, 0xe2, 0x35, 0xff,
+ 0x3d, 0x09, 0xc0, 0x80, 0x80, 0x6f, 0xf1, 0x9a, 0x3d, 0x83, 0x1d, 0x52, 0xab, 0x47, 0xa4, 0x56,
+ 0x6c, 0x7b, 0x3a, 0x48, 0xa6, 0xc8, 0xce, 0xfe, 0x08, 0x33, 0xfb, 0xaf, 0xe3, 0xa2, 0x4c, 0xe5,
+ 0xba, 0x12, 0x68, 0x90, 0x7f, 0x48, 0xf9, 0x4d, 0x09, 0x3f, 0x6d, 0x61, 0xf6, 0x09, 0x30, 0x3b,
+ 0xed, 0x6e, 0x9b, 0x58, 0xa1, 0xc0, 0x44, 0x23, 0x7f, 0x46, 0x07, 0xcf, 0x92, 0xaa, 0x3a, 0x21,
+ 0x43, 0xe4, 0x70, 0xdb, 0x49, 0xbc, 0x2a, 0x4c, 0xac, 0x30, 0xd1, 0xb2, 0xe4, 0x7f, 0xb0, 0x69,
+ 0x46, 0x60, 0xa1, 0x88, 0x10, 0xf6, 0x05, 0xdc, 0xb3, 0xc5, 0x35, 0x2b, 0x25, 0x8d, 0x11, 0x98,
+ 0xc5, 0x97, 0x52, 0xb9, 0xb2, 0x3d, 0xa6, 0xf3, 0x6d, 0xe9, 0x2f, 0x1a, 0xe3, 0xd7, 0x52, 0x51,
+ 0xf9, 0xbe, 0x84, 0x07, 0x3f, 0x7f, 0xc9, 0xf7, 0x45, 0xf3, 0x39, 0xbd, 0xf8, 0xc1, 0xad, 0x17,
+ 0x7d, 0x77, 0x34, 0xdd, 0x17, 0xed, 0x8b, 0x74, 0xd2, 0x13, 0x6a, 0xd0, 0xa4, 0x45, 0xe9, 0x8c,
+ 0xc7, 0x30, 0xb2, 0x97, 0x1a, 0x2a, 0x47, 0x8a, 0x90, 0x12, 0x04, 0x07, 0x59, 0x5a, 0x84, 0x7f,
+ 0x83, 0xd9, 0x52, 0xe6, 0xaf, 0x48, 0xc8, 0x9a, 0x81, 0xdb, 0xd2, 0xbc, 0xe0, 0x7d, 0x35, 0x2f,
+ 0xd8, 0xd2, 0xbc, 0xf0, 0xbf, 0x3d, 0xd8, 0x5b, 0xca, 0x3c, 0xc2, 0x24, 0x6b, 0x28, 0xf5, 0x0b,
+ 0x12, 0x7b, 0x7b, 0xa3, 0xee, 0xb6, 0x78, 0x7e, 0x05, 0x7b, 0x3e, 0x9a, 0x46, 0x23, 0xee, 0x10,
+ 0x0f, 0x1e, 0x6e, 0xf3, 0x60, 0x2b, 0x85, 0x68, 0xb2, 0xde, 0xca, 0x68, 0x5b, 0x07, 0xbb, 0x54,
+ 0xa9, 0x5f, 0xd0, 0xc1, 0x1d, 0x32, 0xb6, 0x3a, 0x78, 0xa3, 0xcd, 0xbd, 0xf7, 0xd0, 0xe6, 0x6d,
+ 0xa1, 0xdf, 0x9d, 0x77, 0xb7, 0x85, 0xfe, 0x39, 0xec, 0xaf, 0x8b, 0xb2, 0x58, 0xd7, 0xeb, 0x98,
+ 0xae, 0x60, 0xba, 0xb5, 0xfa, 0xc4, 0xa6, 0xa9, 0x37, 0x58, 0x46, 0xd3, 0xfd, 0xf5, 0x29, 0xb0,
+ 0xa2, 0x4c, 0x45, 0x9d, 0xe1, 0x26, 0x9d, 0x07, 0x6e, 0x5c, 0xbd, 0x65, 0x83, 0xd0, 0x07, 0xd0,
+ 0x4b, 0x65, 0x5d, 0x1a, 0x3e, 0xa4, 0xf8, 0xdd, 0xc2, 0xd2, 0xbc, 0x91, 0x23, 0x3a, 0x51, 0x61,
+ 0x8e, 0x57, 0x7c, 0x8f, 0x7a, 0x35, 0x6b, 0x2c, 0xd4, 0xa5, 0x1c, 0xaf, 0x6c, 0xf4, 0x56, 0x83,
+ 0xbc, 0x97, 0x53, 0xcb, 0xa1, 0x45, 0x9c, 0xf9, 0xe9, 0xed, 0x71, 0x9f, 0x51, 0xe4, 0xdb, 0xa3,
+ 0xbe, 0x80, 0x59, 0x13, 0xb6, 0xed, 0x35, 0x7d, 0x23, 0x00, 0x05, 0xbd, 0xe7, 0x71, 0xf7, 0x75,
+ 0xa1, 0xd9, 0x11, 0x1c, 0x34, 0x1e, 0x71, 0x85, 0x2d, 0xf3, 0xf9, 0x3e, 0xed, 0xba, 0x9f, 0x38,
+ 0xb7, 0xbf, 0xa2, 0xda, 0x50, 0xa4, 0x66, 0x6b, 0x92, 0xcd, 0x11, 0x6d, 0x3b, 0xf2, 0xd8, 0x37,
+ 0x56, 0x29, 0x1f, 0xc3, 0xa8, 0x3d, 0x5d, 0x08, 0x3e, 0x26, 0x0f, 0x68, 0x0e, 0x16, 0xc2, 0x8e,
+ 0x4d, 0x9a, 0xa4, 0x2b, 0x8c, 0x0b, 0x83, 0x2a, 0x31, 0x52, 0xf1, 0x09, 0xf9, 0x4c, 0x08, 0x3d,
+ 0xf5, 0xa0, 0xad, 0x44, 0x59, 0xaf, 0x63, 0xbd, 0x4a, 0x54, 0xa6, 0x39, 0xa3, 0x88, 0x86, 0x65,
+ 0xbd, 0x3e, 0x27, 0x20, 0xfc, 0x57, 0x40, 0xdf, 0x83, 0x8e, 0xdb, 0xee, 0xb2, 0x61, 0x1f, 0x43,
+ 0x57, 0xc8, 0x9c, 0x07, 0xc4, 0xcd, 0xbb, 0x1b, 0x2c, 0xb9, 0xf9, 0xc6, 0x88, 0xac, 0xc7, 0x06,
+ 0xa3, 0x3a, 0xef, 0xc1, 0xa8, 0x10, 0x26, 0x22, 0xd1, 0x26, 0x6e, 0xf9, 0xe9, 0xc8, 0x3b, 0xb2,
+ 0xe0, 0x89, 0xe3, 0x68, 0xf8, 0x9f, 0x80, 0x46, 0xed, 0x8d, 0xfd, 0xac, 0x89, 0x30, 0x95, 0xea,
+ 0xf6, 0x4c, 0x05, 0xb7, 0x86, 0xf3, 0xd6, 0x3c, 0x74, 0x5c, 0x7e, 0xff, 0x7f, 0x1e, 0xba, 0x64,
+ 0x6c, 0xe7, 0xa1, 0xe5, 0xd9, 0xce, 0x26, 0xcf, 0x1e, 0x01, 0x18, 0x69, 0x12, 0xe1, 0xee, 0xe1,
+ 0x9e, 0x9b, 0x2f, 0x42, 0xe8, 0x12, 0xe6, 0xd0, 0x57, 0x14, 0x97, 0xe6, 0xbb, 0x6e, 0x3b, 0xbf,
+ 0x0c, 0xff, 0xdd, 0xa1, 0x4a, 0xfa, 0xd0, 0x7f, 0x8b, 0x4c, 0xfc, 0x7c, 0xc4, 0x7b, 0xbf, 0x36,
+ 0xe2, 0xbd, 0xcd, 0x11, 0x9f, 0xd9, 0xcf, 0x11, 0x51, 0x1b, 0xbb, 0xf7, 0x4a, 0xd6, 0x4a, 0x53,
+ 0x0a, 0x93, 0xe3, 0xe0, 0xb3, 0x68, 0x7a, 0x63, 0xfa, 0xc6, 0x5a, 0xec, 0x25, 0xe3, 0x07, 0xa7,
+ 0xd1, 0x23, 0x97, 0xd4, 0x20, 0x9a, 0x7a, 0xdc, 0x8b, 0x0e, 0x7d, 0xa0, 0xd4, 0x36, 0xb1, 0x56,
+ 0xb8, 0xdc, 0xa8, 0x8f, 0x09, 0x6c, 0xa4, 0xe9, 0x29, 0x4c, 0x9a, 0x7d, 0x62, 0x59, 0x8a, 0x6b,
+ 0x3f, 0xe2, 0xe3, 0x06, 0x3c, 0x2b, 0xc5, 0x75, 0x78, 0x45, 0x2a, 0xed, 0xab, 0xe4, 0x09, 0x77,
+ 0x04, 0x3d, 0xda, 0xc8, 0x53, 0xee, 0xfe, 0x36, 0x8d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05,
+ 0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd,
+ 0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00,
+ 0x00,
+}
diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.proto b/vendor/google.golang.org/appengine/internal/log/log_service.proto
new file mode 100644
index 00000000..8981dc47
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/log/log_service.proto
@@ -0,0 +1,150 @@
+syntax = "proto2";
+option go_package = "log";
+
+package appengine;
+
+message LogServiceError {
+ enum ErrorCode {
+ OK = 0;
+ INVALID_REQUEST = 1;
+ STORAGE_ERROR = 2;
+ }
+}
+
+message UserAppLogLine {
+ required int64 timestamp_usec = 1;
+ required int64 level = 2;
+ required string message = 3;
+}
+
+message UserAppLogGroup {
+ repeated UserAppLogLine log_line = 2;
+}
+
+message FlushRequest {
+ optional bytes logs = 1;
+}
+
+message SetStatusRequest {
+ required string status = 1;
+}
+
+
+message LogOffset {
+ optional bytes request_id = 1;
+}
+
+message LogLine {
+ required int64 time = 1;
+ required int32 level = 2;
+ required string log_message = 3;
+}
+
+message RequestLog {
+ required string app_id = 1;
+ optional string module_id = 37 [default="default"];
+ required string version_id = 2;
+ required bytes request_id = 3;
+ optional LogOffset offset = 35;
+ required string ip = 4;
+ optional string nickname = 5;
+ required int64 start_time = 6;
+ required int64 end_time = 7;
+ required int64 latency = 8;
+ required int64 mcycles = 9;
+ required string method = 10;
+ required string resource = 11;
+ required string http_version = 12;
+ required int32 status = 13;
+ required int64 response_size = 14;
+ optional string referrer = 15;
+ optional string user_agent = 16;
+ required string url_map_entry = 17;
+ required string combined = 18;
+ optional int64 api_mcycles = 19;
+ optional string host = 20;
+ optional double cost = 21;
+
+ optional string task_queue_name = 22;
+ optional string task_name = 23;
+
+ optional bool was_loading_request = 24;
+ optional int64 pending_time = 25;
+ optional int32 replica_index = 26 [default = -1];
+ optional bool finished = 27 [default = true];
+ optional bytes clone_key = 28;
+
+ repeated LogLine line = 29;
+
+ optional bool lines_incomplete = 36;
+ optional bytes app_engine_release = 38;
+
+ optional int32 exit_reason = 30;
+ optional bool was_throttled_for_time = 31;
+ optional bool was_throttled_for_requests = 32;
+ optional int64 throttled_time = 33;
+
+ optional bytes server_name = 34;
+}
+
+message LogModuleVersion {
+ optional string module_id = 1 [default="default"];
+ optional string version_id = 2;
+}
+
+message LogReadRequest {
+ required string app_id = 1;
+ repeated string version_id = 2;
+ repeated LogModuleVersion module_version = 19;
+
+ optional int64 start_time = 3;
+ optional int64 end_time = 4;
+ optional LogOffset offset = 5;
+ repeated bytes request_id = 6;
+
+ optional int32 minimum_log_level = 7;
+ optional bool include_incomplete = 8;
+ optional int64 count = 9;
+
+ optional string combined_log_regex = 14;
+ optional string host_regex = 15;
+ optional int32 replica_index = 16;
+
+ optional bool include_app_logs = 10;
+ optional int32 app_logs_per_request = 17;
+ optional bool include_host = 11;
+ optional bool include_all = 12;
+ optional bool cache_iterator = 13;
+ optional int32 num_shards = 18;
+}
+
+message LogReadResponse {
+ repeated RequestLog log = 1;
+ optional LogOffset offset = 2;
+ optional int64 last_end_time = 3;
+}
+
+message LogUsageRecord {
+ optional string version_id = 1;
+ optional int32 start_time = 2;
+ optional int32 end_time = 3;
+ optional int64 count = 4;
+ optional int64 total_size = 5;
+ optional int32 records = 6;
+}
+
+message LogUsageRequest {
+ required string app_id = 1;
+ repeated string version_id = 2;
+ optional int32 start_time = 3;
+ optional int32 end_time = 4;
+ optional uint32 resolution_hours = 5 [default = 1];
+ optional bool combine_versions = 6;
+ optional int32 usage_version = 7;
+ optional bool versions_only = 8;
+}
+
+message LogUsageResponse {
+ repeated LogUsageRecord usage = 1;
+ optional LogUsageRecord summary = 2;
+}
diff --git a/vendor/google.golang.org/appengine/internal/main.go b/vendor/google.golang.org/appengine/internal/main.go
new file mode 100644
index 00000000..1e765312
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/main.go
@@ -0,0 +1,16 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build appengine
+
+package internal
+
+import (
+ "appengine_internal"
+)
+
+func Main() {
+ MainPath = ""
+ appengine_internal.Main()
+}
diff --git a/vendor/google.golang.org/appengine/internal/main_common.go b/vendor/google.golang.org/appengine/internal/main_common.go
new file mode 100644
index 00000000..357dce4d
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/main_common.go
@@ -0,0 +1,7 @@
+package internal
+
+// MainPath stores the file path of the main package. On App Engine Standard
+// using Go version 1.9 and below, this will be unset. On App Engine Flex and
+// App Engine Standard second-gen (Go 1.11 and above), this will be the
+// filepath to package main.
+var MainPath string
diff --git a/vendor/google.golang.org/appengine/internal/main_vm.go b/vendor/google.golang.org/appengine/internal/main_vm.go
new file mode 100644
index 00000000..ddb79a33
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/main_vm.go
@@ -0,0 +1,69 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+
+package internal
+
+import (
+ "io"
+ "log"
+ "net/http"
+ "net/url"
+ "os"
+ "path/filepath"
+ "runtime"
+)
+
+func Main() {
+ MainPath = filepath.Dir(findMainPath())
+ installHealthChecker(http.DefaultServeMux)
+
+ port := "8080"
+ if s := os.Getenv("PORT"); s != "" {
+ port = s
+ }
+
+ host := ""
+ if IsDevAppServer() {
+ host = "127.0.0.1"
+ }
+ if err := http.ListenAndServe(host+":"+port, http.HandlerFunc(handleHTTP)); err != nil {
+ log.Fatalf("http.ListenAndServe: %v", err)
+ }
+}
+
+// Find the path to package main by looking at the root Caller.
+func findMainPath() string {
+ pc := make([]uintptr, 100)
+ n := runtime.Callers(2, pc)
+ frames := runtime.CallersFrames(pc[:n])
+ for {
+ frame, more := frames.Next()
+ // Tests won't have package main, instead they have testing.tRunner
+ if frame.Function == "main.main" || frame.Function == "testing.tRunner" {
+ return frame.File
+ }
+ if !more {
+ break
+ }
+ }
+ return ""
+}
+
+func installHealthChecker(mux *http.ServeMux) {
+ // If no health check handler has been installed by this point, add a trivial one.
+ const healthPath = "/_ah/health"
+ hreq := &http.Request{
+ Method: "GET",
+ URL: &url.URL{
+ Path: healthPath,
+ },
+ }
+ if _, pat := mux.Handler(hreq); pat != healthPath {
+ mux.HandleFunc(healthPath, func(w http.ResponseWriter, r *http.Request) {
+ io.WriteString(w, "ok")
+ })
+ }
+}
diff --git a/vendor/google.golang.org/appengine/internal/metadata.go b/vendor/google.golang.org/appengine/internal/metadata.go
new file mode 100644
index 00000000..c4ba63bb
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/metadata.go
@@ -0,0 +1,60 @@
+// Copyright 2014 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package internal
+
+// This file has code for accessing metadata.
+//
+// References:
+// https://cloud.google.com/compute/docs/metadata
+
+import (
+ "fmt"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+)
+
+const (
+ metadataHost = "metadata"
+ metadataPath = "/computeMetadata/v1/"
+)
+
+var (
+ metadataRequestHeaders = http.Header{
+ "Metadata-Flavor": []string{"Google"},
+ }
+)
+
+// TODO(dsymonds): Do we need to support default values, like Python?
+func mustGetMetadata(key string) []byte {
+ b, err := getMetadata(key)
+ if err != nil {
+ panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err))
+ }
+ return b
+}
+
+func getMetadata(key string) ([]byte, error) {
+ // TODO(dsymonds): May need to use url.Parse to support keys with query args.
+ req := &http.Request{
+ Method: "GET",
+ URL: &url.URL{
+ Scheme: "http",
+ Host: metadataHost,
+ Path: metadataPath + key,
+ },
+ Header: metadataRequestHeaders,
+ Host: metadataHost,
+ }
+ resp, err := http.DefaultClient.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if resp.StatusCode != 200 {
+ return nil, fmt.Errorf("metadata server returned HTTP %d", resp.StatusCode)
+ }
+ return ioutil.ReadAll(resp.Body)
+}
diff --git a/vendor/google.golang.org/appengine/internal/net.go b/vendor/google.golang.org/appengine/internal/net.go
new file mode 100644
index 00000000..3b94cf0c
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/net.go
@@ -0,0 +1,56 @@
+// Copyright 2014 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package internal
+
+// This file implements a network dialer that limits the number of concurrent connections.
+// It is only used for API calls.
+
+import (
+ "log"
+ "net"
+ "runtime"
+ "sync"
+ "time"
+)
+
+var limitSem = make(chan int, 100) // TODO(dsymonds): Use environment variable.
+
+func limitRelease() {
+ // non-blocking
+ select {
+ case <-limitSem:
+ default:
+ // This should not normally happen.
+ log.Print("appengine: unbalanced limitSem release!")
+ }
+}
+
+func limitDial(network, addr string) (net.Conn, error) {
+ limitSem <- 1
+
+ // Dial with a timeout in case the API host is MIA.
+ // The connection should normally be very fast.
+ conn, err := net.DialTimeout(network, addr, 500*time.Millisecond)
+ if err != nil {
+ limitRelease()
+ return nil, err
+ }
+ lc := &limitConn{Conn: conn}
+ runtime.SetFinalizer(lc, (*limitConn).Close) // shouldn't usually be required
+ return lc, nil
+}
+
+type limitConn struct {
+ close sync.Once
+ net.Conn
+}
+
+func (lc *limitConn) Close() error {
+ defer lc.close.Do(func() {
+ limitRelease()
+ runtime.SetFinalizer(lc, nil)
+ })
+ return lc.Conn.Close()
+}
diff --git a/vendor/google.golang.org/appengine/internal/regen.sh b/vendor/google.golang.org/appengine/internal/regen.sh
new file mode 100644
index 00000000..2fdb546a
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/regen.sh
@@ -0,0 +1,40 @@
+#!/bin/bash -e
+#
+# This script rebuilds the generated code for the protocol buffers.
+# To run this you will need protoc and goprotobuf installed;
+# see https://github.com/golang/protobuf for instructions.
+
+PKG=google.golang.org/appengine
+
+function die() {
+ echo 1>&2 $*
+ exit 1
+}
+
+# Sanity check that the right tools are accessible.
+for tool in go protoc protoc-gen-go; do
+ q=$(which $tool) || die "didn't find $tool"
+ echo 1>&2 "$tool: $q"
+done
+
+echo -n 1>&2 "finding package dir... "
+pkgdir=$(go list -f '{{.Dir}}' $PKG)
+echo 1>&2 $pkgdir
+base=$(echo $pkgdir | sed "s,/$PKG\$,,")
+echo 1>&2 "base: $base"
+cd $base
+
+# Run protoc once per package.
+for dir in $(find $PKG/internal -name '*.proto' | xargs dirname | sort | uniq); do
+ echo 1>&2 "* $dir"
+ protoc --go_out=. $dir/*.proto
+done
+
+for f in $(find $PKG/internal -name '*.pb.go'); do
+ # Remove proto.RegisterEnum calls.
+ # These cause duplicate registration panics when these packages
+ # are used on classic App Engine. proto.RegisterEnum only affects
+ # parsing the text format; we don't care about that.
+ # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17
+ sed -i '/proto.RegisterEnum/d' $f
+done
diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
new file mode 100644
index 00000000..8d782a38
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
@@ -0,0 +1,361 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: google.golang.org/appengine/internal/remote_api/remote_api.proto
+
+package remote_api
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type RpcError_ErrorCode int32
+
+const (
+ RpcError_UNKNOWN RpcError_ErrorCode = 0
+ RpcError_CALL_NOT_FOUND RpcError_ErrorCode = 1
+ RpcError_PARSE_ERROR RpcError_ErrorCode = 2
+ RpcError_SECURITY_VIOLATION RpcError_ErrorCode = 3
+ RpcError_OVER_QUOTA RpcError_ErrorCode = 4
+ RpcError_REQUEST_TOO_LARGE RpcError_ErrorCode = 5
+ RpcError_CAPABILITY_DISABLED RpcError_ErrorCode = 6
+ RpcError_FEATURE_DISABLED RpcError_ErrorCode = 7
+ RpcError_BAD_REQUEST RpcError_ErrorCode = 8
+ RpcError_RESPONSE_TOO_LARGE RpcError_ErrorCode = 9
+ RpcError_CANCELLED RpcError_ErrorCode = 10
+ RpcError_REPLAY_ERROR RpcError_ErrorCode = 11
+ RpcError_DEADLINE_EXCEEDED RpcError_ErrorCode = 12
+)
+
+var RpcError_ErrorCode_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "CALL_NOT_FOUND",
+ 2: "PARSE_ERROR",
+ 3: "SECURITY_VIOLATION",
+ 4: "OVER_QUOTA",
+ 5: "REQUEST_TOO_LARGE",
+ 6: "CAPABILITY_DISABLED",
+ 7: "FEATURE_DISABLED",
+ 8: "BAD_REQUEST",
+ 9: "RESPONSE_TOO_LARGE",
+ 10: "CANCELLED",
+ 11: "REPLAY_ERROR",
+ 12: "DEADLINE_EXCEEDED",
+}
+var RpcError_ErrorCode_value = map[string]int32{
+ "UNKNOWN": 0,
+ "CALL_NOT_FOUND": 1,
+ "PARSE_ERROR": 2,
+ "SECURITY_VIOLATION": 3,
+ "OVER_QUOTA": 4,
+ "REQUEST_TOO_LARGE": 5,
+ "CAPABILITY_DISABLED": 6,
+ "FEATURE_DISABLED": 7,
+ "BAD_REQUEST": 8,
+ "RESPONSE_TOO_LARGE": 9,
+ "CANCELLED": 10,
+ "REPLAY_ERROR": 11,
+ "DEADLINE_EXCEEDED": 12,
+}
+
+func (x RpcError_ErrorCode) Enum() *RpcError_ErrorCode {
+ p := new(RpcError_ErrorCode)
+ *p = x
+ return p
+}
+func (x RpcError_ErrorCode) String() string {
+ return proto.EnumName(RpcError_ErrorCode_name, int32(x))
+}
+func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode")
+ if err != nil {
+ return err
+ }
+ *x = RpcError_ErrorCode(value)
+ return nil
+}
+func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0}
+}
+
+type Request struct {
+ ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"`
+ Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"`
+ Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"`
+ RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Request) Reset() { *m = Request{} }
+func (m *Request) String() string { return proto.CompactTextString(m) }
+func (*Request) ProtoMessage() {}
+func (*Request) Descriptor() ([]byte, []int) {
+ return fileDescriptor_remote_api_1978114ec33a273d, []int{0}
+}
+func (m *Request) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Request.Unmarshal(m, b)
+}
+func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Request.Marshal(b, m, deterministic)
+}
+func (dst *Request) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Request.Merge(dst, src)
+}
+func (m *Request) XXX_Size() int {
+ return xxx_messageInfo_Request.Size(m)
+}
+func (m *Request) XXX_DiscardUnknown() {
+ xxx_messageInfo_Request.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Request proto.InternalMessageInfo
+
+func (m *Request) GetServiceName() string {
+ if m != nil && m.ServiceName != nil {
+ return *m.ServiceName
+ }
+ return ""
+}
+
+func (m *Request) GetMethod() string {
+ if m != nil && m.Method != nil {
+ return *m.Method
+ }
+ return ""
+}
+
+func (m *Request) GetRequest() []byte {
+ if m != nil {
+ return m.Request
+ }
+ return nil
+}
+
+func (m *Request) GetRequestId() string {
+ if m != nil && m.RequestId != nil {
+ return *m.RequestId
+ }
+ return ""
+}
+
+type ApplicationError struct {
+ Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"`
+ Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ApplicationError) Reset() { *m = ApplicationError{} }
+func (m *ApplicationError) String() string { return proto.CompactTextString(m) }
+func (*ApplicationError) ProtoMessage() {}
+func (*ApplicationError) Descriptor() ([]byte, []int) {
+ return fileDescriptor_remote_api_1978114ec33a273d, []int{1}
+}
+func (m *ApplicationError) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ApplicationError.Unmarshal(m, b)
+}
+func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic)
+}
+func (dst *ApplicationError) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ApplicationError.Merge(dst, src)
+}
+func (m *ApplicationError) XXX_Size() int {
+ return xxx_messageInfo_ApplicationError.Size(m)
+}
+func (m *ApplicationError) XXX_DiscardUnknown() {
+ xxx_messageInfo_ApplicationError.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ApplicationError proto.InternalMessageInfo
+
+func (m *ApplicationError) GetCode() int32 {
+ if m != nil && m.Code != nil {
+ return *m.Code
+ }
+ return 0
+}
+
+func (m *ApplicationError) GetDetail() string {
+ if m != nil && m.Detail != nil {
+ return *m.Detail
+ }
+ return ""
+}
+
+type RpcError struct {
+ Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"`
+ Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *RpcError) Reset() { *m = RpcError{} }
+func (m *RpcError) String() string { return proto.CompactTextString(m) }
+func (*RpcError) ProtoMessage() {}
+func (*RpcError) Descriptor() ([]byte, []int) {
+ return fileDescriptor_remote_api_1978114ec33a273d, []int{2}
+}
+func (m *RpcError) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_RpcError.Unmarshal(m, b)
+}
+func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_RpcError.Marshal(b, m, deterministic)
+}
+func (dst *RpcError) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_RpcError.Merge(dst, src)
+}
+func (m *RpcError) XXX_Size() int {
+ return xxx_messageInfo_RpcError.Size(m)
+}
+func (m *RpcError) XXX_DiscardUnknown() {
+ xxx_messageInfo_RpcError.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RpcError proto.InternalMessageInfo
+
+func (m *RpcError) GetCode() int32 {
+ if m != nil && m.Code != nil {
+ return *m.Code
+ }
+ return 0
+}
+
+func (m *RpcError) GetDetail() string {
+ if m != nil && m.Detail != nil {
+ return *m.Detail
+ }
+ return ""
+}
+
+type Response struct {
+ Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"`
+ Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"`
+ ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"`
+ JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"`
+ RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Response) Reset() { *m = Response{} }
+func (m *Response) String() string { return proto.CompactTextString(m) }
+func (*Response) ProtoMessage() {}
+func (*Response) Descriptor() ([]byte, []int) {
+ return fileDescriptor_remote_api_1978114ec33a273d, []int{3}
+}
+func (m *Response) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Response.Unmarshal(m, b)
+}
+func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Response.Marshal(b, m, deterministic)
+}
+func (dst *Response) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Response.Merge(dst, src)
+}
+func (m *Response) XXX_Size() int {
+ return xxx_messageInfo_Response.Size(m)
+}
+func (m *Response) XXX_DiscardUnknown() {
+ xxx_messageInfo_Response.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Response proto.InternalMessageInfo
+
+func (m *Response) GetResponse() []byte {
+ if m != nil {
+ return m.Response
+ }
+ return nil
+}
+
+func (m *Response) GetException() []byte {
+ if m != nil {
+ return m.Exception
+ }
+ return nil
+}
+
+func (m *Response) GetApplicationError() *ApplicationError {
+ if m != nil {
+ return m.ApplicationError
+ }
+ return nil
+}
+
+func (m *Response) GetJavaException() []byte {
+ if m != nil {
+ return m.JavaException
+ }
+ return nil
+}
+
+func (m *Response) GetRpcError() *RpcError {
+ if m != nil {
+ return m.RpcError
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*Request)(nil), "remote_api.Request")
+ proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError")
+ proto.RegisterType((*RpcError)(nil), "remote_api.RpcError")
+ proto.RegisterType((*Response)(nil), "remote_api.Response")
+}
+
+func init() {
+ proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d)
+}
+
+var fileDescriptor_remote_api_1978114ec33a273d = []byte{
+ // 531 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40,
+ 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42,
+ 0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x6f, 0x91, 0x85, 0x65, 0xa7, 0x6b, 0xbb, 0x50, 0x5e,
+ 0x56, 0x2b, 0x67, 0x65, 0x8c, 0x12, 0xaf, 0xd9, 0x98, 0x8a, 0x17, 0x6e, 0xc0, 0xb5, 0x38, 0x0c,
+ 0xb7, 0x40, 0x36, 0x6e, 0x63, 0xf5, 0x89, 0xb7, 0x7f, 0x7e, 0x7b, 0xe6, 0x1b, 0xcd, 0xcc, 0xc2,
+ 0xbb, 0x5c, 0xa9, 0x7c, 0x23, 0x17, 0xb9, 0xda, 0x88, 0x32, 0x5f, 0x28, 0x9d, 0x5f, 0x88, 0xaa,
+ 0x92, 0x65, 0x5e, 0x94, 0xf2, 0xa2, 0x28, 0x6b, 0xa9, 0x4b, 0xb1, 0xb9, 0xd0, 0x72, 0xab, 0x6a,
+ 0xc9, 0x45, 0x55, 0xf4, 0xe4, 0xa2, 0xd2, 0xaa, 0x56, 0x18, 0xf6, 0xce, 0xec, 0x27, 0x8c, 0x98,
+ 0xfc, 0xf6, 0x5d, 0xee, 0x6a, 0xfc, 0x12, 0xec, 0x9d, 0xd4, 0xb7, 0x45, 0x26, 0x79, 0x29, 0xb6,
+ 0xd2, 0x31, 0xa7, 0xe6, 0xdc, 0x62, 0x93, 0xce, 0x0b, 0xc5, 0x56, 0xe2, 0x33, 0x38, 0xdc, 0xca,
+ 0xfa, 0x8b, 0x5a, 0x3b, 0x07, 0xed, 0xc7, 0x2e, 0xc2, 0x0e, 0x8c, 0xf4, 0xbf, 0x2a, 0xce, 0x60,
+ 0x6a, 0xce, 0x6d, 0x76, 0x17, 0xe2, 0x17, 0x00, 0x9d, 0xe4, 0xc5, 0xda, 0x19, 0x4e, 0x8d, 0xb9,
+ 0xc5, 0xac, 0xce, 0xf1, 0xd7, 0xb3, 0xb7, 0x80, 0x48, 0x55, 0x6d, 0x8a, 0x4c, 0xd4, 0x85, 0x2a,
+ 0xa9, 0xd6, 0x4a, 0x63, 0x0c, 0x83, 0x4c, 0xad, 0xa5, 0x63, 0x4c, 0xcd, 0xf9, 0x90, 0xb5, 0xba,
+ 0x01, 0xaf, 0x65, 0x2d, 0x8a, 0x4d, 0xd7, 0x55, 0x17, 0xcd, 0x7e, 0x9b, 0x30, 0x66, 0x55, 0xf6,
+ 0x7f, 0x89, 0x46, 0x2f, 0xf1, 0x97, 0x09, 0x56, 0x9b, 0xe5, 0x36, 0x7f, 0x4d, 0x60, 0x94, 0x86,
+ 0x1f, 0xc2, 0xe8, 0x63, 0x88, 0x1e, 0x61, 0x0c, 0xc7, 0x2e, 0x09, 0x02, 0x1e, 0x46, 0x09, 0xbf,
+ 0x8c, 0xd2, 0xd0, 0x43, 0x06, 0x7e, 0x0c, 0x93, 0x15, 0x61, 0x31, 0xe5, 0x94, 0xb1, 0x88, 0x21,
+ 0x13, 0x9f, 0x01, 0x8e, 0xa9, 0x9b, 0x32, 0x3f, 0xb9, 0xe1, 0xd7, 0x7e, 0x14, 0x90, 0xc4, 0x8f,
+ 0x42, 0x74, 0x80, 0x8f, 0x01, 0xa2, 0x6b, 0xca, 0xf8, 0x55, 0x1a, 0x25, 0x04, 0x0d, 0xf0, 0x53,
+ 0x38, 0x61, 0xf4, 0x2a, 0xa5, 0x71, 0xc2, 0x93, 0x28, 0xe2, 0x01, 0x61, 0xef, 0x29, 0x1a, 0xe2,
+ 0x67, 0xf0, 0xc4, 0x25, 0x2b, 0xb2, 0xf4, 0x83, 0xa6, 0x80, 0xe7, 0xc7, 0x64, 0x19, 0x50, 0x0f,
+ 0x1d, 0xe2, 0x53, 0x40, 0x97, 0x94, 0x24, 0x29, 0xa3, 0x7b, 0x77, 0xd4, 0xe0, 0x97, 0xc4, 0xe3,
+ 0x5d, 0x25, 0x34, 0x6e, 0xf0, 0x8c, 0xc6, 0xab, 0x28, 0x8c, 0x69, 0xaf, 0xae, 0x85, 0x8f, 0xc0,
+ 0x72, 0x49, 0xe8, 0xd2, 0xa0, 0xc9, 0x03, 0x8c, 0xc0, 0x66, 0x74, 0x15, 0x90, 0x9b, 0xae, 0xef,
+ 0x49, 0xd3, 0x8f, 0x47, 0x89, 0x17, 0xf8, 0x21, 0xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64,
+ 0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b,
+ 0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5,
+ 0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c,
+ 0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf,
+ 0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7,
+ 0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e,
+ 0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f,
+ 0x03, 0x00, 0x00,
+}
diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
new file mode 100644
index 00000000..f21763a4
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
@@ -0,0 +1,44 @@
+syntax = "proto2";
+option go_package = "remote_api";
+
+package remote_api;
+
+message Request {
+ required string service_name = 2;
+ required string method = 3;
+ required bytes request = 4;
+ optional string request_id = 5;
+}
+
+message ApplicationError {
+ required int32 code = 1;
+ required string detail = 2;
+}
+
+message RpcError {
+ enum ErrorCode {
+ UNKNOWN = 0;
+ CALL_NOT_FOUND = 1;
+ PARSE_ERROR = 2;
+ SECURITY_VIOLATION = 3;
+ OVER_QUOTA = 4;
+ REQUEST_TOO_LARGE = 5;
+ CAPABILITY_DISABLED = 6;
+ FEATURE_DISABLED = 7;
+ BAD_REQUEST = 8;
+ RESPONSE_TOO_LARGE = 9;
+ CANCELLED = 10;
+ REPLAY_ERROR = 11;
+ DEADLINE_EXCEEDED = 12;
+ }
+ required int32 code = 1;
+ optional string detail = 2;
+}
+
+message Response {
+ optional bytes response = 1;
+ optional bytes exception = 2;
+ optional ApplicationError application_error = 3;
+ optional bytes java_exception = 4;
+ optional RpcError rpc_error = 5;
+}
diff --git a/vendor/google.golang.org/appengine/internal/transaction.go b/vendor/google.golang.org/appengine/internal/transaction.go
new file mode 100644
index 00000000..9006ae65
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/transaction.go
@@ -0,0 +1,115 @@
+// Copyright 2014 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package internal
+
+// This file implements hooks for applying datastore transactions.
+
+import (
+ "errors"
+ "reflect"
+
+ "github.com/golang/protobuf/proto"
+ netcontext "golang.org/x/net/context"
+
+ basepb "google.golang.org/appengine/internal/base"
+ pb "google.golang.org/appengine/internal/datastore"
+)
+
+var transactionSetters = make(map[reflect.Type]reflect.Value)
+
+// RegisterTransactionSetter registers a function that sets transaction information
+// in a protocol buffer message. f should be a function with two arguments,
+// the first being a protocol buffer type, and the second being *datastore.Transaction.
+func RegisterTransactionSetter(f interface{}) {
+ v := reflect.ValueOf(f)
+ transactionSetters[v.Type().In(0)] = v
+}
+
+// applyTransaction applies the transaction t to message pb
+// by using the relevant setter passed to RegisterTransactionSetter.
+func applyTransaction(pb proto.Message, t *pb.Transaction) {
+ v := reflect.ValueOf(pb)
+ if f, ok := transactionSetters[v.Type()]; ok {
+ f.Call([]reflect.Value{v, reflect.ValueOf(t)})
+ }
+}
+
+var transactionKey = "used for *Transaction"
+
+func transactionFromContext(ctx netcontext.Context) *transaction {
+ t, _ := ctx.Value(&transactionKey).(*transaction)
+ return t
+}
+
+func withTransaction(ctx netcontext.Context, t *transaction) netcontext.Context {
+ return netcontext.WithValue(ctx, &transactionKey, t)
+}
+
+type transaction struct {
+ transaction pb.Transaction
+ finished bool
+}
+
+var ErrConcurrentTransaction = errors.New("internal: concurrent transaction")
+
+func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) {
+ if transactionFromContext(c) != nil {
+ return nil, errors.New("nested transactions are not supported")
+ }
+
+ // Begin the transaction.
+ t := &transaction{}
+ req := &pb.BeginTransactionRequest{
+ App: proto.String(FullyQualifiedAppID(c)),
+ }
+ if xg {
+ req.AllowMultipleEg = proto.Bool(true)
+ }
+ if previousTransaction != nil {
+ req.PreviousTransaction = previousTransaction
+ }
+ if readOnly {
+ req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum()
+ } else {
+ req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum()
+ }
+ if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil {
+ return nil, err
+ }
+
+ // Call f, rolling back the transaction if f returns a non-nil error, or panics.
+ // The panic is not recovered.
+ defer func() {
+ if t.finished {
+ return
+ }
+ t.finished = true
+ // Ignore the error return value, since we are already returning a non-nil
+ // error (or we're panicking).
+ Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{})
+ }()
+ if err := f(withTransaction(c, t)); err != nil {
+ return &t.transaction, err
+ }
+ t.finished = true
+
+ // Commit the transaction.
+ res := &pb.CommitResponse{}
+ err := Call(c, "datastore_v3", "Commit", &t.transaction, res)
+ if ae, ok := err.(*APIError); ok {
+ /* TODO: restore this conditional
+ if appengine.IsDevAppServer() {
+ */
+ // The Python Dev AppServer raises an ApplicationError with error code 2 (which is
+ // Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.".
+ if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." {
+ return &t.transaction, ErrConcurrentTransaction
+ }
+ if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) {
+ return &t.transaction, ErrConcurrentTransaction
+ }
+ }
+ return &t.transaction, err
+}
diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
new file mode 100644
index 00000000..5f727750
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
@@ -0,0 +1,527 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
+
+package urlfetch
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type URLFetchServiceError_ErrorCode int32
+
+const (
+ URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0
+ URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1
+ URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2
+ URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3
+ URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4
+ URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5
+ URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6
+ URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7
+ URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8
+ URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9
+ URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10
+ URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11
+ URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12
+)
+
+var URLFetchServiceError_ErrorCode_name = map[int32]string{
+ 0: "OK",
+ 1: "INVALID_URL",
+ 2: "FETCH_ERROR",
+ 3: "UNSPECIFIED_ERROR",
+ 4: "RESPONSE_TOO_LARGE",
+ 5: "DEADLINE_EXCEEDED",
+ 6: "SSL_CERTIFICATE_ERROR",
+ 7: "DNS_ERROR",
+ 8: "CLOSED",
+ 9: "INTERNAL_TRANSIENT_ERROR",
+ 10: "TOO_MANY_REDIRECTS",
+ 11: "MALFORMED_REPLY",
+ 12: "CONNECTION_ERROR",
+}
+var URLFetchServiceError_ErrorCode_value = map[string]int32{
+ "OK": 0,
+ "INVALID_URL": 1,
+ "FETCH_ERROR": 2,
+ "UNSPECIFIED_ERROR": 3,
+ "RESPONSE_TOO_LARGE": 4,
+ "DEADLINE_EXCEEDED": 5,
+ "SSL_CERTIFICATE_ERROR": 6,
+ "DNS_ERROR": 7,
+ "CLOSED": 8,
+ "INTERNAL_TRANSIENT_ERROR": 9,
+ "TOO_MANY_REDIRECTS": 10,
+ "MALFORMED_REPLY": 11,
+ "CONNECTION_ERROR": 12,
+}
+
+func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode {
+ p := new(URLFetchServiceError_ErrorCode)
+ *p = x
+ return p
+}
+func (x URLFetchServiceError_ErrorCode) String() string {
+ return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x))
+}
+func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode")
+ if err != nil {
+ return err
+ }
+ *x = URLFetchServiceError_ErrorCode(value)
+ return nil
+}
+func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0}
+}
+
+type URLFetchRequest_RequestMethod int32
+
+const (
+ URLFetchRequest_GET URLFetchRequest_RequestMethod = 1
+ URLFetchRequest_POST URLFetchRequest_RequestMethod = 2
+ URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3
+ URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4
+ URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5
+ URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6
+)
+
+var URLFetchRequest_RequestMethod_name = map[int32]string{
+ 1: "GET",
+ 2: "POST",
+ 3: "HEAD",
+ 4: "PUT",
+ 5: "DELETE",
+ 6: "PATCH",
+}
+var URLFetchRequest_RequestMethod_value = map[string]int32{
+ "GET": 1,
+ "POST": 2,
+ "HEAD": 3,
+ "PUT": 4,
+ "DELETE": 5,
+ "PATCH": 6,
+}
+
+func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod {
+ p := new(URLFetchRequest_RequestMethod)
+ *p = x
+ return p
+}
+func (x URLFetchRequest_RequestMethod) String() string {
+ return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x))
+}
+func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod")
+ if err != nil {
+ return err
+ }
+ *x = URLFetchRequest_RequestMethod(value)
+ return nil
+}
+func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0}
+}
+
+type URLFetchServiceError struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} }
+func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) }
+func (*URLFetchServiceError) ProtoMessage() {}
+func (*URLFetchServiceError) Descriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0}
+}
+func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b)
+}
+func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic)
+}
+func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_URLFetchServiceError.Merge(dst, src)
+}
+func (m *URLFetchServiceError) XXX_Size() int {
+ return xxx_messageInfo_URLFetchServiceError.Size(m)
+}
+func (m *URLFetchServiceError) XXX_DiscardUnknown() {
+ xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo
+
+type URLFetchRequest struct {
+ Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"`
+ Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"`
+ Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"`
+ Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"`
+ FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"`
+ Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"`
+ MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} }
+func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) }
+func (*URLFetchRequest) ProtoMessage() {}
+func (*URLFetchRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1}
+}
+func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b)
+}
+func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic)
+}
+func (dst *URLFetchRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_URLFetchRequest.Merge(dst, src)
+}
+func (m *URLFetchRequest) XXX_Size() int {
+ return xxx_messageInfo_URLFetchRequest.Size(m)
+}
+func (m *URLFetchRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_URLFetchRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo
+
+const Default_URLFetchRequest_FollowRedirects bool = true
+const Default_URLFetchRequest_MustValidateServerCertificate bool = true
+
+func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod {
+ if m != nil && m.Method != nil {
+ return *m.Method
+ }
+ return URLFetchRequest_GET
+}
+
+func (m *URLFetchRequest) GetUrl() string {
+ if m != nil && m.Url != nil {
+ return *m.Url
+ }
+ return ""
+}
+
+func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *URLFetchRequest) GetPayload() []byte {
+ if m != nil {
+ return m.Payload
+ }
+ return nil
+}
+
+func (m *URLFetchRequest) GetFollowRedirects() bool {
+ if m != nil && m.FollowRedirects != nil {
+ return *m.FollowRedirects
+ }
+ return Default_URLFetchRequest_FollowRedirects
+}
+
+func (m *URLFetchRequest) GetDeadline() float64 {
+ if m != nil && m.Deadline != nil {
+ return *m.Deadline
+ }
+ return 0
+}
+
+func (m *URLFetchRequest) GetMustValidateServerCertificate() bool {
+ if m != nil && m.MustValidateServerCertificate != nil {
+ return *m.MustValidateServerCertificate
+ }
+ return Default_URLFetchRequest_MustValidateServerCertificate
+}
+
+type URLFetchRequest_Header struct {
+ Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"`
+ Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} }
+func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) }
+func (*URLFetchRequest_Header) ProtoMessage() {}
+func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0}
+}
+func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b)
+}
+func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic)
+}
+func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src)
+}
+func (m *URLFetchRequest_Header) XXX_Size() int {
+ return xxx_messageInfo_URLFetchRequest_Header.Size(m)
+}
+func (m *URLFetchRequest_Header) XXX_DiscardUnknown() {
+ xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo
+
+func (m *URLFetchRequest_Header) GetKey() string {
+ if m != nil && m.Key != nil {
+ return *m.Key
+ }
+ return ""
+}
+
+func (m *URLFetchRequest_Header) GetValue() string {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return ""
+}
+
+type URLFetchResponse struct {
+ Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"`
+ StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"`
+ Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"`
+ ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"`
+ ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"`
+ ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"`
+ FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"`
+ ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"`
+ ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"`
+ ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} }
+func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) }
+func (*URLFetchResponse) ProtoMessage() {}
+func (*URLFetchResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2}
+}
+func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b)
+}
+func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic)
+}
+func (dst *URLFetchResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_URLFetchResponse.Merge(dst, src)
+}
+func (m *URLFetchResponse) XXX_Size() int {
+ return xxx_messageInfo_URLFetchResponse.Size(m)
+}
+func (m *URLFetchResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_URLFetchResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo
+
+const Default_URLFetchResponse_ContentWasTruncated bool = false
+const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0
+const Default_URLFetchResponse_ApiBytesSent int64 = 0
+const Default_URLFetchResponse_ApiBytesReceived int64 = 0
+
+func (m *URLFetchResponse) GetContent() []byte {
+ if m != nil {
+ return m.Content
+ }
+ return nil
+}
+
+func (m *URLFetchResponse) GetStatusCode() int32 {
+ if m != nil && m.StatusCode != nil {
+ return *m.StatusCode
+ }
+ return 0
+}
+
+func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *URLFetchResponse) GetContentWasTruncated() bool {
+ if m != nil && m.ContentWasTruncated != nil {
+ return *m.ContentWasTruncated
+ }
+ return Default_URLFetchResponse_ContentWasTruncated
+}
+
+func (m *URLFetchResponse) GetExternalBytesSent() int64 {
+ if m != nil && m.ExternalBytesSent != nil {
+ return *m.ExternalBytesSent
+ }
+ return 0
+}
+
+func (m *URLFetchResponse) GetExternalBytesReceived() int64 {
+ if m != nil && m.ExternalBytesReceived != nil {
+ return *m.ExternalBytesReceived
+ }
+ return 0
+}
+
+func (m *URLFetchResponse) GetFinalUrl() string {
+ if m != nil && m.FinalUrl != nil {
+ return *m.FinalUrl
+ }
+ return ""
+}
+
+func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 {
+ if m != nil && m.ApiCpuMilliseconds != nil {
+ return *m.ApiCpuMilliseconds
+ }
+ return Default_URLFetchResponse_ApiCpuMilliseconds
+}
+
+func (m *URLFetchResponse) GetApiBytesSent() int64 {
+ if m != nil && m.ApiBytesSent != nil {
+ return *m.ApiBytesSent
+ }
+ return Default_URLFetchResponse_ApiBytesSent
+}
+
+func (m *URLFetchResponse) GetApiBytesReceived() int64 {
+ if m != nil && m.ApiBytesReceived != nil {
+ return *m.ApiBytesReceived
+ }
+ return Default_URLFetchResponse_ApiBytesReceived
+}
+
+type URLFetchResponse_Header struct {
+ Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"`
+ Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} }
+func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) }
+func (*URLFetchResponse_Header) ProtoMessage() {}
+func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) {
+ return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0}
+}
+func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b)
+}
+func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic)
+}
+func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src)
+}
+func (m *URLFetchResponse_Header) XXX_Size() int {
+ return xxx_messageInfo_URLFetchResponse_Header.Size(m)
+}
+func (m *URLFetchResponse_Header) XXX_DiscardUnknown() {
+ xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo
+
+func (m *URLFetchResponse_Header) GetKey() string {
+ if m != nil && m.Key != nil {
+ return *m.Key
+ }
+ return ""
+}
+
+func (m *URLFetchResponse_Header) GetValue() string {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return ""
+}
+
+func init() {
+ proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError")
+ proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest")
+ proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header")
+ proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse")
+ proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header")
+}
+
+func init() {
+ proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced)
+}
+
+var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{
+ // 770 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54,
+ 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29,
+ 0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e,
+ 0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d,
+ 0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b,
+ 0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27,
+ 0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0xa2, 0x62, 0x99, 0x15, 0x74, 0x9e, 0x15, 0x92,
+ 0xaa, 0x22, 0xc9, 0xcf, 0xd7, 0x55, 0x7e, 0x4b, 0x72, 0x71, 0xb7, 0x0f, 0xe2, 0x9a, 0xaa, 0xb7,
+ 0xd9, 0x82, 0xc6, 0xab, 0xaa, 0x94, 0x25, 0xf6, 0xf7, 0x67, 0x86, 0x7f, 0xeb, 0x70, 0x3a, 0x17,
+ 0xde, 0x44, 0xb1, 0xc2, 0x2d, 0x89, 0x57, 0x55, 0x59, 0x0d, 0xff, 0xd2, 0xa1, 0xbf, 0x89, 0xec,
+ 0x32, 0x25, 0xec, 0x80, 0x1e, 0x5c, 0xb3, 0x4f, 0xf0, 0x04, 0x8e, 0x5c, 0xff, 0xc6, 0xf2, 0x5c,
+ 0x27, 0x9e, 0x0b, 0x8f, 0x69, 0x0a, 0x98, 0xf0, 0xc8, 0xbe, 0x8a, 0xb9, 0x10, 0x81, 0x60, 0x3a,
+ 0x9e, 0xc1, 0xd3, 0xb9, 0x1f, 0xce, 0xb8, 0xed, 0x4e, 0x5c, 0xee, 0x34, 0xb0, 0x81, 0x9f, 0x01,
+ 0x0a, 0x1e, 0xce, 0x02, 0x3f, 0xe4, 0x71, 0x14, 0x04, 0xb1, 0x67, 0x89, 0xd7, 0x9c, 0xb5, 0x14,
+ 0xdd, 0xe1, 0x96, 0xe3, 0xb9, 0x3e, 0x8f, 0xf9, 0xaf, 0x36, 0xe7, 0x0e, 0x77, 0x58, 0x1b, 0x3f,
+ 0x87, 0xb3, 0x30, 0xf4, 0x62, 0x9b, 0x8b, 0xc8, 0x9d, 0xb8, 0xb6, 0x15, 0xf1, 0xa6, 0x53, 0x07,
+ 0x9f, 0x40, 0xdf, 0xf1, 0xc3, 0x26, 0xed, 0x22, 0x40, 0xc7, 0xf6, 0x82, 0x90, 0x3b, 0xac, 0x87,
+ 0x2f, 0xc0, 0x74, 0xfd, 0x88, 0x0b, 0xdf, 0xf2, 0xe2, 0x48, 0x58, 0x7e, 0xe8, 0x72, 0x3f, 0x6a,
+ 0x98, 0x7d, 0x35, 0x82, 0xba, 0x79, 0x6a, 0xf9, 0x6f, 0x62, 0xc1, 0x1d, 0x57, 0x70, 0x3b, 0x0a,
+ 0x19, 0xe0, 0x33, 0x38, 0x99, 0x5a, 0xde, 0x24, 0x10, 0x53, 0xee, 0xc4, 0x82, 0xcf, 0xbc, 0x37,
+ 0xec, 0x08, 0x4f, 0x81, 0xd9, 0x81, 0xef, 0x73, 0x3b, 0x72, 0x03, 0xbf, 0x69, 0x71, 0x3c, 0xfc,
+ 0xc7, 0x80, 0x93, 0x9d, 0x5a, 0x82, 0x7e, 0x5f, 0x53, 0x2d, 0xf1, 0x27, 0xe8, 0x4c, 0x49, 0xde,
+ 0x95, 0xa9, 0xa9, 0x0d, 0xf4, 0xd1, 0xa7, 0xaf, 0x46, 0xe3, 0xbd, 0xba, 0xe3, 0x47, 0xdc, 0x71,
+ 0xf3, 0xbb, 0xe5, 0x8b, 0xe6, 0x1c, 0x32, 0x30, 0xe6, 0x55, 0x6e, 0xea, 0x03, 0x7d, 0xd4, 0x17,
+ 0x2a, 0xc4, 0x1f, 0xa1, 0x73, 0x47, 0x49, 0x4a, 0x95, 0x69, 0x0c, 0x8c, 0x11, 0xbc, 0xfa, 0xea,
+ 0x23, 0x3d, 0xaf, 0x36, 0x44, 0xd1, 0x1c, 0xc0, 0x17, 0xd0, 0x9d, 0x25, 0xf7, 0x79, 0x99, 0xa4,
+ 0x66, 0x67, 0xa0, 0x8d, 0x8e, 0x2f, 0xf5, 0x9e, 0x26, 0x76, 0x10, 0x8e, 0xe1, 0x64, 0x52, 0xe6,
+ 0x79, 0xf9, 0x87, 0xa0, 0x34, 0xab, 0x68, 0x21, 0x6b, 0xb3, 0x3b, 0xd0, 0x46, 0xbd, 0x8b, 0x96,
+ 0xac, 0xd6, 0x24, 0x1e, 0x17, 0xf1, 0x39, 0xf4, 0x1c, 0x4a, 0xd2, 0x3c, 0x2b, 0xc8, 0xec, 0x0d,
+ 0xb4, 0x91, 0x26, 0xf6, 0x39, 0xfe, 0x0c, 0x5f, 0x4c, 0xd7, 0xb5, 0xbc, 0x49, 0xf2, 0x2c, 0x4d,
+ 0x24, 0xa9, 0xed, 0xa1, 0xca, 0xa6, 0x4a, 0x66, 0xb7, 0xd9, 0x22, 0x91, 0x64, 0xf6, 0xdf, 0xeb,
+ 0xfc, 0x71, 0xea, 0xf3, 0x97, 0xd0, 0xd9, 0xfe, 0x0f, 0x25, 0xc6, 0x35, 0xdd, 0x9b, 0xad, 0xad,
+ 0x18, 0xd7, 0x74, 0x8f, 0xa7, 0xd0, 0xbe, 0x49, 0xf2, 0x35, 0x99, 0xed, 0x0d, 0xb6, 0x4d, 0x86,
+ 0x1e, 0x3c, 0x79, 0xa0, 0x26, 0x76, 0xc1, 0x78, 0xcd, 0x23, 0xa6, 0x61, 0x0f, 0x5a, 0xb3, 0x20,
+ 0x8c, 0x98, 0xae, 0xa2, 0x2b, 0x6e, 0x39, 0xcc, 0x50, 0xc5, 0xd9, 0x3c, 0x62, 0x2d, 0xb5, 0x2e,
+ 0x0e, 0xf7, 0x78, 0xc4, 0x59, 0x1b, 0xfb, 0xd0, 0x9e, 0x59, 0x91, 0x7d, 0xc5, 0x3a, 0xc3, 0x7f,
+ 0x0d, 0x60, 0xef, 0x84, 0xad, 0x57, 0x65, 0x51, 0x13, 0x9a, 0xd0, 0xb5, 0xcb, 0x42, 0x52, 0x21,
+ 0x4d, 0x4d, 0x49, 0x29, 0x76, 0x29, 0x7e, 0x09, 0x10, 0xca, 0x44, 0xae, 0x6b, 0xf5, 0x71, 0x6c,
+ 0x8c, 0x6b, 0x8b, 0xf7, 0x10, 0xbc, 0x78, 0xe4, 0xdf, 0xf0, 0xa0, 0x7f, 0xdb, 0x6b, 0x1e, 0x1b,
+ 0xf8, 0x03, 0x3c, 0x6b, 0xae, 0xf9, 0x25, 0xa9, 0xa3, 0x6a, 0x5d, 0x28, 0x81, 0xb6, 0x66, 0xf6,
+ 0x2e, 0xda, 0xb7, 0x49, 0x5e, 0x93, 0x38, 0xc4, 0xc0, 0x6f, 0xe0, 0x29, 0xff, 0x73, 0xfb, 0x02,
+ 0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b,
+ 0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9,
+ 0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e,
+ 0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97,
+ 0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3,
+ 0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8,
+ 0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05,
+ 0x00, 0x00,
+}
diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
new file mode 100644
index 00000000..f695edf6
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
@@ -0,0 +1,64 @@
+syntax = "proto2";
+option go_package = "urlfetch";
+
+package appengine;
+
+message URLFetchServiceError {
+ enum ErrorCode {
+ OK = 0;
+ INVALID_URL = 1;
+ FETCH_ERROR = 2;
+ UNSPECIFIED_ERROR = 3;
+ RESPONSE_TOO_LARGE = 4;
+ DEADLINE_EXCEEDED = 5;
+ SSL_CERTIFICATE_ERROR = 6;
+ DNS_ERROR = 7;
+ CLOSED = 8;
+ INTERNAL_TRANSIENT_ERROR = 9;
+ TOO_MANY_REDIRECTS = 10;
+ MALFORMED_REPLY = 11;
+ CONNECTION_ERROR = 12;
+ }
+}
+
+message URLFetchRequest {
+ enum RequestMethod {
+ GET = 1;
+ POST = 2;
+ HEAD = 3;
+ PUT = 4;
+ DELETE = 5;
+ PATCH = 6;
+ }
+ required RequestMethod Method = 1;
+ required string Url = 2;
+ repeated group Header = 3 {
+ required string Key = 4;
+ required string Value = 5;
+ }
+ optional bytes Payload = 6 [ctype=CORD];
+
+ optional bool FollowRedirects = 7 [default=true];
+
+ optional double Deadline = 8;
+
+ optional bool MustValidateServerCertificate = 9 [default=true];
+}
+
+message URLFetchResponse {
+ optional bytes Content = 1;
+ required int32 StatusCode = 2;
+ repeated group Header = 3 {
+ required string Key = 4;
+ required string Value = 5;
+ }
+ optional bool ContentWasTruncated = 6 [default=false];
+ optional int64 ExternalBytesSent = 7;
+ optional int64 ExternalBytesReceived = 8;
+
+ optional string FinalUrl = 9;
+
+ optional int64 ApiCpuMilliseconds = 10 [default=0];
+ optional int64 ApiBytesSent = 11 [default=0];
+ optional int64 ApiBytesReceived = 12 [default=0];
+}
diff --git a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go b/vendor/google.golang.org/appengine/urlfetch/urlfetch.go
new file mode 100644
index 00000000..6ffe1e6d
--- /dev/null
+++ b/vendor/google.golang.org/appengine/urlfetch/urlfetch.go
@@ -0,0 +1,210 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// Package urlfetch provides an http.RoundTripper implementation
+// for fetching URLs via App Engine's urlfetch service.
+package urlfetch // import "google.golang.org/appengine/urlfetch"
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/golang/protobuf/proto"
+ "golang.org/x/net/context"
+
+ "google.golang.org/appengine/internal"
+ pb "google.golang.org/appengine/internal/urlfetch"
+)
+
+// Transport is an implementation of http.RoundTripper for
+// App Engine. Users should generally create an http.Client using
+// this transport and use the Client rather than using this transport
+// directly.
+type Transport struct {
+ Context context.Context
+
+ // Controls whether the application checks the validity of SSL certificates
+ // over HTTPS connections. A value of false (the default) instructs the
+ // application to send a request to the server only if the certificate is
+ // valid and signed by a trusted certificate authority (CA), and also
+ // includes a hostname that matches the certificate. A value of true
+ // instructs the application to perform no certificate validation.
+ AllowInvalidServerCertificate bool
+}
+
+// Verify statically that *Transport implements http.RoundTripper.
+var _ http.RoundTripper = (*Transport)(nil)
+
+// Client returns an *http.Client using a default urlfetch Transport. This
+// client will have the default deadline of 5 seconds, and will check the
+// validity of SSL certificates.
+//
+// Any deadline of the provided context will be used for requests through this client;
+// if the client does not have a deadline then a 5 second default is used.
+func Client(ctx context.Context) *http.Client {
+ return &http.Client{
+ Transport: &Transport{
+ Context: ctx,
+ },
+ }
+}
+
+type bodyReader struct {
+ content []byte
+ truncated bool
+ closed bool
+}
+
+// ErrTruncatedBody is the error returned after the final Read() from a
+// response's Body if the body has been truncated by App Engine's proxy.
+var ErrTruncatedBody = errors.New("urlfetch: truncated body")
+
+func statusCodeToText(code int) string {
+ if t := http.StatusText(code); t != "" {
+ return t
+ }
+ return strconv.Itoa(code)
+}
+
+func (br *bodyReader) Read(p []byte) (n int, err error) {
+ if br.closed {
+ if br.truncated {
+ return 0, ErrTruncatedBody
+ }
+ return 0, io.EOF
+ }
+ n = copy(p, br.content)
+ if n > 0 {
+ br.content = br.content[n:]
+ return
+ }
+ if br.truncated {
+ br.closed = true
+ return 0, ErrTruncatedBody
+ }
+ return 0, io.EOF
+}
+
+func (br *bodyReader) Close() error {
+ br.closed = true
+ br.content = nil
+ return nil
+}
+
+// A map of the URL Fetch-accepted methods that take a request body.
+var methodAcceptsRequestBody = map[string]bool{
+ "POST": true,
+ "PUT": true,
+ "PATCH": true,
+}
+
+// urlString returns a valid string given a URL. This function is necessary because
+// the String method of URL doesn't correctly handle URLs with non-empty Opaque values.
+// See http://code.google.com/p/go/issues/detail?id=4860.
+func urlString(u *url.URL) string {
+ if u.Opaque == "" || strings.HasPrefix(u.Opaque, "//") {
+ return u.String()
+ }
+ aux := *u
+ aux.Opaque = "//" + aux.Host + aux.Opaque
+ return aux.String()
+}
+
+// RoundTrip issues a single HTTP request and returns its response. Per the
+// http.RoundTripper interface, RoundTrip only returns an error if there
+// was an unsupported request or the URL Fetch proxy fails.
+// Note that HTTP response codes such as 5xx, 403, 404, etc are not
+// errors as far as the transport is concerned and will be returned
+// with err set to nil.
+func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error) {
+ methNum, ok := pb.URLFetchRequest_RequestMethod_value[req.Method]
+ if !ok {
+ return nil, fmt.Errorf("urlfetch: unsupported HTTP method %q", req.Method)
+ }
+
+ method := pb.URLFetchRequest_RequestMethod(methNum)
+
+ freq := &pb.URLFetchRequest{
+ Method: &method,
+ Url: proto.String(urlString(req.URL)),
+ FollowRedirects: proto.Bool(false), // http.Client's responsibility
+ MustValidateServerCertificate: proto.Bool(!t.AllowInvalidServerCertificate),
+ }
+ if deadline, ok := t.Context.Deadline(); ok {
+ freq.Deadline = proto.Float64(deadline.Sub(time.Now()).Seconds())
+ }
+
+ for k, vals := range req.Header {
+ for _, val := range vals {
+ freq.Header = append(freq.Header, &pb.URLFetchRequest_Header{
+ Key: proto.String(k),
+ Value: proto.String(val),
+ })
+ }
+ }
+ if methodAcceptsRequestBody[req.Method] && req.Body != nil {
+ // Avoid a []byte copy if req.Body has a Bytes method.
+ switch b := req.Body.(type) {
+ case interface {
+ Bytes() []byte
+ }:
+ freq.Payload = b.Bytes()
+ default:
+ freq.Payload, err = ioutil.ReadAll(req.Body)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ fres := &pb.URLFetchResponse{}
+ if err := internal.Call(t.Context, "urlfetch", "Fetch", freq, fres); err != nil {
+ return nil, err
+ }
+
+ res = &http.Response{}
+ res.StatusCode = int(*fres.StatusCode)
+ res.Status = fmt.Sprintf("%d %s", res.StatusCode, statusCodeToText(res.StatusCode))
+ res.Header = make(http.Header)
+ res.Request = req
+
+ // Faked:
+ res.ProtoMajor = 1
+ res.ProtoMinor = 1
+ res.Proto = "HTTP/1.1"
+ res.Close = true
+
+ for _, h := range fres.Header {
+ hkey := http.CanonicalHeaderKey(*h.Key)
+ hval := *h.Value
+ if hkey == "Content-Length" {
+ // Will get filled in below for all but HEAD requests.
+ if req.Method == "HEAD" {
+ res.ContentLength, _ = strconv.ParseInt(hval, 10, 64)
+ }
+ continue
+ }
+ res.Header.Add(hkey, hval)
+ }
+
+ if req.Method != "HEAD" {
+ res.ContentLength = int64(len(fres.Content))
+ }
+
+ truncated := fres.GetContentWasTruncated()
+ res.Body = &bodyReader{content: fres.Content, truncated: truncated}
+ return
+}
+
+func init() {
+ internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name)
+ internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED))
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 871be82d..e73ddd5c 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,3 +1,16 @@
-# golang.org/x/oauth2 v0.23.0
+# github.com/golang/protobuf v1.2.0
+github.com/golang/protobuf/proto
+# golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
+golang.org/x/net/context
+golang.org/x/net/context/ctxhttp
+# golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/oauth2
golang.org/x/oauth2/internal
+# google.golang.org/appengine v1.4.0
+google.golang.org/appengine/internal
+google.golang.org/appengine/internal/base
+google.golang.org/appengine/internal/datastore
+google.golang.org/appengine/internal/log
+google.golang.org/appengine/internal/remote_api
+google.golang.org/appengine/internal/urlfetch
+google.golang.org/appengine/urlfetch
From de4cc0154e0bff395a7a0019ed44e5f8cbab1d8c Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 14:46:42 +0100
Subject: [PATCH 2/9] Make patches
---
docs/NewApplicationCifExpression.md | 8 +++---
model_application_cif_expression.go | 18 ++++++-------
model_binding.go | 8 +++---
model_event.go | 8 +++---
model_generate_rule_title_rule.go | 36 ++++++++++++-------------
model_new_application_cif_expression.go | 18 ++++++-------
model_new_template_def.go | 8 +++---
model_rule.go | 16 +++++------
model_template_def.go | 8 +++---
9 files changed, 63 insertions(+), 65 deletions(-)
diff --git a/docs/NewApplicationCifExpression.md b/docs/NewApplicationCifExpression.md
index 46c295e7..39294c3d 100644
--- a/docs/NewApplicationCifExpression.md
+++ b/docs/NewApplicationCifExpression.md
@@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**CartItemFilterId** | Pointer to **int32** | The ID of the Application cart item filter. | [optional]
-**CreatedBy** | Pointer to **int32** | The ID of the user who created the Application cart item filter. | [optional]
-**Expression** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
+**CartItemFilterId** | Pointer to **int32** | The ID of the Application cart item filter. | [optional]
+**CreatedBy** | Pointer to **int32** | The ID of the user who created the Application cart item filter. | [optional]
+**Expression** | Pointer to [**[]interface{}**]([]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
## Methods
@@ -87,5 +87,3 @@ SetExpression gets a reference to the given []map[string]interface{} and assigns
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/model_application_cif_expression.go b/model_application_cif_expression.go
index 154fc69c..34a10783 100644
--- a/model_application_cif_expression.go
+++ b/model_application_cif_expression.go
@@ -26,7 +26,7 @@ type ApplicationCifExpression struct {
// The ID of the user who created the Application cart item filter.
CreatedBy *int32 `json:"createdBy,omitempty"`
// Arbitrary additional JSON data associated with the Application cart item filter.
- Expression *[]map[string]interface{} `json:"expression,omitempty"`
+ Expression []interface{} `json:"expression,omitempty"`
// The ID of the application that owns this entity.
ApplicationId int32 `json:"applicationId"`
}
@@ -128,22 +128,22 @@ func (o *ApplicationCifExpression) SetCreatedBy(v int32) {
}
// GetExpression returns the Expression field value if set, zero value otherwise.
-func (o *ApplicationCifExpression) GetExpression() []map[string]interface{} {
+func (o *ApplicationCifExpression) GetExpression() []interface{} {
if o == nil || o.Expression == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret
}
- return *o.Expression
+ return o.Expression
}
// GetExpressionOk returns a tuple with the Expression field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *ApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool) {
+func (o *ApplicationCifExpression) GetExpressionOk() ([]interface{}, bool) {
if o == nil || o.Expression == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret, false
}
- return *o.Expression, true
+ return o.Expression, true
}
// HasExpression returns a boolean if a field has been set.
@@ -156,8 +156,8 @@ func (o *ApplicationCifExpression) HasExpression() bool {
}
// SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
-func (o *ApplicationCifExpression) SetExpression(v []map[string]interface{}) {
- o.Expression = &v
+func (o *ApplicationCifExpression) SetExpression(v []interface{}) {
+ o.Expression = v
}
// GetApplicationId returns the ApplicationId field value
diff --git a/model_binding.go b/model_binding.go
index 7f2e64ec..2449ece1 100644
--- a/model_binding.go
+++ b/model_binding.go
@@ -21,7 +21,7 @@ type Binding struct {
// The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter`
Type *string `json:"type,omitempty"`
// A Talang expression that will be evaluated and its result attached to the name of the binding.
- Expression []map[string]interface{} `json:"expression"`
+ Expression []interface{} `json:"expression"`
// Can be one of the following: - `string` - `number` - `boolean`
ValueType *string `json:"valueType,omitempty"`
}
@@ -75,9 +75,9 @@ func (o *Binding) SetType(v string) {
}
// GetExpression returns the Expression field value
-func (o *Binding) GetExpression() []map[string]interface{} {
+func (o *Binding) GetExpression() []interface{} {
if o == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret
}
@@ -85,7 +85,7 @@ func (o *Binding) GetExpression() []map[string]interface{} {
}
// SetExpression sets field value
-func (o *Binding) SetExpression(v []map[string]interface{}) {
+func (o *Binding) SetExpression(v []interface{}) {
o.Expression = v
}
diff --git a/model_event.go b/model_event.go
index c0c2f47a..b5dc684c 100644
--- a/model_event.go
+++ b/model_event.go
@@ -34,7 +34,7 @@ type Event struct {
// The ID of the session that this event occurred in.
SessionId *string `json:"sessionId,omitempty"`
// An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects).
- Effects []map[string]interface{} `json:"effects"`
+ Effects [][]interface{} `json:"effects"`
// Ledger entries for the event.
LedgerEntries *[]LedgerEntry `json:"ledgerEntries,omitempty"`
Meta *Meta `json:"meta,omitempty"`
@@ -215,9 +215,9 @@ func (o *Event) SetSessionId(v string) {
}
// GetEffects returns the Effects field value
-func (o *Event) GetEffects() []map[string]interface{} {
+func (o *Event) GetEffects() [][]interface{} {
if o == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret
}
@@ -225,7 +225,7 @@ func (o *Event) GetEffects() []map[string]interface{} {
}
// SetEffects sets field value
-func (o *Event) SetEffects(v []map[string]interface{}) {
+func (o *Event) SetEffects(v [][]interface{}) {
o.Effects = v
}
diff --git a/model_generate_rule_title_rule.go b/model_generate_rule_title_rule.go
index 418296ce..b12e43cb 100644
--- a/model_generate_rule_title_rule.go
+++ b/model_generate_rule_title_rule.go
@@ -17,28 +17,28 @@ import (
// GenerateRuleTitleRule struct for GenerateRuleTitleRule
type GenerateRuleTitleRule struct {
// An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
- Effects *[]map[string]interface{} `json:"effects,omitempty"`
+ Effects [][]interface{} `json:"effects,omitempty"`
// A Talang expression that will be evaluated in the context of the given event.
- Condition *[]map[string]interface{} `json:"condition,omitempty"`
+ Condition []interface{} `json:"condition,omitempty"`
}
// GetEffects returns the Effects field value if set, zero value otherwise.
-func (o *GenerateRuleTitleRule) GetEffects() []map[string]interface{} {
+func (o *GenerateRuleTitleRule) GetEffects() [][]interface{} {
if o == nil || o.Effects == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret
}
- return *o.Effects
+ return o.Effects
}
// GetEffectsOk returns a tuple with the Effects field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *GenerateRuleTitleRule) GetEffectsOk() ([]map[string]interface{}, bool) {
+func (o *GenerateRuleTitleRule) GetEffectsOk() ([][]interface{}, bool) {
if o == nil || o.Effects == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret, false
}
- return *o.Effects, true
+ return o.Effects, true
}
// HasEffects returns a boolean if a field has been set.
@@ -51,27 +51,27 @@ func (o *GenerateRuleTitleRule) HasEffects() bool {
}
// SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
-func (o *GenerateRuleTitleRule) SetEffects(v []map[string]interface{}) {
- o.Effects = &v
+func (o *GenerateRuleTitleRule) SetEffects(v [][]interface{}) {
+ o.Effects = v
}
// GetCondition returns the Condition field value if set, zero value otherwise.
-func (o *GenerateRuleTitleRule) GetCondition() []map[string]interface{} {
+func (o *GenerateRuleTitleRule) GetCondition() []interface{} {
if o == nil || o.Condition == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret
}
- return *o.Condition
+ return o.Condition
}
// GetConditionOk returns a tuple with the Condition field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *GenerateRuleTitleRule) GetConditionOk() ([]map[string]interface{}, bool) {
+func (o *GenerateRuleTitleRule) GetConditionOk() ([]interface{}, bool) {
if o == nil || o.Condition == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret, false
}
- return *o.Condition, true
+ return o.Condition, true
}
// HasCondition returns a boolean if a field has been set.
@@ -84,8 +84,8 @@ func (o *GenerateRuleTitleRule) HasCondition() bool {
}
// SetCondition gets a reference to the given []map[string]interface{} and assigns it to the Condition field.
-func (o *GenerateRuleTitleRule) SetCondition(v []map[string]interface{}) {
- o.Condition = &v
+func (o *GenerateRuleTitleRule) SetCondition(v []interface{}) {
+ o.Condition = v
}
type NullableGenerateRuleTitleRule struct {
diff --git a/model_new_application_cif_expression.go b/model_new_application_cif_expression.go
index 1c48dd68..541c5297 100644
--- a/model_new_application_cif_expression.go
+++ b/model_new_application_cif_expression.go
@@ -21,7 +21,7 @@ type NewApplicationCifExpression struct {
// The ID of the user who created the Application cart item filter.
CreatedBy *int32 `json:"createdBy,omitempty"`
// Arbitrary additional JSON data associated with the Application cart item filter.
- Expression *[]map[string]interface{} `json:"expression,omitempty"`
+ Expression []interface{} `json:"expression,omitempty"`
}
// GetCartItemFilterId returns the CartItemFilterId field value if set, zero value otherwise.
@@ -91,22 +91,22 @@ func (o *NewApplicationCifExpression) SetCreatedBy(v int32) {
}
// GetExpression returns the Expression field value if set, zero value otherwise.
-func (o *NewApplicationCifExpression) GetExpression() []map[string]interface{} {
+func (o *NewApplicationCifExpression) GetExpression() []interface{} {
if o == nil || o.Expression == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret
}
- return *o.Expression
+ return o.Expression
}
// GetExpressionOk returns a tuple with the Expression field value if set, zero value otherwise
// and a boolean to check if the value has been set.
-func (o *NewApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool) {
+func (o *NewApplicationCifExpression) GetExpressionOk() ([]interface{}, bool) {
if o == nil || o.Expression == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret, false
}
- return *o.Expression, true
+ return o.Expression, true
}
// HasExpression returns a boolean if a field has been set.
@@ -119,8 +119,8 @@ func (o *NewApplicationCifExpression) HasExpression() bool {
}
// SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
-func (o *NewApplicationCifExpression) SetExpression(v []map[string]interface{}) {
- o.Expression = &v
+func (o *NewApplicationCifExpression) SetExpression(v []interface{}) {
+ o.Expression = v
}
type NullableNewApplicationCifExpression struct {
diff --git a/model_new_template_def.go b/model_new_template_def.go
index e33c6a18..bd92bbf0 100644
--- a/model_new_template_def.go
+++ b/model_new_template_def.go
@@ -25,7 +25,7 @@ type NewTemplateDef struct {
// Used for grouping templates in the rule editor sidebar.
Category string `json:"category"`
// A Talang expression that contains variable bindings referring to args.
- Expr []map[string]interface{} `json:"expr"`
+ Expr []interface{} `json:"expr"`
// An array of argument definitions.
Args []TemplateArgDef `json:"args"`
// A flag to control exposure in Rule Builder.
@@ -129,9 +129,9 @@ func (o *NewTemplateDef) SetCategory(v string) {
}
// GetExpr returns the Expr field value
-func (o *NewTemplateDef) GetExpr() []map[string]interface{} {
+func (o *NewTemplateDef) GetExpr() []interface{} {
if o == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret
}
@@ -139,7 +139,7 @@ func (o *NewTemplateDef) GetExpr() []map[string]interface{} {
}
// SetExpr sets field value
-func (o *NewTemplateDef) SetExpr(v []map[string]interface{}) {
+func (o *NewTemplateDef) SetExpr(v []interface{}) {
o.Expr = v
}
diff --git a/model_rule.go b/model_rule.go
index acc8a36d..fcccbae7 100644
--- a/model_rule.go
+++ b/model_rule.go
@@ -27,9 +27,9 @@ type Rule struct {
// An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
Bindings *[]Binding `json:"bindings,omitempty"`
// A Talang expression that will be evaluated in the context of the given event.
- Condition []map[string]interface{} `json:"condition"`
+ Condition []interface{} `json:"condition"`
// An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
- Effects []map[string]interface{} `json:"effects"`
+ Effects [][]interface{} `json:"effects"`
}
// GetId returns the Id field value if set, zero value otherwise.
@@ -180,9 +180,9 @@ func (o *Rule) SetBindings(v []Binding) {
}
// GetCondition returns the Condition field value
-func (o *Rule) GetCondition() []map[string]interface{} {
+func (o *Rule) GetCondition() []interface{} {
if o == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret
}
@@ -190,14 +190,14 @@ func (o *Rule) GetCondition() []map[string]interface{} {
}
// SetCondition sets field value
-func (o *Rule) SetCondition(v []map[string]interface{}) {
+func (o *Rule) SetCondition(v []interface{}) {
o.Condition = v
}
// GetEffects returns the Effects field value
-func (o *Rule) GetEffects() []map[string]interface{} {
+func (o *Rule) GetEffects() [][]interface{} {
if o == nil {
- var ret []map[string]interface{}
+ var ret [][]interface{}
return ret
}
@@ -205,7 +205,7 @@ func (o *Rule) GetEffects() []map[string]interface{} {
}
// SetEffects sets field value
-func (o *Rule) SetEffects(v []map[string]interface{}) {
+func (o *Rule) SetEffects(v [][]interface{}) {
o.Effects = v
}
diff --git a/model_template_def.go b/model_template_def.go
index cb472a0a..ed9fc0df 100644
--- a/model_template_def.go
+++ b/model_template_def.go
@@ -32,7 +32,7 @@ type TemplateDef struct {
// Used for grouping templates in the rule editor sidebar.
Category string `json:"category"`
// A Talang expression that contains variable bindings referring to args.
- Expr []map[string]interface{} `json:"expr"`
+ Expr []interface{} `json:"expr"`
// An array of argument definitions.
Args []TemplateArgDef `json:"args"`
// A flag to control exposure in Rule Builder.
@@ -147,9 +147,9 @@ func (o *TemplateDef) SetCategory(v string) {
}
// GetExpr returns the Expr field value
-func (o *TemplateDef) GetExpr() []map[string]interface{} {
+func (o *TemplateDef) GetExpr() []interface{} {
if o == nil {
- var ret []map[string]interface{}
+ var ret []interface{}
return ret
}
@@ -157,7 +157,7 @@ func (o *TemplateDef) GetExpr() []map[string]interface{} {
}
// SetExpr sets field value
-func (o *TemplateDef) SetExpr(v []map[string]interface{}) {
+func (o *TemplateDef) SetExpr(v []interface{}) {
o.Expr = v
}
From d733eff8399899229be9c78ec6204d2665b11709 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 16:55:47 +0100
Subject: [PATCH 3/9] Fix generation issues
---
docs/ApplicationCifExpression.md | 10 +++++-----
docs/Binding.md | 10 +++++-----
docs/Event.md | 10 +++++-----
docs/GenerateItemFilterDescription.md | 10 +++++-----
docs/NewApplicationCifExpression.md | 8 ++++----
docs/NewTemplateDef.md | 10 +++++-----
docs/Rule.md | 20 ++++++++++----------
docs/TemplateDef.md | 10 +++++-----
model_generate_rule_title_rule.go | 4 ++--
model_new_application_cif_expression.go | 2 +-
model_rule.go | 2 +-
11 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/docs/ApplicationCifExpression.md b/docs/ApplicationCifExpression.md
index 72085d60..ceb5aafc 100644
--- a/docs/ApplicationCifExpression.md
+++ b/docs/ApplicationCifExpression.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**CartItemFilterId** | Pointer to **int32** | The ID of the Application cart item filter. | [optional]
**CreatedBy** | Pointer to **int32** | The ID of the user who created the Application cart item filter. | [optional]
-**Expression** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
+**Expression** | Pointer to [**[]interface{}**](interface{}.md) | Arbitrary additional JSON data associated with the Application cart item filter. | [optional]
**ApplicationId** | Pointer to **int32** | The ID of the application that owns this entity. |
## Methods
@@ -115,13 +115,13 @@ SetCreatedBy gets a reference to the given int32 and assigns it to the CreatedBy
### GetExpression
-`func (o *ApplicationCifExpression) GetExpression() []map[string]interface{}`
+`func (o *ApplicationCifExpression) GetExpression() []interface{}`
GetExpression returns the Expression field if non-nil, zero value otherwise.
### GetExpressionOk
-`func (o *ApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool)`
+`func (o *ApplicationCifExpression) GetExpressionOk() ([]interface{}, bool)`
GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -134,9 +134,9 @@ HasExpression returns a boolean if a field has been set.
### SetExpression
-`func (o *ApplicationCifExpression) SetExpression(v []map[string]interface{})`
+`func (o *ApplicationCifExpression) SetExpression(v []interface{})`
-SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
+SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
### GetApplicationId
diff --git a/docs/Binding.md b/docs/Binding.md
index 0d51b941..225b681f 100644
--- a/docs/Binding.md
+++ b/docs/Binding.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | A descriptive name for the value to be bound. |
**Type** | Pointer to **string** | The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter` | [optional]
-**Expression** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that will be evaluated and its result attached to the name of the binding. |
+**Expression** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that will be evaluated and its result attached to the name of the binding. |
**ValueType** | Pointer to **string** | Can be one of the following: - `string` - `number` - `boolean` | [optional]
## Methods
@@ -63,13 +63,13 @@ SetType gets a reference to the given string and assigns it to the Type field.
### GetExpression
-`func (o *Binding) GetExpression() []map[string]interface{}`
+`func (o *Binding) GetExpression() []interface{}`
GetExpression returns the Expression field if non-nil, zero value otherwise.
### GetExpressionOk
-`func (o *Binding) GetExpressionOk() ([]map[string]interface{}, bool)`
+`func (o *Binding) GetExpressionOk() ([]interface{}, bool)`
GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -82,9 +82,9 @@ HasExpression returns a boolean if a field has been set.
### SetExpression
-`func (o *Binding) SetExpression(v []map[string]interface{})`
+`func (o *Binding) SetExpression(v []interface{})`
-SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
+SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
### GetValueType
diff --git a/docs/Event.md b/docs/Event.md
index 7c330a6e..7862ff73 100644
--- a/docs/Event.md
+++ b/docs/Event.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**Type** | Pointer to **string** | A string representing the event. Must not be a reserved event name. |
**Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary additional JSON data associated with the event. |
**SessionId** | Pointer to **string** | The ID of the session that this event occurred in. | [optional]
-**Effects** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). |
+**Effects** | Pointer to [**[]interface{}**]([]interface{}.md) | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). |
**LedgerEntries** | Pointer to [**[]LedgerEntry**](LedgerEntry.md) | Ledger entries for the event. | [optional]
**Meta** | Pointer to [**Meta**](Meta.md) | | [optional]
@@ -220,13 +220,13 @@ SetSessionId gets a reference to the given string and assigns it to the SessionI
### GetEffects
-`func (o *Event) GetEffects() []map[string]interface{}`
+`func (o *Event) GetEffects() []interface{}`
GetEffects returns the Effects field if non-nil, zero value otherwise.
### GetEffectsOk
-`func (o *Event) GetEffectsOk() ([]map[string]interface{}, bool)`
+`func (o *Event) GetEffectsOk() ([]interface{}, bool)`
GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -239,9 +239,9 @@ HasEffects returns a boolean if a field has been set.
### SetEffects
-`func (o *Event) SetEffects(v []map[string]interface{})`
+`func (o *Event) SetEffects(v []interface{})`
-SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
+SetEffects gets a reference to the given []interface{} and assigns it to the Effects field.
### GetLedgerEntries
diff --git a/docs/GenerateItemFilterDescription.md b/docs/GenerateItemFilterDescription.md
index 9ffcb1dc..5a9a70b9 100644
--- a/docs/GenerateItemFilterDescription.md
+++ b/docs/GenerateItemFilterDescription.md
@@ -4,19 +4,19 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ItemFilter** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of item filter Talang expressions. |
+**ItemFilter** | Pointer to [**[]interface{}**](interface{}.md) | An array of item filter Talang expressions. |
## Methods
### GetItemFilter
-`func (o *GenerateItemFilterDescription) GetItemFilter() []map[string]interface{}`
+`func (o *GenerateItemFilterDescription) GetItemFilter() []interface{}`
GetItemFilter returns the ItemFilter field if non-nil, zero value otherwise.
### GetItemFilterOk
-`func (o *GenerateItemFilterDescription) GetItemFilterOk() ([]map[string]interface{}, bool)`
+`func (o *GenerateItemFilterDescription) GetItemFilterOk() ([]interface{}, bool)`
GetItemFilterOk returns a tuple with the ItemFilter field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -29,9 +29,9 @@ HasItemFilter returns a boolean if a field has been set.
### SetItemFilter
-`func (o *GenerateItemFilterDescription) SetItemFilter(v []map[string]interface{})`
+`func (o *GenerateItemFilterDescription) SetItemFilter(v []interface{})`
-SetItemFilter gets a reference to the given []map[string]interface{} and assigns it to the ItemFilter field.
+SetItemFilter gets a reference to the given []interface{} and assigns it to the ItemFilter field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/NewApplicationCifExpression.md b/docs/NewApplicationCifExpression.md
index 39294c3d..1817b2ea 100644
--- a/docs/NewApplicationCifExpression.md
+++ b/docs/NewApplicationCifExpression.md
@@ -62,13 +62,13 @@ SetCreatedBy gets a reference to the given int32 and assigns it to the CreatedBy
### GetExpression
-`func (o *NewApplicationCifExpression) GetExpression() []map[string]interface{}`
+`func (o *NewApplicationCifExpression) GetExpression() []interface{}`
GetExpression returns the Expression field if non-nil, zero value otherwise.
### GetExpressionOk
-`func (o *NewApplicationCifExpression) GetExpressionOk() ([]map[string]interface{}, bool)`
+`func (o *NewApplicationCifExpression) GetExpressionOk() ([]interface{}, bool)`
GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -81,9 +81,9 @@ HasExpression returns a boolean if a field has been set.
### SetExpression
-`func (o *NewApplicationCifExpression) SetExpression(v []map[string]interface{})`
+`func (o *NewApplicationCifExpression) SetExpression(v []interface{})`
-SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
+SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/NewTemplateDef.md b/docs/NewTemplateDef.md
index 5f6634bf..5e5f65e8 100644
--- a/docs/NewTemplateDef.md
+++ b/docs/NewTemplateDef.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**Description** | Pointer to **string** | A short description of the template that will be shown in the rule editor. | [optional]
**Help** | Pointer to **string** | Extended help text for the template. | [optional]
**Category** | Pointer to **string** | Used for grouping templates in the rule editor sidebar. |
-**Expr** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
+**Expr** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
**Args** | Pointer to [**[]TemplateArgDef**](TemplateArgDef.md) | An array of argument definitions. |
**Expose** | Pointer to **bool** | A flag to control exposure in Rule Builder. | [optional] [default to false]
@@ -116,13 +116,13 @@ SetCategory gets a reference to the given string and assigns it to the Category
### GetExpr
-`func (o *NewTemplateDef) GetExpr() []map[string]interface{}`
+`func (o *NewTemplateDef) GetExpr() []interface{}`
GetExpr returns the Expr field if non-nil, zero value otherwise.
### GetExprOk
-`func (o *NewTemplateDef) GetExprOk() ([]map[string]interface{}, bool)`
+`func (o *NewTemplateDef) GetExprOk() ([]interface{}, bool)`
GetExprOk returns a tuple with the Expr field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -135,9 +135,9 @@ HasExpr returns a boolean if a field has been set.
### SetExpr
-`func (o *NewTemplateDef) SetExpr(v []map[string]interface{})`
+`func (o *NewTemplateDef) SetExpr(v []interface{})`
-SetExpr gets a reference to the given []map[string]interface{} and assigns it to the Expr field.
+SetExpr gets a reference to the given []interface{} and assigns it to the Expr field.
### GetArgs
diff --git a/docs/Rule.md b/docs/Rule.md
index 8452f645..125f7096 100644
--- a/docs/Rule.md
+++ b/docs/Rule.md
@@ -9,8 +9,8 @@ Name | Type | Description | Notes
**Title** | Pointer to **string** | A short description of the rule. |
**Description** | Pointer to **string** | A longer, more detailed description of the rule. | [optional]
**Bindings** | Pointer to [**[]Binding**](Binding.md) | An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array. | [optional]
-**Condition** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. |
-**Effects** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. |
+**Condition** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. |
+**Effects** | Pointer to [**[]interface{}**]([]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. |
## Methods
@@ -141,13 +141,13 @@ SetBindings gets a reference to the given []Binding and assigns it to the Bindin
### GetCondition
-`func (o *Rule) GetCondition() []map[string]interface{}`
+`func (o *Rule) GetCondition() []interface{}`
GetCondition returns the Condition field if non-nil, zero value otherwise.
### GetConditionOk
-`func (o *Rule) GetConditionOk() ([]map[string]interface{}, bool)`
+`func (o *Rule) GetConditionOk() ([]interface{}, bool)`
GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -160,19 +160,19 @@ HasCondition returns a boolean if a field has been set.
### SetCondition
-`func (o *Rule) SetCondition(v []map[string]interface{})`
+`func (o *Rule) SetCondition(v []interface{})`
-SetCondition gets a reference to the given []map[string]interface{} and assigns it to the Condition field.
+SetCondition gets a reference to the given []interface{} and assigns it to the Condition field.
### GetEffects
-`func (o *Rule) GetEffects() []map[string]interface{}`
+`func (o *Rule) GetEffects() []interface{}`
GetEffects returns the Effects field if non-nil, zero value otherwise.
### GetEffectsOk
-`func (o *Rule) GetEffectsOk() ([]map[string]interface{}, bool)`
+`func (o *Rule) GetEffectsOk() ([]interface{}, bool)`
GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -185,9 +185,9 @@ HasEffects returns a boolean if a field has been set.
### SetEffects
-`func (o *Rule) SetEffects(v []map[string]interface{})`
+`func (o *Rule) SetEffects(v []interface{})`
-SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
+SetEffects gets a reference to the given []interface{} and assigns it to the Effects field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TemplateDef.md b/docs/TemplateDef.md
index 8a592852..b8504154 100644
--- a/docs/TemplateDef.md
+++ b/docs/TemplateDef.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**Description** | Pointer to **string** | A short description of the template that will be shown in the rule editor. |
**Help** | Pointer to **string** | Extended help text for the template. |
**Category** | Pointer to **string** | Used for grouping templates in the rule editor sidebar. |
-**Expr** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
+**Expr** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that contains variable bindings referring to args. |
**Args** | Pointer to [**[]TemplateArgDef**](TemplateArgDef.md) | An array of argument definitions. |
**Expose** | Pointer to **bool** | A flag to control exposure in Rule Builder. | [optional] [default to false]
**Name** | Pointer to **string** | The template name used in Talang. |
@@ -195,13 +195,13 @@ SetCategory gets a reference to the given string and assigns it to the Category
### GetExpr
-`func (o *TemplateDef) GetExpr() []map[string]interface{}`
+`func (o *TemplateDef) GetExpr() []interface{}`
GetExpr returns the Expr field if non-nil, zero value otherwise.
### GetExprOk
-`func (o *TemplateDef) GetExprOk() ([]map[string]interface{}, bool)`
+`func (o *TemplateDef) GetExprOk() ([]interface{}, bool)`
GetExprOk returns a tuple with the Expr field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -214,9 +214,9 @@ HasExpr returns a boolean if a field has been set.
### SetExpr
-`func (o *TemplateDef) SetExpr(v []map[string]interface{})`
+`func (o *TemplateDef) SetExpr(v []interface{})`
-SetExpr gets a reference to the given []map[string]interface{} and assigns it to the Expr field.
+SetExpr gets a reference to the given []interface{} and assigns it to the Expr field.
### GetArgs
diff --git a/model_generate_rule_title_rule.go b/model_generate_rule_title_rule.go
index b12e43cb..31b19b42 100644
--- a/model_generate_rule_title_rule.go
+++ b/model_generate_rule_title_rule.go
@@ -58,7 +58,7 @@ func (o *GenerateRuleTitleRule) SetEffects(v [][]interface{}) {
// GetCondition returns the Condition field value if set, zero value otherwise.
func (o *GenerateRuleTitleRule) GetCondition() []interface{} {
if o == nil || o.Condition == nil {
- var ret [][]interface{}
+ var ret []interface{}
return ret
}
return o.Condition
@@ -68,7 +68,7 @@ func (o *GenerateRuleTitleRule) GetCondition() []interface{} {
// and a boolean to check if the value has been set.
func (o *GenerateRuleTitleRule) GetConditionOk() ([]interface{}, bool) {
if o == nil || o.Condition == nil {
- var ret [][]interface{}
+ var ret []interface{}
return ret, false
}
return o.Condition, true
diff --git a/model_new_application_cif_expression.go b/model_new_application_cif_expression.go
index 541c5297..546502c3 100644
--- a/model_new_application_cif_expression.go
+++ b/model_new_application_cif_expression.go
@@ -118,7 +118,7 @@ func (o *NewApplicationCifExpression) HasExpression() bool {
return false
}
-// SetExpression gets a reference to the given []map[string]interface{} and assigns it to the Expression field.
+// SetExpression gets a reference to the given []interface{} and assigns it to the Expression field.
func (o *NewApplicationCifExpression) SetExpression(v []interface{}) {
o.Expression = v
}
diff --git a/model_rule.go b/model_rule.go
index fcccbae7..e2401b6f 100644
--- a/model_rule.go
+++ b/model_rule.go
@@ -182,7 +182,7 @@ func (o *Rule) SetBindings(v []Binding) {
// GetCondition returns the Condition field value
func (o *Rule) GetCondition() []interface{} {
if o == nil {
- var ret [][]interface{}
+ var ret []interface{}
return ret
}
From e0bdb049760337f73006a5a0ea73dd2a95e87c07 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 17:00:00 +0100
Subject: [PATCH 4/9] Fix map issues
---
docs/GenerateRuleTitleRule.md | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/GenerateRuleTitleRule.md b/docs/GenerateRuleTitleRule.md
index b4cddc79..b1f8fa8d 100644
--- a/docs/GenerateRuleTitleRule.md
+++ b/docs/GenerateRuleTitleRule.md
@@ -4,20 +4,20 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Effects** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. | [optional]
-**Condition** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. | [optional]
+**Effects** | Pointer to [**[]interface{}**]([]interface{}.md) | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. | [optional]
+**Condition** | Pointer to [**[]interface{}**]([]interface{}.md) | A Talang expression that will be evaluated in the context of the given event. | [optional]
## Methods
### GetEffects
-`func (o *GenerateRuleTitleRule) GetEffects() []map[string]interface{}`
+`func (o *GenerateRuleTitleRule) GetEffects() []interface{}`
GetEffects returns the Effects field if non-nil, zero value otherwise.
### GetEffectsOk
-`func (o *GenerateRuleTitleRule) GetEffectsOk() ([]map[string]interface{}, bool)`
+`func (o *GenerateRuleTitleRule) GetEffectsOk() ([]interface{}, bool)`
GetEffectsOk returns a tuple with the Effects field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -30,19 +30,19 @@ HasEffects returns a boolean if a field has been set.
### SetEffects
-`func (o *GenerateRuleTitleRule) SetEffects(v []map[string]interface{})`
+`func (o *GenerateRuleTitleRule) SetEffects(v []interface{})`
-SetEffects gets a reference to the given []map[string]interface{} and assigns it to the Effects field.
+SetEffects gets a reference to the given []interface{} and assigns it to the Effects field.
### GetCondition
-`func (o *GenerateRuleTitleRule) GetCondition() []map[string]interface{}`
+`func (o *GenerateRuleTitleRule) GetCondition() []interface{}`
GetCondition returns the Condition field if non-nil, zero value otherwise.
### GetConditionOk
-`func (o *GenerateRuleTitleRule) GetConditionOk() ([]map[string]interface{}, bool)`
+`func (o *GenerateRuleTitleRule) GetConditionOk() ([]interface{}, bool)`
GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
@@ -55,9 +55,9 @@ HasCondition returns a boolean if a field has been set.
### SetCondition
-`func (o *GenerateRuleTitleRule) SetCondition(v []map[string]interface{})`
+`func (o *GenerateRuleTitleRule) SetCondition(v []interface{})`
-SetCondition gets a reference to the given []map[string]interface{} and assigns it to the Condition field.
+SetCondition gets a reference to the given []interface{} and assigns it to the Condition field.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
From 6ac8db6341f7cebf10e7afcce32f13d20761edb0 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 17:02:14 +0100
Subject: [PATCH 5/9] Fix go.mod version
---
go.mod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/go.mod b/go.mod
index d461c58a..4c182635 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/talon-one/talon_go
+module github.com/talon-one/talon_go/v9
go 1.13
From 0c868b1acb7c81d5a638dce0429650f750b500d1 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 17:03:27 +0100
Subject: [PATCH 6/9] go mod version
---
go.mod | 2 +-
go.sum | 18 +++++-------------
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/go.mod b/go.mod
index 4c182635..a1dee820 100644
--- a/go.mod
+++ b/go.mod
@@ -2,4 +2,4 @@ module github.com/talon-one/talon_go/v9
go 1.13
-require golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
+require golang.org/x/oauth2 v0.25.0
diff --git a/go.sum b/go.sum
index 734252e6..51c7f0b6 100644
--- a/go.sum
+++ b/go.sum
@@ -1,13 +1,5 @@
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70=
+golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
From cc69b6da27c693471bc2f30465142ad3b1b6b129 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 17:05:45 +0100
Subject: [PATCH 7/9] Update tests
---
.github/.example/main.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/.example/main.go b/.github/.example/main.go
index b926f018..6389de6e 100644
--- a/.github/.example/main.go
+++ b/.github/.example/main.go
@@ -6,7 +6,7 @@ import (
"fmt"
"os"
- talon "github.com/talon-one/talon_go/v8"
+ talon "github.com/talon-one/talon_go/v9"
)
func main() {
From f6dba06d12aa75a0844f9ba233bf62e6041bcd64 Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 17:06:43 +0100
Subject: [PATCH 8/9] Update deps
---
vendor/github.com/golang/protobuf/AUTHORS | 3 -
.../github.com/golang/protobuf/CONTRIBUTORS | 3 -
vendor/github.com/golang/protobuf/LICENSE | 28 -
.../github.com/golang/protobuf/proto/clone.go | 253 -
.../golang/protobuf/proto/decode.go | 428 --
.../golang/protobuf/proto/discard.go | 350 --
.../golang/protobuf/proto/encode.go | 203 -
.../github.com/golang/protobuf/proto/equal.go | 300 --
.../golang/protobuf/proto/extensions.go | 543 --
.../github.com/golang/protobuf/proto/lib.go | 979 ----
.../golang/protobuf/proto/message_set.go | 314 --
.../golang/protobuf/proto/pointer_reflect.go | 357 --
.../golang/protobuf/proto/pointer_unsafe.go | 308 --
.../golang/protobuf/proto/properties.go | 544 --
.../golang/protobuf/proto/table_marshal.go | 2767 -----------
.../golang/protobuf/proto/table_merge.go | 654 ---
.../golang/protobuf/proto/table_unmarshal.go | 2051 --------
.../github.com/golang/protobuf/proto/text.go | 843 ----
.../golang/protobuf/proto/text_parser.go | 880 ----
vendor/golang.org/x/net/AUTHORS | 3 -
vendor/golang.org/x/net/CONTRIBUTORS | 3 -
vendor/golang.org/x/net/LICENSE | 27 -
vendor/golang.org/x/net/PATENTS | 22 -
vendor/golang.org/x/net/context/context.go | 56 -
.../x/net/context/ctxhttp/ctxhttp.go | 71 -
vendor/golang.org/x/net/context/go17.go | 72 -
vendor/golang.org/x/net/context/go19.go | 20 -
vendor/golang.org/x/net/context/pre_go17.go | 300 --
vendor/golang.org/x/net/context/pre_go19.go | 109 -
vendor/golang.org/x/oauth2/AUTHORS | 3 -
vendor/golang.org/x/oauth2/CONTRIBUTORS | 3 -
vendor/golang.org/x/oauth2/LICENSE | 4 +-
vendor/golang.org/x/oauth2/README.md | 40 +-
vendor/golang.org/x/oauth2/deviceauth.go | 198 +
vendor/golang.org/x/oauth2/go.mod | 8 +-
vendor/golang.org/x/oauth2/go.sum | 16 +-
.../x/oauth2/internal/client_appengine.go | 13 -
vendor/golang.org/x/oauth2/internal/oauth2.go | 2 +-
vendor/golang.org/x/oauth2/internal/token.go | 134 +-
.../golang.org/x/oauth2/internal/transport.go | 5 -
vendor/golang.org/x/oauth2/oauth2.go | 66 +-
vendor/golang.org/x/oauth2/pkce.go | 68 +
vendor/golang.org/x/oauth2/token.go | 42 +-
vendor/golang.org/x/oauth2/transport.go | 79 +-
vendor/google.golang.org/appengine/LICENSE | 202 -
.../appengine/internal/api.go | 671 ---
.../appengine/internal/api_classic.go | 169 -
.../appengine/internal/api_common.go | 123 -
.../appengine/internal/app_id.go | 28 -
.../appengine/internal/base/api_base.pb.go | 308 --
.../appengine/internal/base/api_base.proto | 33 -
.../internal/datastore/datastore_v3.pb.go | 4367 -----------------
.../internal/datastore/datastore_v3.proto | 551 ---
.../appengine/internal/identity.go | 55 -
.../appengine/internal/identity_classic.go | 61 -
.../appengine/internal/identity_flex.go | 11 -
.../appengine/internal/identity_vm.go | 134 -
.../appengine/internal/internal.go | 110 -
.../appengine/internal/log/log_service.pb.go | 1313 -----
.../appengine/internal/log/log_service.proto | 150 -
.../appengine/internal/main.go | 16 -
.../appengine/internal/main_common.go | 7 -
.../appengine/internal/main_vm.go | 69 -
.../appengine/internal/metadata.go | 60 -
.../appengine/internal/net.go | 56 -
.../appengine/internal/regen.sh | 40 -
.../internal/remote_api/remote_api.pb.go | 361 --
.../internal/remote_api/remote_api.proto | 44 -
.../appengine/internal/transaction.go | 115 -
.../internal/urlfetch/urlfetch_service.pb.go | 527 --
.../internal/urlfetch/urlfetch_service.proto | 64 -
.../appengine/urlfetch/urlfetch.go | 210 -
vendor/modules.txt | 15 +-
73 files changed, 496 insertions(+), 22546 deletions(-)
delete mode 100644 vendor/github.com/golang/protobuf/AUTHORS
delete mode 100644 vendor/github.com/golang/protobuf/CONTRIBUTORS
delete mode 100644 vendor/github.com/golang/protobuf/LICENSE
delete mode 100644 vendor/github.com/golang/protobuf/proto/clone.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/decode.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/discard.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/encode.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/equal.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/lib.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/message_set.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/pointer_reflect.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/properties.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/table_marshal.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/table_merge.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/table_unmarshal.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/text.go
delete mode 100644 vendor/github.com/golang/protobuf/proto/text_parser.go
delete mode 100644 vendor/golang.org/x/net/AUTHORS
delete mode 100644 vendor/golang.org/x/net/CONTRIBUTORS
delete mode 100644 vendor/golang.org/x/net/LICENSE
delete mode 100644 vendor/golang.org/x/net/PATENTS
delete mode 100644 vendor/golang.org/x/net/context/context.go
delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
delete mode 100644 vendor/golang.org/x/net/context/go17.go
delete mode 100644 vendor/golang.org/x/net/context/go19.go
delete mode 100644 vendor/golang.org/x/net/context/pre_go17.go
delete mode 100644 vendor/golang.org/x/net/context/pre_go19.go
delete mode 100644 vendor/golang.org/x/oauth2/AUTHORS
delete mode 100644 vendor/golang.org/x/oauth2/CONTRIBUTORS
create mode 100644 vendor/golang.org/x/oauth2/deviceauth.go
delete mode 100644 vendor/golang.org/x/oauth2/internal/client_appengine.go
create mode 100644 vendor/golang.org/x/oauth2/pkce.go
delete mode 100644 vendor/google.golang.org/appengine/LICENSE
delete mode 100644 vendor/google.golang.org/appengine/internal/api.go
delete mode 100644 vendor/google.golang.org/appengine/internal/api_classic.go
delete mode 100644 vendor/google.golang.org/appengine/internal/api_common.go
delete mode 100644 vendor/google.golang.org/appengine/internal/app_id.go
delete mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.pb.go
delete mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.proto
delete mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
delete mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
delete mode 100644 vendor/google.golang.org/appengine/internal/identity.go
delete mode 100644 vendor/google.golang.org/appengine/internal/identity_classic.go
delete mode 100644 vendor/google.golang.org/appengine/internal/identity_flex.go
delete mode 100644 vendor/google.golang.org/appengine/internal/identity_vm.go
delete mode 100644 vendor/google.golang.org/appengine/internal/internal.go
delete mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.pb.go
delete mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.proto
delete mode 100644 vendor/google.golang.org/appengine/internal/main.go
delete mode 100644 vendor/google.golang.org/appengine/internal/main_common.go
delete mode 100644 vendor/google.golang.org/appengine/internal/main_vm.go
delete mode 100644 vendor/google.golang.org/appengine/internal/metadata.go
delete mode 100644 vendor/google.golang.org/appengine/internal/net.go
delete mode 100644 vendor/google.golang.org/appengine/internal/regen.sh
delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
delete mode 100644 vendor/google.golang.org/appengine/internal/transaction.go
delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
delete mode 100644 vendor/google.golang.org/appengine/urlfetch/urlfetch.go
diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS
deleted file mode 100644
index 15167cd7..00000000
--- a/vendor/github.com/golang/protobuf/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS
deleted file mode 100644
index 1c4577e9..00000000
--- a/vendor/github.com/golang/protobuf/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE
deleted file mode 100644
index 0f646931..00000000
--- a/vendor/github.com/golang/protobuf/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright 2010 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go
deleted file mode 100644
index 3cd3249f..00000000
--- a/vendor/github.com/golang/protobuf/proto/clone.go
+++ /dev/null
@@ -1,253 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Protocol buffer deep copy and merge.
-// TODO: RawMessage.
-
-package proto
-
-import (
- "fmt"
- "log"
- "reflect"
- "strings"
-)
-
-// Clone returns a deep copy of a protocol buffer.
-func Clone(src Message) Message {
- in := reflect.ValueOf(src)
- if in.IsNil() {
- return src
- }
- out := reflect.New(in.Type().Elem())
- dst := out.Interface().(Message)
- Merge(dst, src)
- return dst
-}
-
-// Merger is the interface representing objects that can merge messages of the same type.
-type Merger interface {
- // Merge merges src into this message.
- // Required and optional fields that are set in src will be set to that value in dst.
- // Elements of repeated fields will be appended.
- //
- // Merge may panic if called with a different argument type than the receiver.
- Merge(src Message)
-}
-
-// generatedMerger is the custom merge method that generated protos will have.
-// We must add this method since a generate Merge method will conflict with
-// many existing protos that have a Merge data field already defined.
-type generatedMerger interface {
- XXX_Merge(src Message)
-}
-
-// Merge merges src into dst.
-// Required and optional fields that are set in src will be set to that value in dst.
-// Elements of repeated fields will be appended.
-// Merge panics if src and dst are not the same type, or if dst is nil.
-func Merge(dst, src Message) {
- if m, ok := dst.(Merger); ok {
- m.Merge(src)
- return
- }
-
- in := reflect.ValueOf(src)
- out := reflect.ValueOf(dst)
- if out.IsNil() {
- panic("proto: nil destination")
- }
- if in.Type() != out.Type() {
- panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src))
- }
- if in.IsNil() {
- return // Merge from nil src is a noop
- }
- if m, ok := dst.(generatedMerger); ok {
- m.XXX_Merge(src)
- return
- }
- mergeStruct(out.Elem(), in.Elem())
-}
-
-func mergeStruct(out, in reflect.Value) {
- sprop := GetProperties(in.Type())
- for i := 0; i < in.NumField(); i++ {
- f := in.Type().Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i])
- }
-
- if emIn, err := extendable(in.Addr().Interface()); err == nil {
- emOut, _ := extendable(out.Addr().Interface())
- mIn, muIn := emIn.extensionsRead()
- if mIn != nil {
- mOut := emOut.extensionsWrite()
- muIn.Lock()
- mergeExtension(mOut, mIn)
- muIn.Unlock()
- }
- }
-
- uf := in.FieldByName("XXX_unrecognized")
- if !uf.IsValid() {
- return
- }
- uin := uf.Bytes()
- if len(uin) > 0 {
- out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...))
- }
-}
-
-// mergeAny performs a merge between two values of the same type.
-// viaPtr indicates whether the values were indirected through a pointer (implying proto2).
-// prop is set if this is a struct field (it may be nil).
-func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) {
- if in.Type() == protoMessageType {
- if !in.IsNil() {
- if out.IsNil() {
- out.Set(reflect.ValueOf(Clone(in.Interface().(Message))))
- } else {
- Merge(out.Interface().(Message), in.Interface().(Message))
- }
- }
- return
- }
- switch in.Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
- reflect.String, reflect.Uint32, reflect.Uint64:
- if !viaPtr && isProto3Zero(in) {
- return
- }
- out.Set(in)
- case reflect.Interface:
- // Probably a oneof field; copy non-nil values.
- if in.IsNil() {
- return
- }
- // Allocate destination if it is not set, or set to a different type.
- // Otherwise we will merge as normal.
- if out.IsNil() || out.Elem().Type() != in.Elem().Type() {
- out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T)
- }
- mergeAny(out.Elem(), in.Elem(), false, nil)
- case reflect.Map:
- if in.Len() == 0 {
- return
- }
- if out.IsNil() {
- out.Set(reflect.MakeMap(in.Type()))
- }
- // For maps with value types of *T or []byte we need to deep copy each value.
- elemKind := in.Type().Elem().Kind()
- for _, key := range in.MapKeys() {
- var val reflect.Value
- switch elemKind {
- case reflect.Ptr:
- val = reflect.New(in.Type().Elem().Elem())
- mergeAny(val, in.MapIndex(key), false, nil)
- case reflect.Slice:
- val = in.MapIndex(key)
- val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
- default:
- val = in.MapIndex(key)
- }
- out.SetMapIndex(key, val)
- }
- case reflect.Ptr:
- if in.IsNil() {
- return
- }
- if out.IsNil() {
- out.Set(reflect.New(in.Elem().Type()))
- }
- mergeAny(out.Elem(), in.Elem(), true, nil)
- case reflect.Slice:
- if in.IsNil() {
- return
- }
- if in.Type().Elem().Kind() == reflect.Uint8 {
- // []byte is a scalar bytes field, not a repeated field.
-
- // Edge case: if this is in a proto3 message, a zero length
- // bytes field is considered the zero value, and should not
- // be merged.
- if prop != nil && prop.proto3 && in.Len() == 0 {
- return
- }
-
- // Make a deep copy.
- // Append to []byte{} instead of []byte(nil) so that we never end up
- // with a nil result.
- out.SetBytes(append([]byte{}, in.Bytes()...))
- return
- }
- n := in.Len()
- if out.IsNil() {
- out.Set(reflect.MakeSlice(in.Type(), 0, n))
- }
- switch in.Type().Elem().Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
- reflect.String, reflect.Uint32, reflect.Uint64:
- out.Set(reflect.AppendSlice(out, in))
- default:
- for i := 0; i < n; i++ {
- x := reflect.Indirect(reflect.New(in.Type().Elem()))
- mergeAny(x, in.Index(i), false, nil)
- out.Set(reflect.Append(out, x))
- }
- }
- case reflect.Struct:
- mergeStruct(out, in)
- default:
- // unknown type, so not a protocol buffer
- log.Printf("proto: don't know how to copy %v", in)
- }
-}
-
-func mergeExtension(out, in map[int32]Extension) {
- for extNum, eIn := range in {
- eOut := Extension{desc: eIn.desc}
- if eIn.value != nil {
- v := reflect.New(reflect.TypeOf(eIn.value)).Elem()
- mergeAny(v, reflect.ValueOf(eIn.value), false, nil)
- eOut.value = v.Interface()
- }
- if eIn.enc != nil {
- eOut.enc = make([]byte, len(eIn.enc))
- copy(eOut.enc, eIn.enc)
- }
-
- out[extNum] = eOut
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go
deleted file mode 100644
index d9aa3c42..00000000
--- a/vendor/github.com/golang/protobuf/proto/decode.go
+++ /dev/null
@@ -1,428 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for decoding protocol buffer data to construct in-memory representations.
- */
-
-import (
- "errors"
- "fmt"
- "io"
-)
-
-// errOverflow is returned when an integer is too large to be represented.
-var errOverflow = errors.New("proto: integer overflow")
-
-// ErrInternalBadWireType is returned by generated code when an incorrect
-// wire type is encountered. It does not get returned to user code.
-var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
-
-// DecodeVarint reads a varint-encoded integer from the slice.
-// It returns the integer and the number of bytes consumed, or
-// zero if there is not enough.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func DecodeVarint(buf []byte) (x uint64, n int) {
- for shift := uint(0); shift < 64; shift += 7 {
- if n >= len(buf) {
- return 0, 0
- }
- b := uint64(buf[n])
- n++
- x |= (b & 0x7F) << shift
- if (b & 0x80) == 0 {
- return x, n
- }
- }
-
- // The number is too large to represent in a 64-bit value.
- return 0, 0
-}
-
-func (p *Buffer) decodeVarintSlow() (x uint64, err error) {
- i := p.index
- l := len(p.buf)
-
- for shift := uint(0); shift < 64; shift += 7 {
- if i >= l {
- err = io.ErrUnexpectedEOF
- return
- }
- b := p.buf[i]
- i++
- x |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- p.index = i
- return
- }
- }
-
- // The number is too large to represent in a 64-bit value.
- err = errOverflow
- return
-}
-
-// DecodeVarint reads a varint-encoded integer from the Buffer.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func (p *Buffer) DecodeVarint() (x uint64, err error) {
- i := p.index
- buf := p.buf
-
- if i >= len(buf) {
- return 0, io.ErrUnexpectedEOF
- } else if buf[i] < 0x80 {
- p.index++
- return uint64(buf[i]), nil
- } else if len(buf)-i < 10 {
- return p.decodeVarintSlow()
- }
-
- var b uint64
- // we already checked the first byte
- x = uint64(buf[i]) - 0x80
- i++
-
- b = uint64(buf[i])
- i++
- x += b << 7
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 7
-
- b = uint64(buf[i])
- i++
- x += b << 14
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 14
-
- b = uint64(buf[i])
- i++
- x += b << 21
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 21
-
- b = uint64(buf[i])
- i++
- x += b << 28
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 28
-
- b = uint64(buf[i])
- i++
- x += b << 35
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 35
-
- b = uint64(buf[i])
- i++
- x += b << 42
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 42
-
- b = uint64(buf[i])
- i++
- x += b << 49
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 49
-
- b = uint64(buf[i])
- i++
- x += b << 56
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 56
-
- b = uint64(buf[i])
- i++
- x += b << 63
- if b&0x80 == 0 {
- goto done
- }
- // x -= 0x80 << 63 // Always zero.
-
- return 0, errOverflow
-
-done:
- p.index = i
- return x, nil
-}
-
-// DecodeFixed64 reads a 64-bit integer from the Buffer.
-// This is the format for the
-// fixed64, sfixed64, and double protocol buffer types.
-func (p *Buffer) DecodeFixed64() (x uint64, err error) {
- // x, err already 0
- i := p.index + 8
- if i < 0 || i > len(p.buf) {
- err = io.ErrUnexpectedEOF
- return
- }
- p.index = i
-
- x = uint64(p.buf[i-8])
- x |= uint64(p.buf[i-7]) << 8
- x |= uint64(p.buf[i-6]) << 16
- x |= uint64(p.buf[i-5]) << 24
- x |= uint64(p.buf[i-4]) << 32
- x |= uint64(p.buf[i-3]) << 40
- x |= uint64(p.buf[i-2]) << 48
- x |= uint64(p.buf[i-1]) << 56
- return
-}
-
-// DecodeFixed32 reads a 32-bit integer from the Buffer.
-// This is the format for the
-// fixed32, sfixed32, and float protocol buffer types.
-func (p *Buffer) DecodeFixed32() (x uint64, err error) {
- // x, err already 0
- i := p.index + 4
- if i < 0 || i > len(p.buf) {
- err = io.ErrUnexpectedEOF
- return
- }
- p.index = i
-
- x = uint64(p.buf[i-4])
- x |= uint64(p.buf[i-3]) << 8
- x |= uint64(p.buf[i-2]) << 16
- x |= uint64(p.buf[i-1]) << 24
- return
-}
-
-// DecodeZigzag64 reads a zigzag-encoded 64-bit integer
-// from the Buffer.
-// This is the format used for the sint64 protocol buffer type.
-func (p *Buffer) DecodeZigzag64() (x uint64, err error) {
- x, err = p.DecodeVarint()
- if err != nil {
- return
- }
- x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63)
- return
-}
-
-// DecodeZigzag32 reads a zigzag-encoded 32-bit integer
-// from the Buffer.
-// This is the format used for the sint32 protocol buffer type.
-func (p *Buffer) DecodeZigzag32() (x uint64, err error) {
- x, err = p.DecodeVarint()
- if err != nil {
- return
- }
- x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31))
- return
-}
-
-// DecodeRawBytes reads a count-delimited byte buffer from the Buffer.
-// This is the format used for the bytes protocol buffer
-// type and for embedded messages.
-func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) {
- n, err := p.DecodeVarint()
- if err != nil {
- return nil, err
- }
-
- nb := int(n)
- if nb < 0 {
- return nil, fmt.Errorf("proto: bad byte length %d", nb)
- }
- end := p.index + nb
- if end < p.index || end > len(p.buf) {
- return nil, io.ErrUnexpectedEOF
- }
-
- if !alloc {
- // todo: check if can get more uses of alloc=false
- buf = p.buf[p.index:end]
- p.index += nb
- return
- }
-
- buf = make([]byte, nb)
- copy(buf, p.buf[p.index:])
- p.index += nb
- return
-}
-
-// DecodeStringBytes reads an encoded string from the Buffer.
-// This is the format used for the proto2 string type.
-func (p *Buffer) DecodeStringBytes() (s string, err error) {
- buf, err := p.DecodeRawBytes(false)
- if err != nil {
- return
- }
- return string(buf), nil
-}
-
-// Unmarshaler is the interface representing objects that can
-// unmarshal themselves. The argument points to data that may be
-// overwritten, so implementations should not keep references to the
-// buffer.
-// Unmarshal implementations should not clear the receiver.
-// Any unmarshaled data should be merged into the receiver.
-// Callers of Unmarshal that do not want to retain existing data
-// should Reset the receiver before calling Unmarshal.
-type Unmarshaler interface {
- Unmarshal([]byte) error
-}
-
-// newUnmarshaler is the interface representing objects that can
-// unmarshal themselves. The semantics are identical to Unmarshaler.
-//
-// This exists to support protoc-gen-go generated messages.
-// The proto package will stop type-asserting to this interface in the future.
-//
-// DO NOT DEPEND ON THIS.
-type newUnmarshaler interface {
- XXX_Unmarshal([]byte) error
-}
-
-// Unmarshal parses the protocol buffer representation in buf and places the
-// decoded result in pb. If the struct underlying pb does not match
-// the data in buf, the results can be unpredictable.
-//
-// Unmarshal resets pb before starting to unmarshal, so any
-// existing data in pb is always removed. Use UnmarshalMerge
-// to preserve and append to existing data.
-func Unmarshal(buf []byte, pb Message) error {
- pb.Reset()
- if u, ok := pb.(newUnmarshaler); ok {
- return u.XXX_Unmarshal(buf)
- }
- if u, ok := pb.(Unmarshaler); ok {
- return u.Unmarshal(buf)
- }
- return NewBuffer(buf).Unmarshal(pb)
-}
-
-// UnmarshalMerge parses the protocol buffer representation in buf and
-// writes the decoded result to pb. If the struct underlying pb does not match
-// the data in buf, the results can be unpredictable.
-//
-// UnmarshalMerge merges into existing data in pb.
-// Most code should use Unmarshal instead.
-func UnmarshalMerge(buf []byte, pb Message) error {
- if u, ok := pb.(newUnmarshaler); ok {
- return u.XXX_Unmarshal(buf)
- }
- if u, ok := pb.(Unmarshaler); ok {
- // NOTE: The history of proto have unfortunately been inconsistent
- // whether Unmarshaler should or should not implicitly clear itself.
- // Some implementations do, most do not.
- // Thus, calling this here may or may not do what people want.
- //
- // See https://github.com/golang/protobuf/issues/424
- return u.Unmarshal(buf)
- }
- return NewBuffer(buf).Unmarshal(pb)
-}
-
-// DecodeMessage reads a count-delimited message from the Buffer.
-func (p *Buffer) DecodeMessage(pb Message) error {
- enc, err := p.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- return NewBuffer(enc).Unmarshal(pb)
-}
-
-// DecodeGroup reads a tag-delimited group from the Buffer.
-// StartGroup tag is already consumed. This function consumes
-// EndGroup tag.
-func (p *Buffer) DecodeGroup(pb Message) error {
- b := p.buf[p.index:]
- x, y := findEndGroup(b)
- if x < 0 {
- return io.ErrUnexpectedEOF
- }
- err := Unmarshal(b[:x], pb)
- p.index += y
- return err
-}
-
-// Unmarshal parses the protocol buffer representation in the
-// Buffer and places the decoded result in pb. If the struct
-// underlying pb does not match the data in the buffer, the results can be
-// unpredictable.
-//
-// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal.
-func (p *Buffer) Unmarshal(pb Message) error {
- // If the object can unmarshal itself, let it.
- if u, ok := pb.(newUnmarshaler); ok {
- err := u.XXX_Unmarshal(p.buf[p.index:])
- p.index = len(p.buf)
- return err
- }
- if u, ok := pb.(Unmarshaler); ok {
- // NOTE: The history of proto have unfortunately been inconsistent
- // whether Unmarshaler should or should not implicitly clear itself.
- // Some implementations do, most do not.
- // Thus, calling this here may or may not do what people want.
- //
- // See https://github.com/golang/protobuf/issues/424
- err := u.Unmarshal(p.buf[p.index:])
- p.index = len(p.buf)
- return err
- }
-
- // Slow workaround for messages that aren't Unmarshalers.
- // This includes some hand-coded .pb.go files and
- // bootstrap protos.
- // TODO: fix all of those and then add Unmarshal to
- // the Message interface. Then:
- // The cast above and code below can be deleted.
- // The old unmarshaler can be deleted.
- // Clients can call Unmarshal directly (can already do that, actually).
- var info InternalMessageInfo
- err := info.Unmarshal(pb, p.buf[p.index:])
- p.index = len(p.buf)
- return err
-}
diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go
deleted file mode 100644
index dea2617c..00000000
--- a/vendor/github.com/golang/protobuf/proto/discard.go
+++ /dev/null
@@ -1,350 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2017 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "fmt"
- "reflect"
- "strings"
- "sync"
- "sync/atomic"
-)
-
-type generatedDiscarder interface {
- XXX_DiscardUnknown()
-}
-
-// DiscardUnknown recursively discards all unknown fields from this message
-// and all embedded messages.
-//
-// When unmarshaling a message with unrecognized fields, the tags and values
-// of such fields are preserved in the Message. This allows a later call to
-// marshal to be able to produce a message that continues to have those
-// unrecognized fields. To avoid this, DiscardUnknown is used to
-// explicitly clear the unknown fields after unmarshaling.
-//
-// For proto2 messages, the unknown fields of message extensions are only
-// discarded from messages that have been accessed via GetExtension.
-func DiscardUnknown(m Message) {
- if m, ok := m.(generatedDiscarder); ok {
- m.XXX_DiscardUnknown()
- return
- }
- // TODO: Dynamically populate a InternalMessageInfo for legacy messages,
- // but the master branch has no implementation for InternalMessageInfo,
- // so it would be more work to replicate that approach.
- discardLegacy(m)
-}
-
-// DiscardUnknown recursively discards all unknown fields.
-func (a *InternalMessageInfo) DiscardUnknown(m Message) {
- di := atomicLoadDiscardInfo(&a.discard)
- if di == nil {
- di = getDiscardInfo(reflect.TypeOf(m).Elem())
- atomicStoreDiscardInfo(&a.discard, di)
- }
- di.discard(toPointer(&m))
-}
-
-type discardInfo struct {
- typ reflect.Type
-
- initialized int32 // 0: only typ is valid, 1: everything is valid
- lock sync.Mutex
-
- fields []discardFieldInfo
- unrecognized field
-}
-
-type discardFieldInfo struct {
- field field // Offset of field, guaranteed to be valid
- discard func(src pointer)
-}
-
-var (
- discardInfoMap = map[reflect.Type]*discardInfo{}
- discardInfoLock sync.Mutex
-)
-
-func getDiscardInfo(t reflect.Type) *discardInfo {
- discardInfoLock.Lock()
- defer discardInfoLock.Unlock()
- di := discardInfoMap[t]
- if di == nil {
- di = &discardInfo{typ: t}
- discardInfoMap[t] = di
- }
- return di
-}
-
-func (di *discardInfo) discard(src pointer) {
- if src.isNil() {
- return // Nothing to do.
- }
-
- if atomic.LoadInt32(&di.initialized) == 0 {
- di.computeDiscardInfo()
- }
-
- for _, fi := range di.fields {
- sfp := src.offset(fi.field)
- fi.discard(sfp)
- }
-
- // For proto2 messages, only discard unknown fields in message extensions
- // that have been accessed via GetExtension.
- if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil {
- // Ignore lock since DiscardUnknown is not concurrency safe.
- emm, _ := em.extensionsRead()
- for _, mx := range emm {
- if m, ok := mx.value.(Message); ok {
- DiscardUnknown(m)
- }
- }
- }
-
- if di.unrecognized.IsValid() {
- *src.offset(di.unrecognized).toBytes() = nil
- }
-}
-
-func (di *discardInfo) computeDiscardInfo() {
- di.lock.Lock()
- defer di.lock.Unlock()
- if di.initialized != 0 {
- return
- }
- t := di.typ
- n := t.NumField()
-
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
-
- dfi := discardFieldInfo{field: toField(&f)}
- tf := f.Type
-
- // Unwrap tf to get its most basic type.
- var isPointer, isSlice bool
- if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
- isSlice = true
- tf = tf.Elem()
- }
- if tf.Kind() == reflect.Ptr {
- isPointer = true
- tf = tf.Elem()
- }
- if isPointer && isSlice && tf.Kind() != reflect.Struct {
- panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name))
- }
-
- switch tf.Kind() {
- case reflect.Struct:
- switch {
- case !isPointer:
- panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name))
- case isSlice: // E.g., []*pb.T
- di := getDiscardInfo(tf)
- dfi.discard = func(src pointer) {
- sps := src.getPointerSlice()
- for _, sp := range sps {
- if !sp.isNil() {
- di.discard(sp)
- }
- }
- }
- default: // E.g., *pb.T
- di := getDiscardInfo(tf)
- dfi.discard = func(src pointer) {
- sp := src.getPointer()
- if !sp.isNil() {
- di.discard(sp)
- }
- }
- }
- case reflect.Map:
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name))
- default: // E.g., map[K]V
- if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T)
- dfi.discard = func(src pointer) {
- sm := src.asPointerTo(tf).Elem()
- if sm.Len() == 0 {
- return
- }
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- DiscardUnknown(val.Interface().(Message))
- }
- }
- } else {
- dfi.discard = func(pointer) {} // Noop
- }
- }
- case reflect.Interface:
- // Must be oneof field.
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name))
- default: // E.g., interface{}
- // TODO: Make this faster?
- dfi.discard = func(src pointer) {
- su := src.asPointerTo(tf).Elem()
- if !su.IsNil() {
- sv := su.Elem().Elem().Field(0)
- if sv.Kind() == reflect.Ptr && sv.IsNil() {
- return
- }
- switch sv.Type().Kind() {
- case reflect.Ptr: // Proto struct (e.g., *T)
- DiscardUnknown(sv.Interface().(Message))
- }
- }
- }
- }
- default:
- continue
- }
- di.fields = append(di.fields, dfi)
- }
-
- di.unrecognized = invalidField
- if f, ok := t.FieldByName("XXX_unrecognized"); ok {
- if f.Type != reflect.TypeOf([]byte{}) {
- panic("expected XXX_unrecognized to be of type []byte")
- }
- di.unrecognized = toField(&f)
- }
-
- atomic.StoreInt32(&di.initialized, 1)
-}
-
-func discardLegacy(m Message) {
- v := reflect.ValueOf(m)
- if v.Kind() != reflect.Ptr || v.IsNil() {
- return
- }
- v = v.Elem()
- if v.Kind() != reflect.Struct {
- return
- }
- t := v.Type()
-
- for i := 0; i < v.NumField(); i++ {
- f := t.Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- vf := v.Field(i)
- tf := f.Type
-
- // Unwrap tf to get its most basic type.
- var isPointer, isSlice bool
- if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
- isSlice = true
- tf = tf.Elem()
- }
- if tf.Kind() == reflect.Ptr {
- isPointer = true
- tf = tf.Elem()
- }
- if isPointer && isSlice && tf.Kind() != reflect.Struct {
- panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name))
- }
-
- switch tf.Kind() {
- case reflect.Struct:
- switch {
- case !isPointer:
- panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name))
- case isSlice: // E.g., []*pb.T
- for j := 0; j < vf.Len(); j++ {
- discardLegacy(vf.Index(j).Interface().(Message))
- }
- default: // E.g., *pb.T
- discardLegacy(vf.Interface().(Message))
- }
- case reflect.Map:
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name))
- default: // E.g., map[K]V
- tv := vf.Type().Elem()
- if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T)
- for _, key := range vf.MapKeys() {
- val := vf.MapIndex(key)
- discardLegacy(val.Interface().(Message))
- }
- }
- }
- case reflect.Interface:
- // Must be oneof field.
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name))
- default: // E.g., test_proto.isCommunique_Union interface
- if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" {
- vf = vf.Elem() // E.g., *test_proto.Communique_Msg
- if !vf.IsNil() {
- vf = vf.Elem() // E.g., test_proto.Communique_Msg
- vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value
- if vf.Kind() == reflect.Ptr {
- discardLegacy(vf.Interface().(Message))
- }
- }
- }
- }
- }
- }
-
- if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() {
- if vf.Type() != reflect.TypeOf([]byte{}) {
- panic("expected XXX_unrecognized to be of type []byte")
- }
- vf.Set(reflect.ValueOf([]byte(nil)))
- }
-
- // For proto2 messages, only discard unknown fields in message extensions
- // that have been accessed via GetExtension.
- if em, err := extendable(m); err == nil {
- // Ignore lock since discardLegacy is not concurrency safe.
- emm, _ := em.extensionsRead()
- for _, mx := range emm {
- if m, ok := mx.value.(Message); ok {
- discardLegacy(m)
- }
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go
deleted file mode 100644
index 3abfed2c..00000000
--- a/vendor/github.com/golang/protobuf/proto/encode.go
+++ /dev/null
@@ -1,203 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for encoding data into the wire format for protocol buffers.
- */
-
-import (
- "errors"
- "reflect"
-)
-
-var (
- // errRepeatedHasNil is the error returned if Marshal is called with
- // a struct with a repeated field containing a nil element.
- errRepeatedHasNil = errors.New("proto: repeated field has nil element")
-
- // errOneofHasNil is the error returned if Marshal is called with
- // a struct with a oneof field containing a nil element.
- errOneofHasNil = errors.New("proto: oneof field has nil value")
-
- // ErrNil is the error returned if Marshal is called with nil.
- ErrNil = errors.New("proto: Marshal called with nil")
-
- // ErrTooLarge is the error returned if Marshal is called with a
- // message that encodes to >2GB.
- ErrTooLarge = errors.New("proto: message encodes to over 2 GB")
-)
-
-// The fundamental encoders that put bytes on the wire.
-// Those that take integer types all accept uint64 and are
-// therefore of type valueEncoder.
-
-const maxVarintBytes = 10 // maximum length of a varint
-
-// EncodeVarint returns the varint encoding of x.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-// Not used by the package itself, but helpful to clients
-// wishing to use the same encoding.
-func EncodeVarint(x uint64) []byte {
- var buf [maxVarintBytes]byte
- var n int
- for n = 0; x > 127; n++ {
- buf[n] = 0x80 | uint8(x&0x7F)
- x >>= 7
- }
- buf[n] = uint8(x)
- n++
- return buf[0:n]
-}
-
-// EncodeVarint writes a varint-encoded integer to the Buffer.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func (p *Buffer) EncodeVarint(x uint64) error {
- for x >= 1<<7 {
- p.buf = append(p.buf, uint8(x&0x7f|0x80))
- x >>= 7
- }
- p.buf = append(p.buf, uint8(x))
- return nil
-}
-
-// SizeVarint returns the varint encoding size of an integer.
-func SizeVarint(x uint64) int {
- switch {
- case x < 1<<7:
- return 1
- case x < 1<<14:
- return 2
- case x < 1<<21:
- return 3
- case x < 1<<28:
- return 4
- case x < 1<<35:
- return 5
- case x < 1<<42:
- return 6
- case x < 1<<49:
- return 7
- case x < 1<<56:
- return 8
- case x < 1<<63:
- return 9
- }
- return 10
-}
-
-// EncodeFixed64 writes a 64-bit integer to the Buffer.
-// This is the format for the
-// fixed64, sfixed64, and double protocol buffer types.
-func (p *Buffer) EncodeFixed64(x uint64) error {
- p.buf = append(p.buf,
- uint8(x),
- uint8(x>>8),
- uint8(x>>16),
- uint8(x>>24),
- uint8(x>>32),
- uint8(x>>40),
- uint8(x>>48),
- uint8(x>>56))
- return nil
-}
-
-// EncodeFixed32 writes a 32-bit integer to the Buffer.
-// This is the format for the
-// fixed32, sfixed32, and float protocol buffer types.
-func (p *Buffer) EncodeFixed32(x uint64) error {
- p.buf = append(p.buf,
- uint8(x),
- uint8(x>>8),
- uint8(x>>16),
- uint8(x>>24))
- return nil
-}
-
-// EncodeZigzag64 writes a zigzag-encoded 64-bit integer
-// to the Buffer.
-// This is the format used for the sint64 protocol buffer type.
-func (p *Buffer) EncodeZigzag64(x uint64) error {
- // use signed number to get arithmetic right shift.
- return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-
-// EncodeZigzag32 writes a zigzag-encoded 32-bit integer
-// to the Buffer.
-// This is the format used for the sint32 protocol buffer type.
-func (p *Buffer) EncodeZigzag32(x uint64) error {
- // use signed number to get arithmetic right shift.
- return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
-}
-
-// EncodeRawBytes writes a count-delimited byte buffer to the Buffer.
-// This is the format used for the bytes protocol buffer
-// type and for embedded messages.
-func (p *Buffer) EncodeRawBytes(b []byte) error {
- p.EncodeVarint(uint64(len(b)))
- p.buf = append(p.buf, b...)
- return nil
-}
-
-// EncodeStringBytes writes an encoded string to the Buffer.
-// This is the format used for the proto2 string type.
-func (p *Buffer) EncodeStringBytes(s string) error {
- p.EncodeVarint(uint64(len(s)))
- p.buf = append(p.buf, s...)
- return nil
-}
-
-// Marshaler is the interface representing objects that can marshal themselves.
-type Marshaler interface {
- Marshal() ([]byte, error)
-}
-
-// EncodeMessage writes the protocol buffer to the Buffer,
-// prefixed by a varint-encoded length.
-func (p *Buffer) EncodeMessage(pb Message) error {
- siz := Size(pb)
- p.EncodeVarint(uint64(siz))
- return p.Marshal(pb)
-}
-
-// All protocol buffer fields are nillable, but be careful.
-func isNil(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return v.IsNil()
- }
- return false
-}
diff --git a/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/golang/protobuf/proto/equal.go
deleted file mode 100644
index d4db5a1c..00000000
--- a/vendor/github.com/golang/protobuf/proto/equal.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Protocol buffer comparison.
-
-package proto
-
-import (
- "bytes"
- "log"
- "reflect"
- "strings"
-)
-
-/*
-Equal returns true iff protocol buffers a and b are equal.
-The arguments must both be pointers to protocol buffer structs.
-
-Equality is defined in this way:
- - Two messages are equal iff they are the same type,
- corresponding fields are equal, unknown field sets
- are equal, and extensions sets are equal.
- - Two set scalar fields are equal iff their values are equal.
- If the fields are of a floating-point type, remember that
- NaN != x for all x, including NaN. If the message is defined
- in a proto3 .proto file, fields are not "set"; specifically,
- zero length proto3 "bytes" fields are equal (nil == {}).
- - Two repeated fields are equal iff their lengths are the same,
- and their corresponding elements are equal. Note a "bytes" field,
- although represented by []byte, is not a repeated field and the
- rule for the scalar fields described above applies.
- - Two unset fields are equal.
- - Two unknown field sets are equal if their current
- encoded state is equal.
- - Two extension sets are equal iff they have corresponding
- elements that are pairwise equal.
- - Two map fields are equal iff their lengths are the same,
- and they contain the same set of elements. Zero-length map
- fields are equal.
- - Every other combination of things are not equal.
-
-The return value is undefined if a and b are not protocol buffers.
-*/
-func Equal(a, b Message) bool {
- if a == nil || b == nil {
- return a == b
- }
- v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b)
- if v1.Type() != v2.Type() {
- return false
- }
- if v1.Kind() == reflect.Ptr {
- if v1.IsNil() {
- return v2.IsNil()
- }
- if v2.IsNil() {
- return false
- }
- v1, v2 = v1.Elem(), v2.Elem()
- }
- if v1.Kind() != reflect.Struct {
- return false
- }
- return equalStruct(v1, v2)
-}
-
-// v1 and v2 are known to have the same type.
-func equalStruct(v1, v2 reflect.Value) bool {
- sprop := GetProperties(v1.Type())
- for i := 0; i < v1.NumField(); i++ {
- f := v1.Type().Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- f1, f2 := v1.Field(i), v2.Field(i)
- if f.Type.Kind() == reflect.Ptr {
- if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 {
- // both unset
- continue
- } else if n1 != n2 {
- // set/unset mismatch
- return false
- }
- f1, f2 = f1.Elem(), f2.Elem()
- }
- if !equalAny(f1, f2, sprop.Prop[i]) {
- return false
- }
- }
-
- if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() {
- em2 := v2.FieldByName("XXX_InternalExtensions")
- if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) {
- return false
- }
- }
-
- if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() {
- em2 := v2.FieldByName("XXX_extensions")
- if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) {
- return false
- }
- }
-
- uf := v1.FieldByName("XXX_unrecognized")
- if !uf.IsValid() {
- return true
- }
-
- u1 := uf.Bytes()
- u2 := v2.FieldByName("XXX_unrecognized").Bytes()
- return bytes.Equal(u1, u2)
-}
-
-// v1 and v2 are known to have the same type.
-// prop may be nil.
-func equalAny(v1, v2 reflect.Value, prop *Properties) bool {
- if v1.Type() == protoMessageType {
- m1, _ := v1.Interface().(Message)
- m2, _ := v2.Interface().(Message)
- return Equal(m1, m2)
- }
- switch v1.Kind() {
- case reflect.Bool:
- return v1.Bool() == v2.Bool()
- case reflect.Float32, reflect.Float64:
- return v1.Float() == v2.Float()
- case reflect.Int32, reflect.Int64:
- return v1.Int() == v2.Int()
- case reflect.Interface:
- // Probably a oneof field; compare the inner values.
- n1, n2 := v1.IsNil(), v2.IsNil()
- if n1 || n2 {
- return n1 == n2
- }
- e1, e2 := v1.Elem(), v2.Elem()
- if e1.Type() != e2.Type() {
- return false
- }
- return equalAny(e1, e2, nil)
- case reflect.Map:
- if v1.Len() != v2.Len() {
- return false
- }
- for _, key := range v1.MapKeys() {
- val2 := v2.MapIndex(key)
- if !val2.IsValid() {
- // This key was not found in the second map.
- return false
- }
- if !equalAny(v1.MapIndex(key), val2, nil) {
- return false
- }
- }
- return true
- case reflect.Ptr:
- // Maps may have nil values in them, so check for nil.
- if v1.IsNil() && v2.IsNil() {
- return true
- }
- if v1.IsNil() != v2.IsNil() {
- return false
- }
- return equalAny(v1.Elem(), v2.Elem(), prop)
- case reflect.Slice:
- if v1.Type().Elem().Kind() == reflect.Uint8 {
- // short circuit: []byte
-
- // Edge case: if this is in a proto3 message, a zero length
- // bytes field is considered the zero value.
- if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 {
- return true
- }
- if v1.IsNil() != v2.IsNil() {
- return false
- }
- return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte))
- }
-
- if v1.Len() != v2.Len() {
- return false
- }
- for i := 0; i < v1.Len(); i++ {
- if !equalAny(v1.Index(i), v2.Index(i), prop) {
- return false
- }
- }
- return true
- case reflect.String:
- return v1.Interface().(string) == v2.Interface().(string)
- case reflect.Struct:
- return equalStruct(v1, v2)
- case reflect.Uint32, reflect.Uint64:
- return v1.Uint() == v2.Uint()
- }
-
- // unknown type, so not a protocol buffer
- log.Printf("proto: don't know how to compare %v", v1)
- return false
-}
-
-// base is the struct type that the extensions are based on.
-// x1 and x2 are InternalExtensions.
-func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool {
- em1, _ := x1.extensionsRead()
- em2, _ := x2.extensionsRead()
- return equalExtMap(base, em1, em2)
-}
-
-func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool {
- if len(em1) != len(em2) {
- return false
- }
-
- for extNum, e1 := range em1 {
- e2, ok := em2[extNum]
- if !ok {
- return false
- }
-
- m1, m2 := e1.value, e2.value
-
- if m1 == nil && m2 == nil {
- // Both have only encoded form.
- if bytes.Equal(e1.enc, e2.enc) {
- continue
- }
- // The bytes are different, but the extensions might still be
- // equal. We need to decode them to compare.
- }
-
- if m1 != nil && m2 != nil {
- // Both are unencoded.
- if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
- return false
- }
- continue
- }
-
- // At least one is encoded. To do a semantically correct comparison
- // we need to unmarshal them first.
- var desc *ExtensionDesc
- if m := extensionMaps[base]; m != nil {
- desc = m[extNum]
- }
- if desc == nil {
- // If both have only encoded form and the bytes are the same,
- // it is handled above. We get here when the bytes are different.
- // We don't know how to decode it, so just compare them as byte
- // slices.
- log.Printf("proto: don't know how to compare extension %d of %v", extNum, base)
- return false
- }
- var err error
- if m1 == nil {
- m1, err = decodeExtension(e1.enc, desc)
- }
- if m2 == nil && err == nil {
- m2, err = decodeExtension(e2.enc, desc)
- }
- if err != nil {
- // The encoded form is invalid.
- log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err)
- return false
- }
- if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go
deleted file mode 100644
index 816a3b9d..00000000
--- a/vendor/github.com/golang/protobuf/proto/extensions.go
+++ /dev/null
@@ -1,543 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Types and routines for supporting protocol buffer extensions.
- */
-
-import (
- "errors"
- "fmt"
- "io"
- "reflect"
- "strconv"
- "sync"
-)
-
-// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message.
-var ErrMissingExtension = errors.New("proto: missing extension")
-
-// ExtensionRange represents a range of message extensions for a protocol buffer.
-// Used in code generated by the protocol compiler.
-type ExtensionRange struct {
- Start, End int32 // both inclusive
-}
-
-// extendableProto is an interface implemented by any protocol buffer generated by the current
-// proto compiler that may be extended.
-type extendableProto interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- extensionsWrite() map[int32]Extension
- extensionsRead() (map[int32]Extension, sync.Locker)
-}
-
-// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous
-// version of the proto compiler that may be extended.
-type extendableProtoV1 interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- ExtensionMap() map[int32]Extension
-}
-
-// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto.
-type extensionAdapter struct {
- extendableProtoV1
-}
-
-func (e extensionAdapter) extensionsWrite() map[int32]Extension {
- return e.ExtensionMap()
-}
-
-func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) {
- return e.ExtensionMap(), notLocker{}
-}
-
-// notLocker is a sync.Locker whose Lock and Unlock methods are nops.
-type notLocker struct{}
-
-func (n notLocker) Lock() {}
-func (n notLocker) Unlock() {}
-
-// extendable returns the extendableProto interface for the given generated proto message.
-// If the proto message has the old extension format, it returns a wrapper that implements
-// the extendableProto interface.
-func extendable(p interface{}) (extendableProto, error) {
- switch p := p.(type) {
- case extendableProto:
- if isNilPtr(p) {
- return nil, fmt.Errorf("proto: nil %T is not extendable", p)
- }
- return p, nil
- case extendableProtoV1:
- if isNilPtr(p) {
- return nil, fmt.Errorf("proto: nil %T is not extendable", p)
- }
- return extensionAdapter{p}, nil
- }
- // Don't allocate a specific error containing %T:
- // this is the hot path for Clone and MarshalText.
- return nil, errNotExtendable
-}
-
-var errNotExtendable = errors.New("proto: not an extendable proto.Message")
-
-func isNilPtr(x interface{}) bool {
- v := reflect.ValueOf(x)
- return v.Kind() == reflect.Ptr && v.IsNil()
-}
-
-// XXX_InternalExtensions is an internal representation of proto extensions.
-//
-// Each generated message struct type embeds an anonymous XXX_InternalExtensions field,
-// thus gaining the unexported 'extensions' method, which can be called only from the proto package.
-//
-// The methods of XXX_InternalExtensions are not concurrency safe in general,
-// but calls to logically read-only methods such as has and get may be executed concurrently.
-type XXX_InternalExtensions struct {
- // The struct must be indirect so that if a user inadvertently copies a
- // generated message and its embedded XXX_InternalExtensions, they
- // avoid the mayhem of a copied mutex.
- //
- // The mutex serializes all logically read-only operations to p.extensionMap.
- // It is up to the client to ensure that write operations to p.extensionMap are
- // mutually exclusive with other accesses.
- p *struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
- }
-}
-
-// extensionsWrite returns the extension map, creating it on first use.
-func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension {
- if e.p == nil {
- e.p = new(struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
- })
- e.p.extensionMap = make(map[int32]Extension)
- }
- return e.p.extensionMap
-}
-
-// extensionsRead returns the extensions map for read-only use. It may be nil.
-// The caller must hold the returned mutex's lock when accessing Elements within the map.
-func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) {
- if e.p == nil {
- return nil, nil
- }
- return e.p.extensionMap, &e.p.mu
-}
-
-// ExtensionDesc represents an extension specification.
-// Used in generated code from the protocol compiler.
-type ExtensionDesc struct {
- ExtendedType Message // nil pointer to the type that is being extended
- ExtensionType interface{} // nil pointer to the extension type
- Field int32 // field number
- Name string // fully-qualified name of extension, for text formatting
- Tag string // protobuf tag style
- Filename string // name of the file in which the extension is defined
-}
-
-func (ed *ExtensionDesc) repeated() bool {
- t := reflect.TypeOf(ed.ExtensionType)
- return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
-}
-
-// Extension represents an extension in a message.
-type Extension struct {
- // When an extension is stored in a message using SetExtension
- // only desc and value are set. When the message is marshaled
- // enc will be set to the encoded form of the message.
- //
- // When a message is unmarshaled and contains extensions, each
- // extension will have only enc set. When such an extension is
- // accessed using GetExtension (or GetExtensions) desc and value
- // will be set.
- desc *ExtensionDesc
- value interface{}
- enc []byte
-}
-
-// SetRawExtension is for testing only.
-func SetRawExtension(base Message, id int32, b []byte) {
- epb, err := extendable(base)
- if err != nil {
- return
- }
- extmap := epb.extensionsWrite()
- extmap[id] = Extension{enc: b}
-}
-
-// isExtensionField returns true iff the given field number is in an extension range.
-func isExtensionField(pb extendableProto, field int32) bool {
- for _, er := range pb.ExtensionRangeArray() {
- if er.Start <= field && field <= er.End {
- return true
- }
- }
- return false
-}
-
-// checkExtensionTypes checks that the given extension is valid for pb.
-func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error {
- var pbi interface{} = pb
- // Check the extended type.
- if ea, ok := pbi.(extensionAdapter); ok {
- pbi = ea.extendableProtoV1
- }
- if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
- return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a)
- }
- // Check the range.
- if !isExtensionField(pb, extension.Field) {
- return errors.New("proto: bad extension number; not in declared ranges")
- }
- return nil
-}
-
-// extPropKey is sufficient to uniquely identify an extension.
-type extPropKey struct {
- base reflect.Type
- field int32
-}
-
-var extProp = struct {
- sync.RWMutex
- m map[extPropKey]*Properties
-}{
- m: make(map[extPropKey]*Properties),
-}
-
-func extensionProperties(ed *ExtensionDesc) *Properties {
- key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field}
-
- extProp.RLock()
- if prop, ok := extProp.m[key]; ok {
- extProp.RUnlock()
- return prop
- }
- extProp.RUnlock()
-
- extProp.Lock()
- defer extProp.Unlock()
- // Check again.
- if prop, ok := extProp.m[key]; ok {
- return prop
- }
-
- prop := new(Properties)
- prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil)
- extProp.m[key] = prop
- return prop
-}
-
-// HasExtension returns whether the given extension is present in pb.
-func HasExtension(pb Message, extension *ExtensionDesc) bool {
- // TODO: Check types, field numbers, etc.?
- epb, err := extendable(pb)
- if err != nil {
- return false
- }
- extmap, mu := epb.extensionsRead()
- if extmap == nil {
- return false
- }
- mu.Lock()
- _, ok := extmap[extension.Field]
- mu.Unlock()
- return ok
-}
-
-// ClearExtension removes the given extension from pb.
-func ClearExtension(pb Message, extension *ExtensionDesc) {
- epb, err := extendable(pb)
- if err != nil {
- return
- }
- // TODO: Check types, field numbers, etc.?
- extmap := epb.extensionsWrite()
- delete(extmap, extension.Field)
-}
-
-// GetExtension retrieves a proto2 extended field from pb.
-//
-// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),
-// then GetExtension parses the encoded field and returns a Go value of the specified type.
-// If the field is not present, then the default value is returned (if one is specified),
-// otherwise ErrMissingExtension is reported.
-//
-// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil),
-// then GetExtension returns the raw encoded bytes of the field extension.
-func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
- epb, err := extendable(pb)
- if err != nil {
- return nil, err
- }
-
- if extension.ExtendedType != nil {
- // can only check type if this is a complete descriptor
- if err := checkExtensionTypes(epb, extension); err != nil {
- return nil, err
- }
- }
-
- emap, mu := epb.extensionsRead()
- if emap == nil {
- return defaultExtensionValue(extension)
- }
- mu.Lock()
- defer mu.Unlock()
- e, ok := emap[extension.Field]
- if !ok {
- // defaultExtensionValue returns the default value or
- // ErrMissingExtension if there is no default.
- return defaultExtensionValue(extension)
- }
-
- if e.value != nil {
- // Already decoded. Check the descriptor, though.
- if e.desc != extension {
- // This shouldn't happen. If it does, it means that
- // GetExtension was called twice with two different
- // descriptors with the same field number.
- return nil, errors.New("proto: descriptor conflict")
- }
- return e.value, nil
- }
-
- if extension.ExtensionType == nil {
- // incomplete descriptor
- return e.enc, nil
- }
-
- v, err := decodeExtension(e.enc, extension)
- if err != nil {
- return nil, err
- }
-
- // Remember the decoded version and drop the encoded version.
- // That way it is safe to mutate what we return.
- e.value = v
- e.desc = extension
- e.enc = nil
- emap[extension.Field] = e
- return e.value, nil
-}
-
-// defaultExtensionValue returns the default value for extension.
-// If no default for an extension is defined ErrMissingExtension is returned.
-func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) {
- if extension.ExtensionType == nil {
- // incomplete descriptor, so no default
- return nil, ErrMissingExtension
- }
-
- t := reflect.TypeOf(extension.ExtensionType)
- props := extensionProperties(extension)
-
- sf, _, err := fieldDefault(t, props)
- if err != nil {
- return nil, err
- }
-
- if sf == nil || sf.value == nil {
- // There is no default value.
- return nil, ErrMissingExtension
- }
-
- if t.Kind() != reflect.Ptr {
- // We do not need to return a Ptr, we can directly return sf.value.
- return sf.value, nil
- }
-
- // We need to return an interface{} that is a pointer to sf.value.
- value := reflect.New(t).Elem()
- value.Set(reflect.New(value.Type().Elem()))
- if sf.kind == reflect.Int32 {
- // We may have an int32 or an enum, but the underlying data is int32.
- // Since we can't set an int32 into a non int32 reflect.value directly
- // set it as a int32.
- value.Elem().SetInt(int64(sf.value.(int32)))
- } else {
- value.Elem().Set(reflect.ValueOf(sf.value))
- }
- return value.Interface(), nil
-}
-
-// decodeExtension decodes an extension encoded in b.
-func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) {
- t := reflect.TypeOf(extension.ExtensionType)
- unmarshal := typeUnmarshaler(t, extension.Tag)
-
- // t is a pointer to a struct, pointer to basic type or a slice.
- // Allocate space to store the pointer/slice.
- value := reflect.New(t).Elem()
-
- var err error
- for {
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- wire := int(x) & 7
-
- b, err = unmarshal(b, valToPointer(value.Addr()), wire)
- if err != nil {
- return nil, err
- }
-
- if len(b) == 0 {
- break
- }
- }
- return value.Interface(), nil
-}
-
-// GetExtensions returns a slice of the extensions present in pb that are also listed in es.
-// The returned slice has the same length as es; missing extensions will appear as nil elements.
-func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) {
- epb, err := extendable(pb)
- if err != nil {
- return nil, err
- }
- extensions = make([]interface{}, len(es))
- for i, e := range es {
- extensions[i], err = GetExtension(epb, e)
- if err == ErrMissingExtension {
- err = nil
- }
- if err != nil {
- return
- }
- }
- return
-}
-
-// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order.
-// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing
-// just the Field field, which defines the extension's field number.
-func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
- epb, err := extendable(pb)
- if err != nil {
- return nil, err
- }
- registeredExtensions := RegisteredExtensions(pb)
-
- emap, mu := epb.extensionsRead()
- if emap == nil {
- return nil, nil
- }
- mu.Lock()
- defer mu.Unlock()
- extensions := make([]*ExtensionDesc, 0, len(emap))
- for extid, e := range emap {
- desc := e.desc
- if desc == nil {
- desc = registeredExtensions[extid]
- if desc == nil {
- desc = &ExtensionDesc{Field: extid}
- }
- }
-
- extensions = append(extensions, desc)
- }
- return extensions, nil
-}
-
-// SetExtension sets the specified extension of pb to the specified value.
-func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error {
- epb, err := extendable(pb)
- if err != nil {
- return err
- }
- if err := checkExtensionTypes(epb, extension); err != nil {
- return err
- }
- typ := reflect.TypeOf(extension.ExtensionType)
- if typ != reflect.TypeOf(value) {
- return errors.New("proto: bad extension value type")
- }
- // nil extension values need to be caught early, because the
- // encoder can't distinguish an ErrNil due to a nil extension
- // from an ErrNil due to a missing field. Extensions are
- // always optional, so the encoder would just swallow the error
- // and drop all the extensions from the encoded message.
- if reflect.ValueOf(value).IsNil() {
- return fmt.Errorf("proto: SetExtension called with nil value of type %T", value)
- }
-
- extmap := epb.extensionsWrite()
- extmap[extension.Field] = Extension{desc: extension, value: value}
- return nil
-}
-
-// ClearAllExtensions clears all extensions from pb.
-func ClearAllExtensions(pb Message) {
- epb, err := extendable(pb)
- if err != nil {
- return
- }
- m := epb.extensionsWrite()
- for k := range m {
- delete(m, k)
- }
-}
-
-// A global registry of extensions.
-// The generated code will register the generated descriptors by calling RegisterExtension.
-
-var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc)
-
-// RegisterExtension is called from the generated code.
-func RegisterExtension(desc *ExtensionDesc) {
- st := reflect.TypeOf(desc.ExtendedType).Elem()
- m := extensionMaps[st]
- if m == nil {
- m = make(map[int32]*ExtensionDesc)
- extensionMaps[st] = m
- }
- if _, ok := m[desc.Field]; ok {
- panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field)))
- }
- m[desc.Field] = desc
-}
-
-// RegisteredExtensions returns a map of the registered extensions of a
-// protocol buffer struct, indexed by the extension number.
-// The argument pb should be a nil pointer to the struct type.
-func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc {
- return extensionMaps[reflect.TypeOf(pb).Elem()]
-}
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
deleted file mode 100644
index 75565cc6..00000000
--- a/vendor/github.com/golang/protobuf/proto/lib.go
+++ /dev/null
@@ -1,979 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/*
-Package proto converts data structures to and from the wire format of
-protocol buffers. It works in concert with the Go source code generated
-for .proto files by the protocol compiler.
-
-A summary of the properties of the protocol buffer interface
-for a protocol buffer variable v:
-
- - Names are turned from camel_case to CamelCase for export.
- - There are no methods on v to set fields; just treat
- them as structure fields.
- - There are getters that return a field's value if set,
- and return the field's default value if unset.
- The getters work even if the receiver is a nil message.
- - The zero value for a struct is its correct initialization state.
- All desired fields must be set before marshaling.
- - A Reset() method will restore a protobuf struct to its zero state.
- - Non-repeated fields are pointers to the values; nil means unset.
- That is, optional or required field int32 f becomes F *int32.
- - Repeated fields are slices.
- - Helper functions are available to aid the setting of fields.
- msg.Foo = proto.String("hello") // set field
- - Constants are defined to hold the default values of all fields that
- have them. They have the form Default_StructName_FieldName.
- Because the getter methods handle defaulted values,
- direct use of these constants should be rare.
- - Enums are given type names and maps from names to values.
- Enum values are prefixed by the enclosing message's name, or by the
- enum's type name if it is a top-level enum. Enum types have a String
- method, and a Enum method to assist in message construction.
- - Nested messages, groups and enums have type names prefixed with the name of
- the surrounding message type.
- - Extensions are given descriptor names that start with E_,
- followed by an underscore-delimited list of the nested messages
- that contain it (if any) followed by the CamelCased name of the
- extension field itself. HasExtension, ClearExtension, GetExtension
- and SetExtension are functions for manipulating extensions.
- - Oneof field sets are given a single field in their message,
- with distinguished wrapper types for each possible field value.
- - Marshal and Unmarshal are functions to encode and decode the wire format.
-
-When the .proto file specifies `syntax="proto3"`, there are some differences:
-
- - Non-repeated fields of non-message type are values instead of pointers.
- - Enum types do not get an Enum method.
-
-The simplest way to describe this is to see an example.
-Given file test.proto, containing
-
- package example;
-
- enum FOO { X = 17; }
-
- message Test {
- required string label = 1;
- optional int32 type = 2 [default=77];
- repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
- oneof union {
- int32 number = 6;
- string name = 7;
- }
- }
-
-The resulting file, test.pb.go, is:
-
- package example
-
- import proto "github.com/golang/protobuf/proto"
- import math "math"
-
- type FOO int32
- const (
- FOO_X FOO = 17
- )
- var FOO_name = map[int32]string{
- 17: "X",
- }
- var FOO_value = map[string]int32{
- "X": 17,
- }
-
- func (x FOO) Enum() *FOO {
- p := new(FOO)
- *p = x
- return p
- }
- func (x FOO) String() string {
- return proto.EnumName(FOO_name, int32(x))
- }
- func (x *FOO) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FOO_value, data)
- if err != nil {
- return err
- }
- *x = FOO(value)
- return nil
- }
-
- type Test struct {
- Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
- Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"`
- Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"`
- Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
- // Types that are valid to be assigned to Union:
- // *Test_Number
- // *Test_Name
- Union isTest_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
- }
- func (m *Test) Reset() { *m = Test{} }
- func (m *Test) String() string { return proto.CompactTextString(m) }
- func (*Test) ProtoMessage() {}
-
- type isTest_Union interface {
- isTest_Union()
- }
-
- type Test_Number struct {
- Number int32 `protobuf:"varint,6,opt,name=number"`
- }
- type Test_Name struct {
- Name string `protobuf:"bytes,7,opt,name=name"`
- }
-
- func (*Test_Number) isTest_Union() {}
- func (*Test_Name) isTest_Union() {}
-
- func (m *Test) GetUnion() isTest_Union {
- if m != nil {
- return m.Union
- }
- return nil
- }
- const Default_Test_Type int32 = 77
-
- func (m *Test) GetLabel() string {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return ""
- }
-
- func (m *Test) GetType() int32 {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return Default_Test_Type
- }
-
- func (m *Test) GetOptionalgroup() *Test_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
- }
- return nil
- }
-
- type Test_OptionalGroup struct {
- RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"`
- }
- func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} }
- func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) }
-
- func (m *Test_OptionalGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
- }
-
- func (m *Test) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Test_Number); ok {
- return x.Number
- }
- return 0
- }
-
- func (m *Test) GetName() string {
- if x, ok := m.GetUnion().(*Test_Name); ok {
- return x.Name
- }
- return ""
- }
-
- func init() {
- proto.RegisterEnum("example.FOO", FOO_name, FOO_value)
- }
-
-To create and play with a Test object:
-
- package main
-
- import (
- "log"
-
- "github.com/golang/protobuf/proto"
- pb "./example.pb"
- )
-
- func main() {
- test := &pb.Test{
- Label: proto.String("hello"),
- Type: proto.Int32(17),
- Reps: []int64{1, 2, 3},
- Optionalgroup: &pb.Test_OptionalGroup{
- RequiredField: proto.String("good bye"),
- },
- Union: &pb.Test_Name{"fred"},
- }
- data, err := proto.Marshal(test)
- if err != nil {
- log.Fatal("marshaling error: ", err)
- }
- newTest := &pb.Test{}
- err = proto.Unmarshal(data, newTest)
- if err != nil {
- log.Fatal("unmarshaling error: ", err)
- }
- // Now test and newTest contain the same data.
- if test.GetLabel() != newTest.GetLabel() {
- log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
- }
- // Use a type switch to determine which oneof was set.
- switch u := test.Union.(type) {
- case *pb.Test_Number: // u.Number contains the number.
- case *pb.Test_Name: // u.Name contains the string.
- }
- // etc.
- }
-*/
-package proto
-
-import (
- "encoding/json"
- "fmt"
- "log"
- "reflect"
- "sort"
- "strconv"
- "sync"
-)
-
-// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
-// Marshal reports this when a required field is not initialized.
-// Unmarshal reports this when a required field is missing from the wire data.
-type RequiredNotSetError struct{ field string }
-
-func (e *RequiredNotSetError) Error() string {
- if e.field == "" {
- return fmt.Sprintf("proto: required field not set")
- }
- return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-func (e *RequiredNotSetError) RequiredNotSet() bool {
- return true
-}
-
-type invalidUTF8Error struct{ field string }
-
-func (e *invalidUTF8Error) Error() string {
- if e.field == "" {
- return "proto: invalid UTF-8 detected"
- }
- return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field)
-}
-func (e *invalidUTF8Error) InvalidUTF8() bool {
- return true
-}
-
-// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8.
-// This error should not be exposed to the external API as such errors should
-// be recreated with the field information.
-var errInvalidUTF8 = &invalidUTF8Error{}
-
-// isNonFatal reports whether the error is either a RequiredNotSet error
-// or a InvalidUTF8 error.
-func isNonFatal(err error) bool {
- if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() {
- return true
- }
- if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() {
- return true
- }
- return false
-}
-
-type nonFatal struct{ E error }
-
-// Merge merges err into nf and reports whether it was successful.
-// Otherwise it returns false for any fatal non-nil errors.
-func (nf *nonFatal) Merge(err error) (ok bool) {
- if err == nil {
- return true // not an error
- }
- if !isNonFatal(err) {
- return false // fatal error
- }
- if nf.E == nil {
- nf.E = err // store first instance of non-fatal error
- }
- return true
-}
-
-// Message is implemented by generated protocol buffer messages.
-type Message interface {
- Reset()
- String() string
- ProtoMessage()
-}
-
-// Stats records allocation details about the protocol buffer encoders
-// and decoders. Useful for tuning the library itself.
-type Stats struct {
- Emalloc uint64 // mallocs in encode
- Dmalloc uint64 // mallocs in decode
- Encode uint64 // number of encodes
- Decode uint64 // number of decodes
- Chit uint64 // number of cache hits
- Cmiss uint64 // number of cache misses
- Size uint64 // number of sizes
-}
-
-// Set to true to enable stats collection.
-const collectStats = false
-
-var stats Stats
-
-// GetStats returns a copy of the global Stats structure.
-func GetStats() Stats { return stats }
-
-// A Buffer is a buffer manager for marshaling and unmarshaling
-// protocol buffers. It may be reused between invocations to
-// reduce memory usage. It is not necessary to use a Buffer;
-// the global functions Marshal and Unmarshal create a
-// temporary Buffer and are fine for most applications.
-type Buffer struct {
- buf []byte // encode/decode byte stream
- index int // read point
-
- deterministic bool
-}
-
-// NewBuffer allocates a new Buffer and initializes its internal data to
-// the contents of the argument slice.
-func NewBuffer(e []byte) *Buffer {
- return &Buffer{buf: e}
-}
-
-// Reset resets the Buffer, ready for marshaling a new protocol buffer.
-func (p *Buffer) Reset() {
- p.buf = p.buf[0:0] // for reading/writing
- p.index = 0 // for reading
-}
-
-// SetBuf replaces the internal buffer with the slice,
-// ready for unmarshaling the contents of the slice.
-func (p *Buffer) SetBuf(s []byte) {
- p.buf = s
- p.index = 0
-}
-
-// Bytes returns the contents of the Buffer.
-func (p *Buffer) Bytes() []byte { return p.buf }
-
-// SetDeterministic sets whether to use deterministic serialization.
-//
-// Deterministic serialization guarantees that for a given binary, equal
-// messages will always be serialized to the same bytes. This implies:
-//
-// - Repeated serialization of a message will return the same bytes.
-// - Different processes of the same binary (which may be executing on
-// different machines) will serialize equal messages to the same bytes.
-//
-// Note that the deterministic serialization is NOT canonical across
-// languages. It is not guaranteed to remain stable over time. It is unstable
-// across different builds with schema changes due to unknown fields.
-// Users who need canonical serialization (e.g., persistent storage in a
-// canonical form, fingerprinting, etc.) should define their own
-// canonicalization specification and implement their own serializer rather
-// than relying on this API.
-//
-// If deterministic serialization is requested, map entries will be sorted
-// by keys in lexographical order. This is an implementation detail and
-// subject to change.
-func (p *Buffer) SetDeterministic(deterministic bool) {
- p.deterministic = deterministic
-}
-
-/*
- * Helper routines for simplifying the creation of optional fields of basic type.
- */
-
-// Bool is a helper routine that allocates a new bool value
-// to store v and returns a pointer to it.
-func Bool(v bool) *bool {
- return &v
-}
-
-// Int32 is a helper routine that allocates a new int32 value
-// to store v and returns a pointer to it.
-func Int32(v int32) *int32 {
- return &v
-}
-
-// Int is a helper routine that allocates a new int32 value
-// to store v and returns a pointer to it, but unlike Int32
-// its argument value is an int.
-func Int(v int) *int32 {
- p := new(int32)
- *p = int32(v)
- return p
-}
-
-// Int64 is a helper routine that allocates a new int64 value
-// to store v and returns a pointer to it.
-func Int64(v int64) *int64 {
- return &v
-}
-
-// Float32 is a helper routine that allocates a new float32 value
-// to store v and returns a pointer to it.
-func Float32(v float32) *float32 {
- return &v
-}
-
-// Float64 is a helper routine that allocates a new float64 value
-// to store v and returns a pointer to it.
-func Float64(v float64) *float64 {
- return &v
-}
-
-// Uint32 is a helper routine that allocates a new uint32 value
-// to store v and returns a pointer to it.
-func Uint32(v uint32) *uint32 {
- return &v
-}
-
-// Uint64 is a helper routine that allocates a new uint64 value
-// to store v and returns a pointer to it.
-func Uint64(v uint64) *uint64 {
- return &v
-}
-
-// String is a helper routine that allocates a new string value
-// to store v and returns a pointer to it.
-func String(v string) *string {
- return &v
-}
-
-// EnumName is a helper function to simplify printing protocol buffer enums
-// by name. Given an enum map and a value, it returns a useful string.
-func EnumName(m map[int32]string, v int32) string {
- s, ok := m[v]
- if ok {
- return s
- }
- return strconv.Itoa(int(v))
-}
-
-// UnmarshalJSONEnum is a helper function to simplify recovering enum int values
-// from their JSON-encoded representation. Given a map from the enum's symbolic
-// names to its int values, and a byte buffer containing the JSON-encoded
-// value, it returns an int32 that can be cast to the enum type by the caller.
-//
-// The function can deal with both JSON representations, numeric and symbolic.
-func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {
- if data[0] == '"' {
- // New style: enums are strings.
- var repr string
- if err := json.Unmarshal(data, &repr); err != nil {
- return -1, err
- }
- val, ok := m[repr]
- if !ok {
- return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr)
- }
- return val, nil
- }
- // Old style: enums are ints.
- var val int32
- if err := json.Unmarshal(data, &val); err != nil {
- return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName)
- }
- return val, nil
-}
-
-// DebugPrint dumps the encoded data in b in a debugging format with a header
-// including the string s. Used in testing but made available for general debugging.
-func (p *Buffer) DebugPrint(s string, b []byte) {
- var u uint64
-
- obuf := p.buf
- index := p.index
- p.buf = b
- p.index = 0
- depth := 0
-
- fmt.Printf("\n--- %s ---\n", s)
-
-out:
- for {
- for i := 0; i < depth; i++ {
- fmt.Print(" ")
- }
-
- index := p.index
- if index == len(p.buf) {
- break
- }
-
- op, err := p.DecodeVarint()
- if err != nil {
- fmt.Printf("%3d: fetching op err %v\n", index, err)
- break out
- }
- tag := op >> 3
- wire := op & 7
-
- switch wire {
- default:
- fmt.Printf("%3d: t=%3d unknown wire=%d\n",
- index, tag, wire)
- break out
-
- case WireBytes:
- var r []byte
-
- r, err = p.DecodeRawBytes(false)
- if err != nil {
- break out
- }
- fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r))
- if len(r) <= 6 {
- for i := 0; i < len(r); i++ {
- fmt.Printf(" %.2x", r[i])
- }
- } else {
- for i := 0; i < 3; i++ {
- fmt.Printf(" %.2x", r[i])
- }
- fmt.Printf(" ..")
- for i := len(r) - 3; i < len(r); i++ {
- fmt.Printf(" %.2x", r[i])
- }
- }
- fmt.Printf("\n")
-
- case WireFixed32:
- u, err = p.DecodeFixed32()
- if err != nil {
- fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u)
-
- case WireFixed64:
- u, err = p.DecodeFixed64()
- if err != nil {
- fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u)
-
- case WireVarint:
- u, err = p.DecodeVarint()
- if err != nil {
- fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u)
-
- case WireStartGroup:
- fmt.Printf("%3d: t=%3d start\n", index, tag)
- depth++
-
- case WireEndGroup:
- depth--
- fmt.Printf("%3d: t=%3d end\n", index, tag)
- }
- }
-
- if depth != 0 {
- fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth)
- }
- fmt.Printf("\n")
-
- p.buf = obuf
- p.index = index
-}
-
-// SetDefaults sets unset protocol buffer fields to their default values.
-// It only modifies fields that are both unset and have defined defaults.
-// It recursively sets default values in any non-nil sub-messages.
-func SetDefaults(pb Message) {
- setDefaults(reflect.ValueOf(pb), true, false)
-}
-
-// v is a pointer to a struct.
-func setDefaults(v reflect.Value, recur, zeros bool) {
- v = v.Elem()
-
- defaultMu.RLock()
- dm, ok := defaults[v.Type()]
- defaultMu.RUnlock()
- if !ok {
- dm = buildDefaultMessage(v.Type())
- defaultMu.Lock()
- defaults[v.Type()] = dm
- defaultMu.Unlock()
- }
-
- for _, sf := range dm.scalars {
- f := v.Field(sf.index)
- if !f.IsNil() {
- // field already set
- continue
- }
- dv := sf.value
- if dv == nil && !zeros {
- // no explicit default, and don't want to set zeros
- continue
- }
- fptr := f.Addr().Interface() // **T
- // TODO: Consider batching the allocations we do here.
- switch sf.kind {
- case reflect.Bool:
- b := new(bool)
- if dv != nil {
- *b = dv.(bool)
- }
- *(fptr.(**bool)) = b
- case reflect.Float32:
- f := new(float32)
- if dv != nil {
- *f = dv.(float32)
- }
- *(fptr.(**float32)) = f
- case reflect.Float64:
- f := new(float64)
- if dv != nil {
- *f = dv.(float64)
- }
- *(fptr.(**float64)) = f
- case reflect.Int32:
- // might be an enum
- if ft := f.Type(); ft != int32PtrType {
- // enum
- f.Set(reflect.New(ft.Elem()))
- if dv != nil {
- f.Elem().SetInt(int64(dv.(int32)))
- }
- } else {
- // int32 field
- i := new(int32)
- if dv != nil {
- *i = dv.(int32)
- }
- *(fptr.(**int32)) = i
- }
- case reflect.Int64:
- i := new(int64)
- if dv != nil {
- *i = dv.(int64)
- }
- *(fptr.(**int64)) = i
- case reflect.String:
- s := new(string)
- if dv != nil {
- *s = dv.(string)
- }
- *(fptr.(**string)) = s
- case reflect.Uint8:
- // exceptional case: []byte
- var b []byte
- if dv != nil {
- db := dv.([]byte)
- b = make([]byte, len(db))
- copy(b, db)
- } else {
- b = []byte{}
- }
- *(fptr.(*[]byte)) = b
- case reflect.Uint32:
- u := new(uint32)
- if dv != nil {
- *u = dv.(uint32)
- }
- *(fptr.(**uint32)) = u
- case reflect.Uint64:
- u := new(uint64)
- if dv != nil {
- *u = dv.(uint64)
- }
- *(fptr.(**uint64)) = u
- default:
- log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind)
- }
- }
-
- for _, ni := range dm.nested {
- f := v.Field(ni)
- // f is *T or []*T or map[T]*T
- switch f.Kind() {
- case reflect.Ptr:
- if f.IsNil() {
- continue
- }
- setDefaults(f, recur, zeros)
-
- case reflect.Slice:
- for i := 0; i < f.Len(); i++ {
- e := f.Index(i)
- if e.IsNil() {
- continue
- }
- setDefaults(e, recur, zeros)
- }
-
- case reflect.Map:
- for _, k := range f.MapKeys() {
- e := f.MapIndex(k)
- if e.IsNil() {
- continue
- }
- setDefaults(e, recur, zeros)
- }
- }
- }
-}
-
-var (
- // defaults maps a protocol buffer struct type to a slice of the fields,
- // with its scalar fields set to their proto-declared non-zero default values.
- defaultMu sync.RWMutex
- defaults = make(map[reflect.Type]defaultMessage)
-
- int32PtrType = reflect.TypeOf((*int32)(nil))
-)
-
-// defaultMessage represents information about the default values of a message.
-type defaultMessage struct {
- scalars []scalarField
- nested []int // struct field index of nested messages
-}
-
-type scalarField struct {
- index int // struct field index
- kind reflect.Kind // element type (the T in *T or []T)
- value interface{} // the proto-declared default value, or nil
-}
-
-// t is a struct type.
-func buildDefaultMessage(t reflect.Type) (dm defaultMessage) {
- sprop := GetProperties(t)
- for _, prop := range sprop.Prop {
- fi, ok := sprop.decoderTags.get(prop.Tag)
- if !ok {
- // XXX_unrecognized
- continue
- }
- ft := t.Field(fi).Type
-
- sf, nested, err := fieldDefault(ft, prop)
- switch {
- case err != nil:
- log.Print(err)
- case nested:
- dm.nested = append(dm.nested, fi)
- case sf != nil:
- sf.index = fi
- dm.scalars = append(dm.scalars, *sf)
- }
- }
-
- return dm
-}
-
-// fieldDefault returns the scalarField for field type ft.
-// sf will be nil if the field can not have a default.
-// nestedMessage will be true if this is a nested message.
-// Note that sf.index is not set on return.
-func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) {
- var canHaveDefault bool
- switch ft.Kind() {
- case reflect.Ptr:
- if ft.Elem().Kind() == reflect.Struct {
- nestedMessage = true
- } else {
- canHaveDefault = true // proto2 scalar field
- }
-
- case reflect.Slice:
- switch ft.Elem().Kind() {
- case reflect.Ptr:
- nestedMessage = true // repeated message
- case reflect.Uint8:
- canHaveDefault = true // bytes field
- }
-
- case reflect.Map:
- if ft.Elem().Kind() == reflect.Ptr {
- nestedMessage = true // map with message values
- }
- }
-
- if !canHaveDefault {
- if nestedMessage {
- return nil, true, nil
- }
- return nil, false, nil
- }
-
- // We now know that ft is a pointer or slice.
- sf = &scalarField{kind: ft.Elem().Kind()}
-
- // scalar fields without defaults
- if !prop.HasDefault {
- return sf, false, nil
- }
-
- // a scalar field: either *T or []byte
- switch ft.Elem().Kind() {
- case reflect.Bool:
- x, err := strconv.ParseBool(prop.Default)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.Float32:
- x, err := strconv.ParseFloat(prop.Default, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err)
- }
- sf.value = float32(x)
- case reflect.Float64:
- x, err := strconv.ParseFloat(prop.Default, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.Int32:
- x, err := strconv.ParseInt(prop.Default, 10, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err)
- }
- sf.value = int32(x)
- case reflect.Int64:
- x, err := strconv.ParseInt(prop.Default, 10, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.String:
- sf.value = prop.Default
- case reflect.Uint8:
- // []byte (not *uint8)
- sf.value = []byte(prop.Default)
- case reflect.Uint32:
- x, err := strconv.ParseUint(prop.Default, 10, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err)
- }
- sf.value = uint32(x)
- case reflect.Uint64:
- x, err := strconv.ParseUint(prop.Default, 10, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err)
- }
- sf.value = x
- default:
- return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind())
- }
-
- return sf, false, nil
-}
-
-// mapKeys returns a sort.Interface to be used for sorting the map keys.
-// Map fields may have key types of non-float scalars, strings and enums.
-func mapKeys(vs []reflect.Value) sort.Interface {
- s := mapKeySorter{vs: vs}
-
- // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps.
- if len(vs) == 0 {
- return s
- }
- switch vs[0].Kind() {
- case reflect.Int32, reflect.Int64:
- s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() }
- case reflect.Uint32, reflect.Uint64:
- s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() }
- case reflect.Bool:
- s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true
- case reflect.String:
- s.less = func(a, b reflect.Value) bool { return a.String() < b.String() }
- default:
- panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind()))
- }
-
- return s
-}
-
-type mapKeySorter struct {
- vs []reflect.Value
- less func(a, b reflect.Value) bool
-}
-
-func (s mapKeySorter) Len() int { return len(s.vs) }
-func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] }
-func (s mapKeySorter) Less(i, j int) bool {
- return s.less(s.vs[i], s.vs[j])
-}
-
-// isProto3Zero reports whether v is a zero proto3 value.
-func isProto3Zero(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint32, reflect.Uint64:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.String:
- return v.String() == ""
- }
- return false
-}
-
-// ProtoPackageIsVersion2 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion2 = true
-
-// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion1 = true
-
-// InternalMessageInfo is a type used internally by generated .pb.go files.
-// This type is not intended to be used by non-generated code.
-// This type is not subject to any compatibility guarantee.
-type InternalMessageInfo struct {
- marshal *marshalInfo
- unmarshal *unmarshalInfo
- merge *mergeInfo
- discard *discardInfo
-}
diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go
deleted file mode 100644
index 3b6ca41d..00000000
--- a/vendor/github.com/golang/protobuf/proto/message_set.go
+++ /dev/null
@@ -1,314 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Support for message sets.
- */
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "reflect"
- "sort"
- "sync"
-)
-
-// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
-// A message type ID is required for storing a protocol buffer in a message set.
-var errNoMessageTypeID = errors.New("proto does not have a message type ID")
-
-// The first two types (_MessageSet_Item and messageSet)
-// model what the protocol compiler produces for the following protocol message:
-// message MessageSet {
-// repeated group Item = 1 {
-// required int32 type_id = 2;
-// required string message = 3;
-// };
-// }
-// That is the MessageSet wire format. We can't use a proto to generate these
-// because that would introduce a circular dependency between it and this package.
-
-type _MessageSet_Item struct {
- TypeId *int32 `protobuf:"varint,2,req,name=type_id"`
- Message []byte `protobuf:"bytes,3,req,name=message"`
-}
-
-type messageSet struct {
- Item []*_MessageSet_Item `protobuf:"group,1,rep"`
- XXX_unrecognized []byte
- // TODO: caching?
-}
-
-// Make sure messageSet is a Message.
-var _ Message = (*messageSet)(nil)
-
-// messageTypeIder is an interface satisfied by a protocol buffer type
-// that may be stored in a MessageSet.
-type messageTypeIder interface {
- MessageTypeId() int32
-}
-
-func (ms *messageSet) find(pb Message) *_MessageSet_Item {
- mti, ok := pb.(messageTypeIder)
- if !ok {
- return nil
- }
- id := mti.MessageTypeId()
- for _, item := range ms.Item {
- if *item.TypeId == id {
- return item
- }
- }
- return nil
-}
-
-func (ms *messageSet) Has(pb Message) bool {
- return ms.find(pb) != nil
-}
-
-func (ms *messageSet) Unmarshal(pb Message) error {
- if item := ms.find(pb); item != nil {
- return Unmarshal(item.Message, pb)
- }
- if _, ok := pb.(messageTypeIder); !ok {
- return errNoMessageTypeID
- }
- return nil // TODO: return error instead?
-}
-
-func (ms *messageSet) Marshal(pb Message) error {
- msg, err := Marshal(pb)
- if err != nil {
- return err
- }
- if item := ms.find(pb); item != nil {
- // reuse existing item
- item.Message = msg
- return nil
- }
-
- mti, ok := pb.(messageTypeIder)
- if !ok {
- return errNoMessageTypeID
- }
-
- mtid := mti.MessageTypeId()
- ms.Item = append(ms.Item, &_MessageSet_Item{
- TypeId: &mtid,
- Message: msg,
- })
- return nil
-}
-
-func (ms *messageSet) Reset() { *ms = messageSet{} }
-func (ms *messageSet) String() string { return CompactTextString(ms) }
-func (*messageSet) ProtoMessage() {}
-
-// Support for the message_set_wire_format message option.
-
-func skipVarint(buf []byte) []byte {
- i := 0
- for ; buf[i]&0x80 != 0; i++ {
- }
- return buf[i+1:]
-}
-
-// MarshalMessageSet encodes the extension map represented by m in the message set wire format.
-// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSet(exts interface{}) ([]byte, error) {
- return marshalMessageSet(exts, false)
-}
-
-// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal.
-func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) {
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- var u marshalInfo
- siz := u.sizeMessageSet(exts)
- b := make([]byte, 0, siz)
- return u.appendMessageSet(b, exts, deterministic)
-
- case map[int32]Extension:
- // This is an old-style extension map.
- // Wrap it in a new-style XXX_InternalExtensions.
- ie := XXX_InternalExtensions{
- p: &struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
- }{
- extensionMap: exts,
- },
- }
-
- var u marshalInfo
- siz := u.sizeMessageSet(&ie)
- b := make([]byte, 0, siz)
- return u.appendMessageSet(b, &ie, deterministic)
-
- default:
- return nil, errors.New("proto: not an extension map")
- }
-}
-
-// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
-// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSet(buf []byte, exts interface{}) error {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- m = exts.extensionsWrite()
- case map[int32]Extension:
- m = exts
- default:
- return errors.New("proto: not an extension map")
- }
-
- ms := new(messageSet)
- if err := Unmarshal(buf, ms); err != nil {
- return err
- }
- for _, item := range ms.Item {
- id := *item.TypeId
- msg := item.Message
-
- // Restore wire type and field number varint, plus length varint.
- // Be careful to preserve duplicate items.
- b := EncodeVarint(uint64(id)<<3 | WireBytes)
- if ext, ok := m[id]; ok {
- // Existing data; rip off the tag and length varint
- // so we join the new data correctly.
- // We can assume that ext.enc is set because we are unmarshaling.
- o := ext.enc[len(b):] // skip wire type and field number
- _, n := DecodeVarint(o) // calculate length of length varint
- o = o[n:] // skip length varint
- msg = append(o, msg...) // join old data and new data
- }
- b = append(b, EncodeVarint(uint64(len(msg)))...)
- b = append(b, msg...)
-
- m[id] = Extension{enc: b}
- }
- return nil
-}
-
-// MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
-// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- var mu sync.Locker
- m, mu = exts.extensionsRead()
- if m != nil {
- // Keep the extensions map locked until we're done marshaling to prevent
- // races between marshaling and unmarshaling the lazily-{en,de}coded
- // values.
- mu.Lock()
- defer mu.Unlock()
- }
- case map[int32]Extension:
- m = exts
- default:
- return nil, errors.New("proto: not an extension map")
- }
- var b bytes.Buffer
- b.WriteByte('{')
-
- // Process the map in key order for deterministic output.
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
-
- for i, id := range ids {
- ext := m[id]
- msd, ok := messageSetMap[id]
- if !ok {
- // Unknown type; we can't render it, so skip it.
- continue
- }
-
- if i > 0 && b.Len() > 1 {
- b.WriteByte(',')
- }
-
- fmt.Fprintf(&b, `"[%s]":`, msd.name)
-
- x := ext.value
- if x == nil {
- x = reflect.New(msd.t.Elem()).Interface()
- if err := Unmarshal(ext.enc, x.(Message)); err != nil {
- return nil, err
- }
- }
- d, err := json.Marshal(x)
- if err != nil {
- return nil, err
- }
- b.Write(d)
- }
- b.WriteByte('}')
- return b.Bytes(), nil
-}
-
-// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
-// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
- // Common-case fast path.
- if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
- return nil
- }
-
- // This is fairly tricky, and it's not clear that it is needed.
- return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
-}
-
-// A global registry of types that can be used in a MessageSet.
-
-var messageSetMap = make(map[int32]messageSetDesc)
-
-type messageSetDesc struct {
- t reflect.Type // pointer to struct
- name string
-}
-
-// RegisterMessageSetType is called from the generated code.
-func RegisterMessageSetType(m Message, fieldNum int32, name string) {
- messageSetMap[fieldNum] = messageSetDesc{
- t: reflect.TypeOf(m),
- name: name,
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
deleted file mode 100644
index b6cad908..00000000
--- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
+++ /dev/null
@@ -1,357 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// +build purego appengine js
-
-// This file contains an implementation of proto field accesses using package reflect.
-// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can
-// be used on App Engine.
-
-package proto
-
-import (
- "reflect"
- "sync"
-)
-
-const unsafeAllowed = false
-
-// A field identifies a field in a struct, accessible from a pointer.
-// In this implementation, a field is identified by the sequence of field indices
-// passed to reflect's FieldByIndex.
-type field []int
-
-// toField returns a field equivalent to the given reflect field.
-func toField(f *reflect.StructField) field {
- return f.Index
-}
-
-// invalidField is an invalid field identifier.
-var invalidField = field(nil)
-
-// zeroField is a noop when calling pointer.offset.
-var zeroField = field([]int{})
-
-// IsValid reports whether the field identifier is valid.
-func (f field) IsValid() bool { return f != nil }
-
-// The pointer type is for the table-driven decoder.
-// The implementation here uses a reflect.Value of pointer type to
-// create a generic pointer. In pointer_unsafe.go we use unsafe
-// instead of reflect to implement the same (but faster) interface.
-type pointer struct {
- v reflect.Value
-}
-
-// toPointer converts an interface of pointer type to a pointer
-// that points to the same target.
-func toPointer(i *Message) pointer {
- return pointer{v: reflect.ValueOf(*i)}
-}
-
-// toAddrPointer converts an interface to a pointer that points to
-// the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
- v := reflect.ValueOf(*i)
- u := reflect.New(v.Type())
- u.Elem().Set(v)
- return pointer{v: u}
-}
-
-// valToPointer converts v to a pointer. v must be of pointer type.
-func valToPointer(v reflect.Value) pointer {
- return pointer{v: v}
-}
-
-// offset converts from a pointer to a structure to a pointer to
-// one of its fields.
-func (p pointer) offset(f field) pointer {
- return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
-}
-
-func (p pointer) isNil() bool {
- return p.v.IsNil()
-}
-
-// grow updates the slice s in place to make it one element longer.
-// s must be addressable.
-// Returns the (addressable) new element.
-func grow(s reflect.Value) reflect.Value {
- n, m := s.Len(), s.Cap()
- if n < m {
- s.SetLen(n + 1)
- } else {
- s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem())))
- }
- return s.Index(n)
-}
-
-func (p pointer) toInt64() *int64 {
- return p.v.Interface().(*int64)
-}
-func (p pointer) toInt64Ptr() **int64 {
- return p.v.Interface().(**int64)
-}
-func (p pointer) toInt64Slice() *[]int64 {
- return p.v.Interface().(*[]int64)
-}
-
-var int32ptr = reflect.TypeOf((*int32)(nil))
-
-func (p pointer) toInt32() *int32 {
- return p.v.Convert(int32ptr).Interface().(*int32)
-}
-
-// The toInt32Ptr/Slice methods don't work because of enums.
-// Instead, we must use set/get methods for the int32ptr/slice case.
-/*
- func (p pointer) toInt32Ptr() **int32 {
- return p.v.Interface().(**int32)
-}
- func (p pointer) toInt32Slice() *[]int32 {
- return p.v.Interface().(*[]int32)
-}
-*/
-func (p pointer) getInt32Ptr() *int32 {
- if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
- // raw int32 type
- return p.v.Elem().Interface().(*int32)
- }
- // an enum
- return p.v.Elem().Convert(int32PtrType).Interface().(*int32)
-}
-func (p pointer) setInt32Ptr(v int32) {
- // Allocate value in a *int32. Possibly convert that to a *enum.
- // Then assign it to a **int32 or **enum.
- // Note: we can convert *int32 to *enum, but we can't convert
- // **int32 to **enum!
- p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem()))
-}
-
-// getInt32Slice copies []int32 from p as a new slice.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) getInt32Slice() []int32 {
- if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
- // raw int32 type
- return p.v.Elem().Interface().([]int32)
- }
- // an enum
- // Allocate a []int32, then assign []enum's values into it.
- // Note: we can't convert []enum to []int32.
- slice := p.v.Elem()
- s := make([]int32, slice.Len())
- for i := 0; i < slice.Len(); i++ {
- s[i] = int32(slice.Index(i).Int())
- }
- return s
-}
-
-// setInt32Slice copies []int32 into p as a new slice.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) setInt32Slice(v []int32) {
- if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
- // raw int32 type
- p.v.Elem().Set(reflect.ValueOf(v))
- return
- }
- // an enum
- // Allocate a []enum, then assign []int32's values into it.
- // Note: we can't convert []enum to []int32.
- slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v))
- for i, x := range v {
- slice.Index(i).SetInt(int64(x))
- }
- p.v.Elem().Set(slice)
-}
-func (p pointer) appendInt32Slice(v int32) {
- grow(p.v.Elem()).SetInt(int64(v))
-}
-
-func (p pointer) toUint64() *uint64 {
- return p.v.Interface().(*uint64)
-}
-func (p pointer) toUint64Ptr() **uint64 {
- return p.v.Interface().(**uint64)
-}
-func (p pointer) toUint64Slice() *[]uint64 {
- return p.v.Interface().(*[]uint64)
-}
-func (p pointer) toUint32() *uint32 {
- return p.v.Interface().(*uint32)
-}
-func (p pointer) toUint32Ptr() **uint32 {
- return p.v.Interface().(**uint32)
-}
-func (p pointer) toUint32Slice() *[]uint32 {
- return p.v.Interface().(*[]uint32)
-}
-func (p pointer) toBool() *bool {
- return p.v.Interface().(*bool)
-}
-func (p pointer) toBoolPtr() **bool {
- return p.v.Interface().(**bool)
-}
-func (p pointer) toBoolSlice() *[]bool {
- return p.v.Interface().(*[]bool)
-}
-func (p pointer) toFloat64() *float64 {
- return p.v.Interface().(*float64)
-}
-func (p pointer) toFloat64Ptr() **float64 {
- return p.v.Interface().(**float64)
-}
-func (p pointer) toFloat64Slice() *[]float64 {
- return p.v.Interface().(*[]float64)
-}
-func (p pointer) toFloat32() *float32 {
- return p.v.Interface().(*float32)
-}
-func (p pointer) toFloat32Ptr() **float32 {
- return p.v.Interface().(**float32)
-}
-func (p pointer) toFloat32Slice() *[]float32 {
- return p.v.Interface().(*[]float32)
-}
-func (p pointer) toString() *string {
- return p.v.Interface().(*string)
-}
-func (p pointer) toStringPtr() **string {
- return p.v.Interface().(**string)
-}
-func (p pointer) toStringSlice() *[]string {
- return p.v.Interface().(*[]string)
-}
-func (p pointer) toBytes() *[]byte {
- return p.v.Interface().(*[]byte)
-}
-func (p pointer) toBytesSlice() *[][]byte {
- return p.v.Interface().(*[][]byte)
-}
-func (p pointer) toExtensions() *XXX_InternalExtensions {
- return p.v.Interface().(*XXX_InternalExtensions)
-}
-func (p pointer) toOldExtensions() *map[int32]Extension {
- return p.v.Interface().(*map[int32]Extension)
-}
-func (p pointer) getPointer() pointer {
- return pointer{v: p.v.Elem()}
-}
-func (p pointer) setPointer(q pointer) {
- p.v.Elem().Set(q.v)
-}
-func (p pointer) appendPointer(q pointer) {
- grow(p.v.Elem()).Set(q.v)
-}
-
-// getPointerSlice copies []*T from p as a new []pointer.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) getPointerSlice() []pointer {
- if p.v.IsNil() {
- return nil
- }
- n := p.v.Elem().Len()
- s := make([]pointer, n)
- for i := 0; i < n; i++ {
- s[i] = pointer{v: p.v.Elem().Index(i)}
- }
- return s
-}
-
-// setPointerSlice copies []pointer into p as a new []*T.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) setPointerSlice(v []pointer) {
- if v == nil {
- p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem())
- return
- }
- s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v))
- for _, p := range v {
- s = reflect.Append(s, p.v)
- }
- p.v.Elem().Set(s)
-}
-
-// getInterfacePointer returns a pointer that points to the
-// interface data of the interface pointed by p.
-func (p pointer) getInterfacePointer() pointer {
- if p.v.Elem().IsNil() {
- return pointer{v: p.v.Elem()}
- }
- return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct
-}
-
-func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
- // TODO: check that p.v.Type().Elem() == t?
- return p.v
-}
-
-func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-
-var atomicLock sync.Mutex
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
deleted file mode 100644
index d55a335d..00000000
--- a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
+++ /dev/null
@@ -1,308 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// +build !purego,!appengine,!js
-
-// This file contains the implementation of the proto field accesses using package unsafe.
-
-package proto
-
-import (
- "reflect"
- "sync/atomic"
- "unsafe"
-)
-
-const unsafeAllowed = true
-
-// A field identifies a field in a struct, accessible from a pointer.
-// In this implementation, a field is identified by its byte offset from the start of the struct.
-type field uintptr
-
-// toField returns a field equivalent to the given reflect field.
-func toField(f *reflect.StructField) field {
- return field(f.Offset)
-}
-
-// invalidField is an invalid field identifier.
-const invalidField = ^field(0)
-
-// zeroField is a noop when calling pointer.offset.
-const zeroField = field(0)
-
-// IsValid reports whether the field identifier is valid.
-func (f field) IsValid() bool {
- return f != invalidField
-}
-
-// The pointer type below is for the new table-driven encoder/decoder.
-// The implementation here uses unsafe.Pointer to create a generic pointer.
-// In pointer_reflect.go we use reflect instead of unsafe to implement
-// the same (but slower) interface.
-type pointer struct {
- p unsafe.Pointer
-}
-
-// size of pointer
-var ptrSize = unsafe.Sizeof(uintptr(0))
-
-// toPointer converts an interface of pointer type to a pointer
-// that points to the same target.
-func toPointer(i *Message) pointer {
- // Super-tricky - read pointer out of data word of interface value.
- // Saves ~25ns over the equivalent:
- // return valToPointer(reflect.ValueOf(*i))
- return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
-}
-
-// toAddrPointer converts an interface to a pointer that points to
-// the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
- // Super-tricky - read or get the address of data word of interface value.
- if isptr {
- // The interface is of pointer type, thus it is a direct interface.
- // The data word is the pointer data itself. We take its address.
- return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
- }
- // The interface is not of pointer type. The data word is the pointer
- // to the data.
- return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
-}
-
-// valToPointer converts v to a pointer. v must be of pointer type.
-func valToPointer(v reflect.Value) pointer {
- return pointer{p: unsafe.Pointer(v.Pointer())}
-}
-
-// offset converts from a pointer to a structure to a pointer to
-// one of its fields.
-func (p pointer) offset(f field) pointer {
- // For safety, we should panic if !f.IsValid, however calling panic causes
- // this to no longer be inlineable, which is a serious performance cost.
- /*
- if !f.IsValid() {
- panic("invalid field")
- }
- */
- return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))}
-}
-
-func (p pointer) isNil() bool {
- return p.p == nil
-}
-
-func (p pointer) toInt64() *int64 {
- return (*int64)(p.p)
-}
-func (p pointer) toInt64Ptr() **int64 {
- return (**int64)(p.p)
-}
-func (p pointer) toInt64Slice() *[]int64 {
- return (*[]int64)(p.p)
-}
-func (p pointer) toInt32() *int32 {
- return (*int32)(p.p)
-}
-
-// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist.
-/*
- func (p pointer) toInt32Ptr() **int32 {
- return (**int32)(p.p)
- }
- func (p pointer) toInt32Slice() *[]int32 {
- return (*[]int32)(p.p)
- }
-*/
-func (p pointer) getInt32Ptr() *int32 {
- return *(**int32)(p.p)
-}
-func (p pointer) setInt32Ptr(v int32) {
- *(**int32)(p.p) = &v
-}
-
-// getInt32Slice loads a []int32 from p.
-// The value returned is aliased with the original slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) getInt32Slice() []int32 {
- return *(*[]int32)(p.p)
-}
-
-// setInt32Slice stores a []int32 to p.
-// The value set is aliased with the input slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) setInt32Slice(v []int32) {
- *(*[]int32)(p.p) = v
-}
-
-// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead?
-func (p pointer) appendInt32Slice(v int32) {
- s := (*[]int32)(p.p)
- *s = append(*s, v)
-}
-
-func (p pointer) toUint64() *uint64 {
- return (*uint64)(p.p)
-}
-func (p pointer) toUint64Ptr() **uint64 {
- return (**uint64)(p.p)
-}
-func (p pointer) toUint64Slice() *[]uint64 {
- return (*[]uint64)(p.p)
-}
-func (p pointer) toUint32() *uint32 {
- return (*uint32)(p.p)
-}
-func (p pointer) toUint32Ptr() **uint32 {
- return (**uint32)(p.p)
-}
-func (p pointer) toUint32Slice() *[]uint32 {
- return (*[]uint32)(p.p)
-}
-func (p pointer) toBool() *bool {
- return (*bool)(p.p)
-}
-func (p pointer) toBoolPtr() **bool {
- return (**bool)(p.p)
-}
-func (p pointer) toBoolSlice() *[]bool {
- return (*[]bool)(p.p)
-}
-func (p pointer) toFloat64() *float64 {
- return (*float64)(p.p)
-}
-func (p pointer) toFloat64Ptr() **float64 {
- return (**float64)(p.p)
-}
-func (p pointer) toFloat64Slice() *[]float64 {
- return (*[]float64)(p.p)
-}
-func (p pointer) toFloat32() *float32 {
- return (*float32)(p.p)
-}
-func (p pointer) toFloat32Ptr() **float32 {
- return (**float32)(p.p)
-}
-func (p pointer) toFloat32Slice() *[]float32 {
- return (*[]float32)(p.p)
-}
-func (p pointer) toString() *string {
- return (*string)(p.p)
-}
-func (p pointer) toStringPtr() **string {
- return (**string)(p.p)
-}
-func (p pointer) toStringSlice() *[]string {
- return (*[]string)(p.p)
-}
-func (p pointer) toBytes() *[]byte {
- return (*[]byte)(p.p)
-}
-func (p pointer) toBytesSlice() *[][]byte {
- return (*[][]byte)(p.p)
-}
-func (p pointer) toExtensions() *XXX_InternalExtensions {
- return (*XXX_InternalExtensions)(p.p)
-}
-func (p pointer) toOldExtensions() *map[int32]Extension {
- return (*map[int32]Extension)(p.p)
-}
-
-// getPointerSlice loads []*T from p as a []pointer.
-// The value returned is aliased with the original slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) getPointerSlice() []pointer {
- // Super-tricky - p should point to a []*T where T is a
- // message type. We load it as []pointer.
- return *(*[]pointer)(p.p)
-}
-
-// setPointerSlice stores []pointer into p as a []*T.
-// The value set is aliased with the input slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) setPointerSlice(v []pointer) {
- // Super-tricky - p should point to a []*T where T is a
- // message type. We store it as []pointer.
- *(*[]pointer)(p.p) = v
-}
-
-// getPointer loads the pointer at p and returns it.
-func (p pointer) getPointer() pointer {
- return pointer{p: *(*unsafe.Pointer)(p.p)}
-}
-
-// setPointer stores the pointer q at p.
-func (p pointer) setPointer(q pointer) {
- *(*unsafe.Pointer)(p.p) = q.p
-}
-
-// append q to the slice pointed to by p.
-func (p pointer) appendPointer(q pointer) {
- s := (*[]unsafe.Pointer)(p.p)
- *s = append(*s, q.p)
-}
-
-// getInterfacePointer returns a pointer that points to the
-// interface data of the interface pointed by p.
-func (p pointer) getInterfacePointer() pointer {
- // Super-tricky - read pointer out of data word of interface value.
- return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]}
-}
-
-// asPointerTo returns a reflect.Value that is a pointer to an
-// object of type t stored at p.
-func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
- return reflect.NewAt(t, p.p)
-}
-
-func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
- return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
-func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
- return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
-func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
- return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
-func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
- return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
deleted file mode 100644
index 50b99b83..00000000
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ /dev/null
@@ -1,544 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for encoding data into the wire format for protocol buffers.
- */
-
-import (
- "fmt"
- "log"
- "os"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "sync"
-)
-
-const debug bool = false
-
-// Constants that identify the encoding of a value on the wire.
-const (
- WireVarint = 0
- WireFixed64 = 1
- WireBytes = 2
- WireStartGroup = 3
- WireEndGroup = 4
- WireFixed32 = 5
-)
-
-// tagMap is an optimization over map[int]int for typical protocol buffer
-// use-cases. Encoded protocol buffers are often in tag order with small tag
-// numbers.
-type tagMap struct {
- fastTags []int
- slowTags map[int]int
-}
-
-// tagMapFastLimit is the upper bound on the tag number that will be stored in
-// the tagMap slice rather than its map.
-const tagMapFastLimit = 1024
-
-func (p *tagMap) get(t int) (int, bool) {
- if t > 0 && t < tagMapFastLimit {
- if t >= len(p.fastTags) {
- return 0, false
- }
- fi := p.fastTags[t]
- return fi, fi >= 0
- }
- fi, ok := p.slowTags[t]
- return fi, ok
-}
-
-func (p *tagMap) put(t int, fi int) {
- if t > 0 && t < tagMapFastLimit {
- for len(p.fastTags) < t+1 {
- p.fastTags = append(p.fastTags, -1)
- }
- p.fastTags[t] = fi
- return
- }
- if p.slowTags == nil {
- p.slowTags = make(map[int]int)
- }
- p.slowTags[t] = fi
-}
-
-// StructProperties represents properties for all the fields of a struct.
-// decoderTags and decoderOrigNames should only be used by the decoder.
-type StructProperties struct {
- Prop []*Properties // properties for each field
- reqCount int // required count
- decoderTags tagMap // map from proto tag to struct field number
- decoderOrigNames map[string]int // map from original name to struct field number
- order []int // list of struct field numbers in tag order
-
- // OneofTypes contains information about the oneof fields in this message.
- // It is keyed by the original name of a field.
- OneofTypes map[string]*OneofProperties
-}
-
-// OneofProperties represents information about a specific field in a oneof.
-type OneofProperties struct {
- Type reflect.Type // pointer to generated struct type for this oneof field
- Field int // struct field number of the containing oneof in the message
- Prop *Properties
-}
-
-// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec.
-// See encode.go, (*Buffer).enc_struct.
-
-func (sp *StructProperties) Len() int { return len(sp.order) }
-func (sp *StructProperties) Less(i, j int) bool {
- return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag
-}
-func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] }
-
-// Properties represents the protocol-specific behavior of a single struct field.
-type Properties struct {
- Name string // name of the field, for error messages
- OrigName string // original name before protocol compiler (always set)
- JSONName string // name to use for JSON; determined by protoc
- Wire string
- WireType int
- Tag int
- Required bool
- Optional bool
- Repeated bool
- Packed bool // relevant for repeated primitives only
- Enum string // set for enum types only
- proto3 bool // whether this is known to be a proto3 field
- oneof bool // whether this is a oneof field
-
- Default string // default value
- HasDefault bool // whether an explicit default was provided
-
- stype reflect.Type // set for struct types only
- sprop *StructProperties // set for struct types only
-
- mtype reflect.Type // set for map types only
- MapKeyProp *Properties // set for map types only
- MapValProp *Properties // set for map types only
-}
-
-// String formats the properties in the protobuf struct field tag style.
-func (p *Properties) String() string {
- s := p.Wire
- s += ","
- s += strconv.Itoa(p.Tag)
- if p.Required {
- s += ",req"
- }
- if p.Optional {
- s += ",opt"
- }
- if p.Repeated {
- s += ",rep"
- }
- if p.Packed {
- s += ",packed"
- }
- s += ",name=" + p.OrigName
- if p.JSONName != p.OrigName {
- s += ",json=" + p.JSONName
- }
- if p.proto3 {
- s += ",proto3"
- }
- if p.oneof {
- s += ",oneof"
- }
- if len(p.Enum) > 0 {
- s += ",enum=" + p.Enum
- }
- if p.HasDefault {
- s += ",def=" + p.Default
- }
- return s
-}
-
-// Parse populates p by parsing a string in the protobuf struct field tag style.
-func (p *Properties) Parse(s string) {
- // "bytes,49,opt,name=foo,def=hello!"
- fields := strings.Split(s, ",") // breaks def=, but handled below.
- if len(fields) < 2 {
- fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s)
- return
- }
-
- p.Wire = fields[0]
- switch p.Wire {
- case "varint":
- p.WireType = WireVarint
- case "fixed32":
- p.WireType = WireFixed32
- case "fixed64":
- p.WireType = WireFixed64
- case "zigzag32":
- p.WireType = WireVarint
- case "zigzag64":
- p.WireType = WireVarint
- case "bytes", "group":
- p.WireType = WireBytes
- // no numeric converter for non-numeric types
- default:
- fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s)
- return
- }
-
- var err error
- p.Tag, err = strconv.Atoi(fields[1])
- if err != nil {
- return
- }
-
-outer:
- for i := 2; i < len(fields); i++ {
- f := fields[i]
- switch {
- case f == "req":
- p.Required = true
- case f == "opt":
- p.Optional = true
- case f == "rep":
- p.Repeated = true
- case f == "packed":
- p.Packed = true
- case strings.HasPrefix(f, "name="):
- p.OrigName = f[5:]
- case strings.HasPrefix(f, "json="):
- p.JSONName = f[5:]
- case strings.HasPrefix(f, "enum="):
- p.Enum = f[5:]
- case f == "proto3":
- p.proto3 = true
- case f == "oneof":
- p.oneof = true
- case strings.HasPrefix(f, "def="):
- p.HasDefault = true
- p.Default = f[4:] // rest of string
- if i+1 < len(fields) {
- // Commas aren't escaped, and def is always last.
- p.Default += "," + strings.Join(fields[i+1:], ",")
- break outer
- }
- }
- }
-}
-
-var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()
-
-// setFieldProps initializes the field properties for submessages and maps.
-func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
- switch t1 := typ; t1.Kind() {
- case reflect.Ptr:
- if t1.Elem().Kind() == reflect.Struct {
- p.stype = t1.Elem()
- }
-
- case reflect.Slice:
- if t2 := t1.Elem(); t2.Kind() == reflect.Ptr && t2.Elem().Kind() == reflect.Struct {
- p.stype = t2.Elem()
- }
-
- case reflect.Map:
- p.mtype = t1
- p.MapKeyProp = &Properties{}
- p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
- p.MapValProp = &Properties{}
- vtype := p.mtype.Elem()
- if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
- // The value type is not a message (*T) or bytes ([]byte),
- // so we need encoders for the pointer to this type.
- vtype = reflect.PtrTo(vtype)
- }
- p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
- }
-
- if p.stype != nil {
- if lockGetProp {
- p.sprop = GetProperties(p.stype)
- } else {
- p.sprop = getPropertiesLocked(p.stype)
- }
- }
-}
-
-var (
- marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
-)
-
-// Init populates the properties from a protocol buffer struct tag.
-func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
- p.init(typ, name, tag, f, true)
-}
-
-func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) {
- // "bytes,49,opt,def=hello!"
- p.Name = name
- p.OrigName = name
- if tag == "" {
- return
- }
- p.Parse(tag)
- p.setFieldProps(typ, f, lockGetProp)
-}
-
-var (
- propertiesMu sync.RWMutex
- propertiesMap = make(map[reflect.Type]*StructProperties)
-)
-
-// GetProperties returns the list of properties for the type represented by t.
-// t must represent a generated struct type of a protocol message.
-func GetProperties(t reflect.Type) *StructProperties {
- if t.Kind() != reflect.Struct {
- panic("proto: type must have kind struct")
- }
-
- // Most calls to GetProperties in a long-running program will be
- // retrieving details for types we have seen before.
- propertiesMu.RLock()
- sprop, ok := propertiesMap[t]
- propertiesMu.RUnlock()
- if ok {
- if collectStats {
- stats.Chit++
- }
- return sprop
- }
-
- propertiesMu.Lock()
- sprop = getPropertiesLocked(t)
- propertiesMu.Unlock()
- return sprop
-}
-
-// getPropertiesLocked requires that propertiesMu is held.
-func getPropertiesLocked(t reflect.Type) *StructProperties {
- if prop, ok := propertiesMap[t]; ok {
- if collectStats {
- stats.Chit++
- }
- return prop
- }
- if collectStats {
- stats.Cmiss++
- }
-
- prop := new(StructProperties)
- // in case of recursive protos, fill this in now.
- propertiesMap[t] = prop
-
- // build properties
- prop.Prop = make([]*Properties, t.NumField())
- prop.order = make([]int, t.NumField())
-
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- p := new(Properties)
- name := f.Name
- p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false)
-
- oneof := f.Tag.Get("protobuf_oneof") // special case
- if oneof != "" {
- // Oneof fields don't use the traditional protobuf tag.
- p.OrigName = oneof
- }
- prop.Prop[i] = p
- prop.order[i] = i
- if debug {
- print(i, " ", f.Name, " ", t.String(), " ")
- if p.Tag > 0 {
- print(p.String())
- }
- print("\n")
- }
- }
-
- // Re-order prop.order.
- sort.Sort(prop)
-
- type oneofMessage interface {
- XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
- }
- if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
- var oots []interface{}
- _, _, _, oots = om.XXX_OneofFuncs()
-
- // Interpret oneof metadata.
- prop.OneofTypes = make(map[string]*OneofProperties)
- for _, oot := range oots {
- oop := &OneofProperties{
- Type: reflect.ValueOf(oot).Type(), // *T
- Prop: new(Properties),
- }
- sft := oop.Type.Elem().Field(0)
- oop.Prop.Name = sft.Name
- oop.Prop.Parse(sft.Tag.Get("protobuf"))
- // There will be exactly one interface field that
- // this new value is assignable to.
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if f.Type.Kind() != reflect.Interface {
- continue
- }
- if !oop.Type.AssignableTo(f.Type) {
- continue
- }
- oop.Field = i
- break
- }
- prop.OneofTypes[oop.Prop.OrigName] = oop
- }
- }
-
- // build required counts
- // build tags
- reqCount := 0
- prop.decoderOrigNames = make(map[string]int)
- for i, p := range prop.Prop {
- if strings.HasPrefix(p.Name, "XXX_") {
- // Internal fields should not appear in tags/origNames maps.
- // They are handled specially when encoding and decoding.
- continue
- }
- if p.Required {
- reqCount++
- }
- prop.decoderTags.put(p.Tag, i)
- prop.decoderOrigNames[p.OrigName] = i
- }
- prop.reqCount = reqCount
-
- return prop
-}
-
-// A global registry of enum types.
-// The generated code will register the generated maps by calling RegisterEnum.
-
-var enumValueMaps = make(map[string]map[string]int32)
-
-// RegisterEnum is called from the generated code to install the enum descriptor
-// maps into the global table to aid parsing text format protocol buffers.
-func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) {
- if _, ok := enumValueMaps[typeName]; ok {
- panic("proto: duplicate enum registered: " + typeName)
- }
- enumValueMaps[typeName] = valueMap
-}
-
-// EnumValueMap returns the mapping from names to integers of the
-// enum type enumType, or a nil if not found.
-func EnumValueMap(enumType string) map[string]int32 {
- return enumValueMaps[enumType]
-}
-
-// A registry of all linked message types.
-// The string is a fully-qualified proto name ("pkg.Message").
-var (
- protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers
- protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types
- revProtoTypes = make(map[reflect.Type]string)
-)
-
-// RegisterType is called from generated code and maps from the fully qualified
-// proto name to the type (pointer to struct) of the protocol buffer.
-func RegisterType(x Message, name string) {
- if _, ok := protoTypedNils[name]; ok {
- // TODO: Some day, make this a panic.
- log.Printf("proto: duplicate proto type registered: %s", name)
- return
- }
- t := reflect.TypeOf(x)
- if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 {
- // Generated code always calls RegisterType with nil x.
- // This check is just for extra safety.
- protoTypedNils[name] = x
- } else {
- protoTypedNils[name] = reflect.Zero(t).Interface().(Message)
- }
- revProtoTypes[t] = name
-}
-
-// RegisterMapType is called from generated code and maps from the fully qualified
-// proto name to the native map type of the proto map definition.
-func RegisterMapType(x interface{}, name string) {
- if reflect.TypeOf(x).Kind() != reflect.Map {
- panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name))
- }
- if _, ok := protoMapTypes[name]; ok {
- log.Printf("proto: duplicate proto type registered: %s", name)
- return
- }
- t := reflect.TypeOf(x)
- protoMapTypes[name] = t
- revProtoTypes[t] = name
-}
-
-// MessageName returns the fully-qualified proto name for the given message type.
-func MessageName(x Message) string {
- type xname interface {
- XXX_MessageName() string
- }
- if m, ok := x.(xname); ok {
- return m.XXX_MessageName()
- }
- return revProtoTypes[reflect.TypeOf(x)]
-}
-
-// MessageType returns the message type (pointer to struct) for a named message.
-// The type is not guaranteed to implement proto.Message if the name refers to a
-// map entry.
-func MessageType(name string) reflect.Type {
- if t, ok := protoTypedNils[name]; ok {
- return reflect.TypeOf(t)
- }
- return protoMapTypes[name]
-}
-
-// A registry of all linked proto files.
-var (
- protoFiles = make(map[string][]byte) // file name => fileDescriptor
-)
-
-// RegisterFile is called from generated code and maps from the
-// full file name of a .proto file to its compressed FileDescriptorProto.
-func RegisterFile(filename string, fileDescriptor []byte) {
- protoFiles[filename] = fileDescriptor
-}
-
-// FileDescriptor returns the compressed FileDescriptorProto for a .proto file.
-func FileDescriptor(filename string) []byte { return protoFiles[filename] }
diff --git a/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go
deleted file mode 100644
index b1679449..00000000
--- a/vendor/github.com/golang/protobuf/proto/table_marshal.go
+++ /dev/null
@@ -1,2767 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "errors"
- "fmt"
- "math"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "unicode/utf8"
-)
-
-// a sizer takes a pointer to a field and the size of its tag, computes the size of
-// the encoded data.
-type sizer func(pointer, int) int
-
-// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format),
-// marshals the field to the end of the slice, returns the slice and error (if any).
-type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error)
-
-// marshalInfo is the information used for marshaling a message.
-type marshalInfo struct {
- typ reflect.Type
- fields []*marshalFieldInfo
- unrecognized field // offset of XXX_unrecognized
- extensions field // offset of XXX_InternalExtensions
- v1extensions field // offset of XXX_extensions
- sizecache field // offset of XXX_sizecache
- initialized int32 // 0 -- only typ is set, 1 -- fully initialized
- messageset bool // uses message set wire format
- hasmarshaler bool // has custom marshaler
- sync.RWMutex // protect extElems map, also for initialization
- extElems map[int32]*marshalElemInfo // info of extension elements
-}
-
-// marshalFieldInfo is the information used for marshaling a field of a message.
-type marshalFieldInfo struct {
- field field
- wiretag uint64 // tag in wire format
- tagsize int // size of tag in wire format
- sizer sizer
- marshaler marshaler
- isPointer bool
- required bool // field is required
- name string // name of the field, for error reporting
- oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements
-}
-
-// marshalElemInfo is the information used for marshaling an extension or oneof element.
-type marshalElemInfo struct {
- wiretag uint64 // tag in wire format
- tagsize int // size of tag in wire format
- sizer sizer
- marshaler marshaler
- isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only)
-}
-
-var (
- marshalInfoMap = map[reflect.Type]*marshalInfo{}
- marshalInfoLock sync.Mutex
-)
-
-// getMarshalInfo returns the information to marshal a given type of message.
-// The info it returns may not necessarily initialized.
-// t is the type of the message (NOT the pointer to it).
-func getMarshalInfo(t reflect.Type) *marshalInfo {
- marshalInfoLock.Lock()
- u, ok := marshalInfoMap[t]
- if !ok {
- u = &marshalInfo{typ: t}
- marshalInfoMap[t] = u
- }
- marshalInfoLock.Unlock()
- return u
-}
-
-// Size is the entry point from generated code,
-// and should be ONLY called by generated code.
-// It computes the size of encoded data of msg.
-// a is a pointer to a place to store cached marshal info.
-func (a *InternalMessageInfo) Size(msg Message) int {
- u := getMessageMarshalInfo(msg, a)
- ptr := toPointer(&msg)
- if ptr.isNil() {
- // We get here if msg is a typed nil ((*SomeMessage)(nil)),
- // so it satisfies the interface, and msg == nil wouldn't
- // catch it. We don't want crash in this case.
- return 0
- }
- return u.size(ptr)
-}
-
-// Marshal is the entry point from generated code,
-// and should be ONLY called by generated code.
-// It marshals msg to the end of b.
-// a is a pointer to a place to store cached marshal info.
-func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) {
- u := getMessageMarshalInfo(msg, a)
- ptr := toPointer(&msg)
- if ptr.isNil() {
- // We get here if msg is a typed nil ((*SomeMessage)(nil)),
- // so it satisfies the interface, and msg == nil wouldn't
- // catch it. We don't want crash in this case.
- return b, ErrNil
- }
- return u.marshal(b, ptr, deterministic)
-}
-
-func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo {
- // u := a.marshal, but atomically.
- // We use an atomic here to ensure memory consistency.
- u := atomicLoadMarshalInfo(&a.marshal)
- if u == nil {
- // Get marshal information from type of message.
- t := reflect.ValueOf(msg).Type()
- if t.Kind() != reflect.Ptr {
- panic(fmt.Sprintf("cannot handle non-pointer message type %v", t))
- }
- u = getMarshalInfo(t.Elem())
- // Store it in the cache for later users.
- // a.marshal = u, but atomically.
- atomicStoreMarshalInfo(&a.marshal, u)
- }
- return u
-}
-
-// size is the main function to compute the size of the encoded data of a message.
-// ptr is the pointer to the message.
-func (u *marshalInfo) size(ptr pointer) int {
- if atomic.LoadInt32(&u.initialized) == 0 {
- u.computeMarshalInfo()
- }
-
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- if u.hasmarshaler {
- m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
- b, _ := m.Marshal()
- return len(b)
- }
-
- n := 0
- for _, f := range u.fields {
- if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
- // nil pointer always marshals to nothing
- continue
- }
- n += f.sizer(ptr.offset(f.field), f.tagsize)
- }
- if u.extensions.IsValid() {
- e := ptr.offset(u.extensions).toExtensions()
- if u.messageset {
- n += u.sizeMessageSet(e)
- } else {
- n += u.sizeExtensions(e)
- }
- }
- if u.v1extensions.IsValid() {
- m := *ptr.offset(u.v1extensions).toOldExtensions()
- n += u.sizeV1Extensions(m)
- }
- if u.unrecognized.IsValid() {
- s := *ptr.offset(u.unrecognized).toBytes()
- n += len(s)
- }
- // cache the result for use in marshal
- if u.sizecache.IsValid() {
- atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n))
- }
- return n
-}
-
-// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated),
-// fall back to compute the size.
-func (u *marshalInfo) cachedsize(ptr pointer) int {
- if u.sizecache.IsValid() {
- return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32()))
- }
- return u.size(ptr)
-}
-
-// marshal is the main function to marshal a message. It takes a byte slice and appends
-// the encoded data to the end of the slice, returns the slice and error (if any).
-// ptr is the pointer to the message.
-// If deterministic is true, map is marshaled in deterministic order.
-func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) {
- if atomic.LoadInt32(&u.initialized) == 0 {
- u.computeMarshalInfo()
- }
-
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- if u.hasmarshaler {
- m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
- b1, err := m.Marshal()
- b = append(b, b1...)
- return b, err
- }
-
- var err, errLater error
- // The old marshaler encodes extensions at beginning.
- if u.extensions.IsValid() {
- e := ptr.offset(u.extensions).toExtensions()
- if u.messageset {
- b, err = u.appendMessageSet(b, e, deterministic)
- } else {
- b, err = u.appendExtensions(b, e, deterministic)
- }
- if err != nil {
- return b, err
- }
- }
- if u.v1extensions.IsValid() {
- m := *ptr.offset(u.v1extensions).toOldExtensions()
- b, err = u.appendV1Extensions(b, m, deterministic)
- if err != nil {
- return b, err
- }
- }
- for _, f := range u.fields {
- if f.required {
- if ptr.offset(f.field).getPointer().isNil() {
- // Required field is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errLater == nil {
- errLater = &RequiredNotSetError{f.name}
- }
- continue
- }
- }
- if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
- // nil pointer always marshals to nothing
- continue
- }
- b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic)
- if err != nil {
- if err1, ok := err.(*RequiredNotSetError); ok {
- // Required field in submessage is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errLater == nil {
- errLater = &RequiredNotSetError{f.name + "." + err1.field}
- }
- continue
- }
- if err == errRepeatedHasNil {
- err = errors.New("proto: repeated field " + f.name + " has nil element")
- }
- if err == errInvalidUTF8 {
- if errLater == nil {
- fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
- errLater = &invalidUTF8Error{fullName}
- }
- continue
- }
- return b, err
- }
- }
- if u.unrecognized.IsValid() {
- s := *ptr.offset(u.unrecognized).toBytes()
- b = append(b, s...)
- }
- return b, errLater
-}
-
-// computeMarshalInfo initializes the marshal info.
-func (u *marshalInfo) computeMarshalInfo() {
- u.Lock()
- defer u.Unlock()
- if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock
- return
- }
-
- t := u.typ
- u.unrecognized = invalidField
- u.extensions = invalidField
- u.v1extensions = invalidField
- u.sizecache = invalidField
-
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- if reflect.PtrTo(t).Implements(marshalerType) {
- u.hasmarshaler = true
- atomic.StoreInt32(&u.initialized, 1)
- return
- }
-
- // get oneof implementers
- var oneofImplementers []interface{}
- if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
- _, _, _, oneofImplementers = m.XXX_OneofFuncs()
- }
-
- n := t.NumField()
-
- // deal with XXX fields first
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if !strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- switch f.Name {
- case "XXX_sizecache":
- u.sizecache = toField(&f)
- case "XXX_unrecognized":
- u.unrecognized = toField(&f)
- case "XXX_InternalExtensions":
- u.extensions = toField(&f)
- u.messageset = f.Tag.Get("protobuf_messageset") == "1"
- case "XXX_extensions":
- u.v1extensions = toField(&f)
- case "XXX_NoUnkeyedLiteral":
- // nothing to do
- default:
- panic("unknown XXX field: " + f.Name)
- }
- n--
- }
-
- // normal fields
- fields := make([]marshalFieldInfo, n) // batch allocation
- u.fields = make([]*marshalFieldInfo, 0, n)
- for i, j := 0, 0; i < t.NumField(); i++ {
- f := t.Field(i)
-
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- field := &fields[j]
- j++
- field.name = f.Name
- u.fields = append(u.fields, field)
- if f.Tag.Get("protobuf_oneof") != "" {
- field.computeOneofFieldInfo(&f, oneofImplementers)
- continue
- }
- if f.Tag.Get("protobuf") == "" {
- // field has no tag (not in generated message), ignore it
- u.fields = u.fields[:len(u.fields)-1]
- j--
- continue
- }
- field.computeMarshalFieldInfo(&f)
- }
-
- // fields are marshaled in tag order on the wire.
- sort.Sort(byTag(u.fields))
-
- atomic.StoreInt32(&u.initialized, 1)
-}
-
-// helper for sorting fields by tag
-type byTag []*marshalFieldInfo
-
-func (a byTag) Len() int { return len(a) }
-func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag }
-
-// getExtElemInfo returns the information to marshal an extension element.
-// The info it returns is initialized.
-func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo {
- // get from cache first
- u.RLock()
- e, ok := u.extElems[desc.Field]
- u.RUnlock()
- if ok {
- return e
- }
-
- t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct
- tags := strings.Split(desc.Tag, ",")
- tag, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("tag is not an integer")
- }
- wt := wiretype(tags[0])
- sizer, marshaler := typeMarshaler(t, tags, false, false)
- e = &marshalElemInfo{
- wiretag: uint64(tag)<<3 | wt,
- tagsize: SizeVarint(uint64(tag) << 3),
- sizer: sizer,
- marshaler: marshaler,
- isptr: t.Kind() == reflect.Ptr,
- }
-
- // update cache
- u.Lock()
- if u.extElems == nil {
- u.extElems = make(map[int32]*marshalElemInfo)
- }
- u.extElems[desc.Field] = e
- u.Unlock()
- return e
-}
-
-// computeMarshalFieldInfo fills up the information to marshal a field.
-func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) {
- // parse protobuf tag of the field.
- // tag has format of "bytes,49,opt,name=foo,def=hello!"
- tags := strings.Split(f.Tag.Get("protobuf"), ",")
- if tags[0] == "" {
- return
- }
- tag, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("tag is not an integer")
- }
- wt := wiretype(tags[0])
- if tags[2] == "req" {
- fi.required = true
- }
- fi.setTag(f, tag, wt)
- fi.setMarshaler(f, tags)
-}
-
-func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) {
- fi.field = toField(f)
- fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
- fi.isPointer = true
- fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f)
- fi.oneofElems = make(map[reflect.Type]*marshalElemInfo)
-
- ityp := f.Type // interface type
- for _, o := range oneofImplementers {
- t := reflect.TypeOf(o)
- if !t.Implements(ityp) {
- continue
- }
- sf := t.Elem().Field(0) // oneof implementer is a struct with a single field
- tags := strings.Split(sf.Tag.Get("protobuf"), ",")
- tag, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("tag is not an integer")
- }
- wt := wiretype(tags[0])
- sizer, marshaler := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value
- fi.oneofElems[t.Elem()] = &marshalElemInfo{
- wiretag: uint64(tag)<<3 | wt,
- tagsize: SizeVarint(uint64(tag) << 3),
- sizer: sizer,
- marshaler: marshaler,
- }
- }
-}
-
-type oneofMessage interface {
- XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
-}
-
-// wiretype returns the wire encoding of the type.
-func wiretype(encoding string) uint64 {
- switch encoding {
- case "fixed32":
- return WireFixed32
- case "fixed64":
- return WireFixed64
- case "varint", "zigzag32", "zigzag64":
- return WireVarint
- case "bytes":
- return WireBytes
- case "group":
- return WireStartGroup
- }
- panic("unknown wire type " + encoding)
-}
-
-// setTag fills up the tag (in wire format) and its size in the info of a field.
-func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) {
- fi.field = toField(f)
- fi.wiretag = uint64(tag)<<3 | wt
- fi.tagsize = SizeVarint(uint64(tag) << 3)
-}
-
-// setMarshaler fills up the sizer and marshaler in the info of a field.
-func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) {
- switch f.Type.Kind() {
- case reflect.Map:
- // map field
- fi.isPointer = true
- fi.sizer, fi.marshaler = makeMapMarshaler(f)
- return
- case reflect.Ptr, reflect.Slice:
- fi.isPointer = true
- }
- fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false)
-}
-
-// typeMarshaler returns the sizer and marshaler of a given field.
-// t is the type of the field.
-// tags is the generated "protobuf" tag of the field.
-// If nozero is true, zero value is not marshaled to the wire.
-// If oneof is true, it is a oneof field.
-func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) {
- encoding := tags[0]
-
- pointer := false
- slice := false
- if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
- slice = true
- t = t.Elem()
- }
- if t.Kind() == reflect.Ptr {
- pointer = true
- t = t.Elem()
- }
-
- packed := false
- proto3 := false
- validateUTF8 := true
- for i := 2; i < len(tags); i++ {
- if tags[i] == "packed" {
- packed = true
- }
- if tags[i] == "proto3" {
- proto3 = true
- }
- }
- validateUTF8 = validateUTF8 && proto3
-
- switch t.Kind() {
- case reflect.Bool:
- if pointer {
- return sizeBoolPtr, appendBoolPtr
- }
- if slice {
- if packed {
- return sizeBoolPackedSlice, appendBoolPackedSlice
- }
- return sizeBoolSlice, appendBoolSlice
- }
- if nozero {
- return sizeBoolValueNoZero, appendBoolValueNoZero
- }
- return sizeBoolValue, appendBoolValue
- case reflect.Uint32:
- switch encoding {
- case "fixed32":
- if pointer {
- return sizeFixed32Ptr, appendFixed32Ptr
- }
- if slice {
- if packed {
- return sizeFixed32PackedSlice, appendFixed32PackedSlice
- }
- return sizeFixed32Slice, appendFixed32Slice
- }
- if nozero {
- return sizeFixed32ValueNoZero, appendFixed32ValueNoZero
- }
- return sizeFixed32Value, appendFixed32Value
- case "varint":
- if pointer {
- return sizeVarint32Ptr, appendVarint32Ptr
- }
- if slice {
- if packed {
- return sizeVarint32PackedSlice, appendVarint32PackedSlice
- }
- return sizeVarint32Slice, appendVarint32Slice
- }
- if nozero {
- return sizeVarint32ValueNoZero, appendVarint32ValueNoZero
- }
- return sizeVarint32Value, appendVarint32Value
- }
- case reflect.Int32:
- switch encoding {
- case "fixed32":
- if pointer {
- return sizeFixedS32Ptr, appendFixedS32Ptr
- }
- if slice {
- if packed {
- return sizeFixedS32PackedSlice, appendFixedS32PackedSlice
- }
- return sizeFixedS32Slice, appendFixedS32Slice
- }
- if nozero {
- return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero
- }
- return sizeFixedS32Value, appendFixedS32Value
- case "varint":
- if pointer {
- return sizeVarintS32Ptr, appendVarintS32Ptr
- }
- if slice {
- if packed {
- return sizeVarintS32PackedSlice, appendVarintS32PackedSlice
- }
- return sizeVarintS32Slice, appendVarintS32Slice
- }
- if nozero {
- return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero
- }
- return sizeVarintS32Value, appendVarintS32Value
- case "zigzag32":
- if pointer {
- return sizeZigzag32Ptr, appendZigzag32Ptr
- }
- if slice {
- if packed {
- return sizeZigzag32PackedSlice, appendZigzag32PackedSlice
- }
- return sizeZigzag32Slice, appendZigzag32Slice
- }
- if nozero {
- return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero
- }
- return sizeZigzag32Value, appendZigzag32Value
- }
- case reflect.Uint64:
- switch encoding {
- case "fixed64":
- if pointer {
- return sizeFixed64Ptr, appendFixed64Ptr
- }
- if slice {
- if packed {
- return sizeFixed64PackedSlice, appendFixed64PackedSlice
- }
- return sizeFixed64Slice, appendFixed64Slice
- }
- if nozero {
- return sizeFixed64ValueNoZero, appendFixed64ValueNoZero
- }
- return sizeFixed64Value, appendFixed64Value
- case "varint":
- if pointer {
- return sizeVarint64Ptr, appendVarint64Ptr
- }
- if slice {
- if packed {
- return sizeVarint64PackedSlice, appendVarint64PackedSlice
- }
- return sizeVarint64Slice, appendVarint64Slice
- }
- if nozero {
- return sizeVarint64ValueNoZero, appendVarint64ValueNoZero
- }
- return sizeVarint64Value, appendVarint64Value
- }
- case reflect.Int64:
- switch encoding {
- case "fixed64":
- if pointer {
- return sizeFixedS64Ptr, appendFixedS64Ptr
- }
- if slice {
- if packed {
- return sizeFixedS64PackedSlice, appendFixedS64PackedSlice
- }
- return sizeFixedS64Slice, appendFixedS64Slice
- }
- if nozero {
- return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero
- }
- return sizeFixedS64Value, appendFixedS64Value
- case "varint":
- if pointer {
- return sizeVarintS64Ptr, appendVarintS64Ptr
- }
- if slice {
- if packed {
- return sizeVarintS64PackedSlice, appendVarintS64PackedSlice
- }
- return sizeVarintS64Slice, appendVarintS64Slice
- }
- if nozero {
- return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero
- }
- return sizeVarintS64Value, appendVarintS64Value
- case "zigzag64":
- if pointer {
- return sizeZigzag64Ptr, appendZigzag64Ptr
- }
- if slice {
- if packed {
- return sizeZigzag64PackedSlice, appendZigzag64PackedSlice
- }
- return sizeZigzag64Slice, appendZigzag64Slice
- }
- if nozero {
- return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero
- }
- return sizeZigzag64Value, appendZigzag64Value
- }
- case reflect.Float32:
- if pointer {
- return sizeFloat32Ptr, appendFloat32Ptr
- }
- if slice {
- if packed {
- return sizeFloat32PackedSlice, appendFloat32PackedSlice
- }
- return sizeFloat32Slice, appendFloat32Slice
- }
- if nozero {
- return sizeFloat32ValueNoZero, appendFloat32ValueNoZero
- }
- return sizeFloat32Value, appendFloat32Value
- case reflect.Float64:
- if pointer {
- return sizeFloat64Ptr, appendFloat64Ptr
- }
- if slice {
- if packed {
- return sizeFloat64PackedSlice, appendFloat64PackedSlice
- }
- return sizeFloat64Slice, appendFloat64Slice
- }
- if nozero {
- return sizeFloat64ValueNoZero, appendFloat64ValueNoZero
- }
- return sizeFloat64Value, appendFloat64Value
- case reflect.String:
- if validateUTF8 {
- if pointer {
- return sizeStringPtr, appendUTF8StringPtr
- }
- if slice {
- return sizeStringSlice, appendUTF8StringSlice
- }
- if nozero {
- return sizeStringValueNoZero, appendUTF8StringValueNoZero
- }
- return sizeStringValue, appendUTF8StringValue
- }
- if pointer {
- return sizeStringPtr, appendStringPtr
- }
- if slice {
- return sizeStringSlice, appendStringSlice
- }
- if nozero {
- return sizeStringValueNoZero, appendStringValueNoZero
- }
- return sizeStringValue, appendStringValue
- case reflect.Slice:
- if slice {
- return sizeBytesSlice, appendBytesSlice
- }
- if oneof {
- // Oneof bytes field may also have "proto3" tag.
- // We want to marshal it as a oneof field. Do this
- // check before the proto3 check.
- return sizeBytesOneof, appendBytesOneof
- }
- if proto3 {
- return sizeBytes3, appendBytes3
- }
- return sizeBytes, appendBytes
- case reflect.Struct:
- switch encoding {
- case "group":
- if slice {
- return makeGroupSliceMarshaler(getMarshalInfo(t))
- }
- return makeGroupMarshaler(getMarshalInfo(t))
- case "bytes":
- if slice {
- return makeMessageSliceMarshaler(getMarshalInfo(t))
- }
- return makeMessageMarshaler(getMarshalInfo(t))
- }
- }
- panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding))
-}
-
-// Below are functions to size/marshal a specific type of a field.
-// They are stored in the field's info, and called by function pointers.
-// They have type sizer or marshaler.
-
-func sizeFixed32Value(_ pointer, tagsize int) int {
- return 4 + tagsize
-}
-func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint32()
- if v == 0 {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixed32Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixed32Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- return (4 + tagsize) * len(s)
-}
-func sizeFixed32PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return 0
- }
- return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
-}
-func sizeFixedS32Value(_ pointer, tagsize int) int {
- return 4 + tagsize
-}
-func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- if v == 0 {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixedS32Ptr(ptr pointer, tagsize int) int {
- p := ptr.getInt32Ptr()
- if p == nil {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixedS32Slice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- return (4 + tagsize) * len(s)
-}
-func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return 0
- }
- return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
-}
-func sizeFloat32Value(_ pointer, tagsize int) int {
- return 4 + tagsize
-}
-func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int {
- v := math.Float32bits(*ptr.toFloat32())
- if v == 0 {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFloat32Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toFloat32Ptr()
- if p == nil {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFloat32Slice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat32Slice()
- return (4 + tagsize) * len(s)
-}
-func sizeFloat32PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat32Slice()
- if len(s) == 0 {
- return 0
- }
- return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
-}
-func sizeFixed64Value(_ pointer, tagsize int) int {
- return 8 + tagsize
-}
-func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint64()
- if v == 0 {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixed64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixed64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- return (8 + tagsize) * len(s)
-}
-func sizeFixed64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return 0
- }
- return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
-}
-func sizeFixedS64Value(_ pointer, tagsize int) int {
- return 8 + tagsize
-}
-func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- if v == 0 {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixedS64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixedS64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- return (8 + tagsize) * len(s)
-}
-func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return 0
- }
- return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
-}
-func sizeFloat64Value(_ pointer, tagsize int) int {
- return 8 + tagsize
-}
-func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int {
- v := math.Float64bits(*ptr.toFloat64())
- if v == 0 {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFloat64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toFloat64Ptr()
- if p == nil {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFloat64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat64Slice()
- return (8 + tagsize) * len(s)
-}
-func sizeFloat64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat64Slice()
- if len(s) == 0 {
- return 0
- }
- return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
-}
-func sizeVarint32Value(ptr pointer, tagsize int) int {
- v := *ptr.toUint32()
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint32()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarint32Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(uint64(*p)) + tagsize
-}
-func sizeVarint32Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v)) + tagsize
- }
- return n
-}
-func sizeVarint32PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeVarintS32Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS32Ptr(ptr pointer, tagsize int) int {
- p := ptr.getInt32Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(uint64(*p)) + tagsize
-}
-func sizeVarintS32Slice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v)) + tagsize
- }
- return n
-}
-func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeVarint64Value(ptr pointer, tagsize int) int {
- v := *ptr.toUint64()
- return SizeVarint(v) + tagsize
-}
-func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint64()
- if v == 0 {
- return 0
- }
- return SizeVarint(v) + tagsize
-}
-func sizeVarint64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(*p) + tagsize
-}
-func sizeVarint64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(v) + tagsize
- }
- return n
-}
-func sizeVarint64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(v)
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeVarintS64Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(uint64(*p)) + tagsize
-}
-func sizeVarintS64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v)) + tagsize
- }
- return n
-}
-func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeZigzag32Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
-}
-func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
-}
-func sizeZigzag32Ptr(ptr pointer, tagsize int) int {
- p := ptr.getInt32Ptr()
- if p == nil {
- return 0
- }
- v := *p
- return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
-}
-func sizeZigzag32Slice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
- }
- return n
-}
-func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeZigzag64Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
-}
-func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
-}
-func sizeZigzag64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return 0
- }
- v := *p
- return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
-}
-func sizeZigzag64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
- }
- return n
-}
-func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeBoolValue(_ pointer, tagsize int) int {
- return 1 + tagsize
-}
-func sizeBoolValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toBool()
- if !v {
- return 0
- }
- return 1 + tagsize
-}
-func sizeBoolPtr(ptr pointer, tagsize int) int {
- p := *ptr.toBoolPtr()
- if p == nil {
- return 0
- }
- return 1 + tagsize
-}
-func sizeBoolSlice(ptr pointer, tagsize int) int {
- s := *ptr.toBoolSlice()
- return (1 + tagsize) * len(s)
-}
-func sizeBoolPackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toBoolSlice()
- if len(s) == 0 {
- return 0
- }
- return len(s) + SizeVarint(uint64(len(s))) + tagsize
-}
-func sizeStringValue(ptr pointer, tagsize int) int {
- v := *ptr.toString()
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeStringValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toString()
- if v == "" {
- return 0
- }
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeStringPtr(ptr pointer, tagsize int) int {
- p := *ptr.toStringPtr()
- if p == nil {
- return 0
- }
- v := *p
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeStringSlice(ptr pointer, tagsize int) int {
- s := *ptr.toStringSlice()
- n := 0
- for _, v := range s {
- n += len(v) + SizeVarint(uint64(len(v))) + tagsize
- }
- return n
-}
-func sizeBytes(ptr pointer, tagsize int) int {
- v := *ptr.toBytes()
- if v == nil {
- return 0
- }
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeBytes3(ptr pointer, tagsize int) int {
- v := *ptr.toBytes()
- if len(v) == 0 {
- return 0
- }
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeBytesOneof(ptr pointer, tagsize int) int {
- v := *ptr.toBytes()
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeBytesSlice(ptr pointer, tagsize int) int {
- s := *ptr.toBytesSlice()
- n := 0
- for _, v := range s {
- n += len(v) + SizeVarint(uint64(len(v))) + tagsize
- }
- return n
-}
-
-// appendFixed32 appends an encoded fixed32 to b.
-func appendFixed32(b []byte, v uint32) []byte {
- b = append(b,
- byte(v),
- byte(v>>8),
- byte(v>>16),
- byte(v>>24))
- return b
-}
-
-// appendFixed64 appends an encoded fixed64 to b.
-func appendFixed64(b []byte, v uint64) []byte {
- b = append(b,
- byte(v),
- byte(v>>8),
- byte(v>>16),
- byte(v>>24),
- byte(v>>32),
- byte(v>>40),
- byte(v>>48),
- byte(v>>56))
- return b
-}
-
-// appendVarint appends an encoded varint to b.
-func appendVarint(b []byte, v uint64) []byte {
- // TODO: make 1-byte (maybe 2-byte) case inline-able, once we
- // have non-leaf inliner.
- switch {
- case v < 1<<7:
- b = append(b, byte(v))
- case v < 1<<14:
- b = append(b,
- byte(v&0x7f|0x80),
- byte(v>>7))
- case v < 1<<21:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte(v>>14))
- case v < 1<<28:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte(v>>21))
- case v < 1<<35:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte(v>>28))
- case v < 1<<42:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte(v>>35))
- case v < 1<<49:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte(v>>42))
- case v < 1<<56:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte((v>>42)&0x7f|0x80),
- byte(v>>49))
- case v < 1<<63:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte((v>>42)&0x7f|0x80),
- byte((v>>49)&0x7f|0x80),
- byte(v>>56))
- default:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte((v>>42)&0x7f|0x80),
- byte((v>>49)&0x7f|0x80),
- byte((v>>56)&0x7f|0x80),
- 1)
- }
- return b
-}
-
-func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, *p)
- return b, nil
-}
-func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- }
- return b, nil
-}
-func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(4*len(s)))
- for _, v := range s {
- b = appendFixed32(b, v)
- }
- return b, nil
-}
-func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(v))
- return b, nil
-}
-func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(v))
- return b, nil
-}
-func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := ptr.getInt32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(*p))
- return b, nil
-}
-func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(v))
- }
- return b, nil
-}
-func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(4*len(s)))
- for _, v := range s {
- b = appendFixed32(b, uint32(v))
- }
- return b, nil
-}
-func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float32bits(*ptr.toFloat32())
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float32bits(*ptr.toFloat32())
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toFloat32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, math.Float32bits(*p))
- return b, nil
-}
-func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, math.Float32bits(v))
- }
- return b, nil
-}
-func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(4*len(s)))
- for _, v := range s {
- b = appendFixed32(b, math.Float32bits(v))
- }
- return b, nil
-}
-func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, *p)
- return b, nil
-}
-func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- }
- return b, nil
-}
-func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(8*len(s)))
- for _, v := range s {
- b = appendFixed64(b, v)
- }
- return b, nil
-}
-func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(v))
- return b, nil
-}
-func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(v))
- return b, nil
-}
-func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(*p))
- return b, nil
-}
-func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(v))
- }
- return b, nil
-}
-func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(8*len(s)))
- for _, v := range s {
- b = appendFixed64(b, uint64(v))
- }
- return b, nil
-}
-func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float64bits(*ptr.toFloat64())
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float64bits(*ptr.toFloat64())
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toFloat64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, math.Float64bits(*p))
- return b, nil
-}
-func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, math.Float64bits(v))
- }
- return b, nil
-}
-func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(8*len(s)))
- for _, v := range s {
- b = appendFixed64(b, math.Float64bits(v))
- }
- return b, nil
-}
-func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(*p))
- return b, nil
-}
-func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := ptr.getInt32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(*p))
- return b, nil
-}
-func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, v)
- return b, nil
-}
-func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, v)
- return b, nil
-}
-func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, *p)
- return b, nil
-}
-func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, v)
- }
- return b, nil
-}
-func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(v)
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, v)
- }
- return b, nil
-}
-func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(*p))
- return b, nil
-}
-func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- return b, nil
-}
-func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- return b, nil
-}
-func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := ptr.getInt32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- v := *p
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- return b, nil
-}
-func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- }
- return b, nil
-}
-func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- }
- return b, nil
-}
-func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- return b, nil
-}
-func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- return b, nil
-}
-func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- v := *p
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- return b, nil
-}
-func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- }
- return b, nil
-}
-func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- }
- return b, nil
-}
-func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBool()
- b = appendVarint(b, wiretag)
- if v {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- return b, nil
-}
-func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBool()
- if !v {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = append(b, 1)
- return b, nil
-}
-
-func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toBoolPtr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- if *p {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- return b, nil
-}
-func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toBoolSlice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- if v {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- }
- return b, nil
-}
-func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toBoolSlice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(len(s)))
- for _, v := range s {
- if v {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- }
- return b, nil
-}
-func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toString()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toString()
- if v == "" {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toStringPtr()
- if p == nil {
- return b, nil
- }
- v := *p
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toStringSlice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- }
- return b, nil
-}
-func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- var invalidUTF8 bool
- v := *ptr.toString()
- if !utf8.ValidString(v) {
- invalidUTF8 = true
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- if invalidUTF8 {
- return b, errInvalidUTF8
- }
- return b, nil
-}
-func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- var invalidUTF8 bool
- v := *ptr.toString()
- if v == "" {
- return b, nil
- }
- if !utf8.ValidString(v) {
- invalidUTF8 = true
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- if invalidUTF8 {
- return b, errInvalidUTF8
- }
- return b, nil
-}
-func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- var invalidUTF8 bool
- p := *ptr.toStringPtr()
- if p == nil {
- return b, nil
- }
- v := *p
- if !utf8.ValidString(v) {
- invalidUTF8 = true
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- if invalidUTF8 {
- return b, errInvalidUTF8
- }
- return b, nil
-}
-func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- var invalidUTF8 bool
- s := *ptr.toStringSlice()
- for _, v := range s {
- if !utf8.ValidString(v) {
- invalidUTF8 = true
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- }
- if invalidUTF8 {
- return b, errInvalidUTF8
- }
- return b, nil
-}
-func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBytes()
- if v == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBytes()
- if len(v) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBytes()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toBytesSlice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- }
- return b, nil
-}
-
-// makeGroupMarshaler returns the sizer and marshaler for a group.
-// u is the marshal info of the underlying message.
-func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- p := ptr.getPointer()
- if p.isNil() {
- return 0
- }
- return u.size(p) + 2*tagsize
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- p := ptr.getPointer()
- if p.isNil() {
- return b, nil
- }
- var err error
- b = appendVarint(b, wiretag) // start group
- b, err = u.marshal(b, p, deterministic)
- b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
- return b, err
- }
-}
-
-// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice.
-// u is the marshal info of the underlying message.
-func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- s := ptr.getPointerSlice()
- n := 0
- for _, v := range s {
- if v.isNil() {
- continue
- }
- n += u.size(v) + 2*tagsize
- }
- return n
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- s := ptr.getPointerSlice()
- var err error
- var nerr nonFatal
- for _, v := range s {
- if v.isNil() {
- return b, errRepeatedHasNil
- }
- b = appendVarint(b, wiretag) // start group
- b, err = u.marshal(b, v, deterministic)
- b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
- if !nerr.Merge(err) {
- if err == ErrNil {
- err = errRepeatedHasNil
- }
- return b, err
- }
- }
- return b, nerr.E
- }
-}
-
-// makeMessageMarshaler returns the sizer and marshaler for a message field.
-// u is the marshal info of the message.
-func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- p := ptr.getPointer()
- if p.isNil() {
- return 0
- }
- siz := u.size(p)
- return siz + SizeVarint(uint64(siz)) + tagsize
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- p := ptr.getPointer()
- if p.isNil() {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- siz := u.cachedsize(p)
- b = appendVarint(b, uint64(siz))
- return u.marshal(b, p, deterministic)
- }
-}
-
-// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice.
-// u is the marshal info of the message.
-func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- s := ptr.getPointerSlice()
- n := 0
- for _, v := range s {
- if v.isNil() {
- continue
- }
- siz := u.size(v)
- n += siz + SizeVarint(uint64(siz)) + tagsize
- }
- return n
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- s := ptr.getPointerSlice()
- var err error
- var nerr nonFatal
- for _, v := range s {
- if v.isNil() {
- return b, errRepeatedHasNil
- }
- b = appendVarint(b, wiretag)
- siz := u.cachedsize(v)
- b = appendVarint(b, uint64(siz))
- b, err = u.marshal(b, v, deterministic)
-
- if !nerr.Merge(err) {
- if err == ErrNil {
- err = errRepeatedHasNil
- }
- return b, err
- }
- }
- return b, nerr.E
- }
-}
-
-// makeMapMarshaler returns the sizer and marshaler for a map field.
-// f is the pointer to the reflect data structure of the field.
-func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
- // figure out key and value type
- t := f.Type
- keyType := t.Key()
- valType := t.Elem()
- keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",")
- valTags := strings.Split(f.Tag.Get("protobuf_val"), ",")
- keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map
- valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map
- keyWireTag := 1<<3 | wiretype(keyTags[0])
- valWireTag := 2<<3 | wiretype(valTags[0])
-
- // We create an interface to get the addresses of the map key and value.
- // If value is pointer-typed, the interface is a direct interface, the
- // idata itself is the value. Otherwise, the idata is the pointer to the
- // value.
- // Key cannot be pointer-typed.
- valIsPtr := valType.Kind() == reflect.Ptr
-
- // If value is a message with nested maps, calling
- // valSizer in marshal may be quadratic. We should use
- // cached version in marshal (but not in size).
- // If value is not message type, we don't have size cache,
- // but it cannot be nested either. Just use valSizer.
- valCachedSizer := valSizer
- if valIsPtr && valType.Elem().Kind() == reflect.Struct {
- u := getMarshalInfo(valType.Elem())
- valCachedSizer = func(ptr pointer, tagsize int) int {
- // Same as message sizer, but use cache.
- p := ptr.getPointer()
- if p.isNil() {
- return 0
- }
- siz := u.cachedsize(p)
- return siz + SizeVarint(uint64(siz)) + tagsize
- }
- }
- return func(ptr pointer, tagsize int) int {
- m := ptr.asPointerTo(t).Elem() // the map
- n := 0
- for _, k := range m.MapKeys() {
- ki := k.Interface()
- vi := m.MapIndex(k).Interface()
- kaddr := toAddrPointer(&ki, false) // pointer to key
- vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
- siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
- n += siz + SizeVarint(uint64(siz)) + tagsize
- }
- return n
- },
- func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) {
- m := ptr.asPointerTo(t).Elem() // the map
- var err error
- keys := m.MapKeys()
- if len(keys) > 1 && deterministic {
- sort.Sort(mapKeys(keys))
- }
-
- var nerr nonFatal
- for _, k := range keys {
- ki := k.Interface()
- vi := m.MapIndex(k).Interface()
- kaddr := toAddrPointer(&ki, false) // pointer to key
- vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
- b = appendVarint(b, tag)
- siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
- b = appendVarint(b, uint64(siz))
- b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
- if !nerr.Merge(err) {
- return b, err
- }
- b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
- if err != ErrNil && !nerr.Merge(err) { // allow nil value in map
- return b, err
- }
- }
- return b, nerr.E
- }
-}
-
-// makeOneOfMarshaler returns the sizer and marshaler for a oneof field.
-// fi is the marshal info of the field.
-// f is the pointer to the reflect data structure of the field.
-func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) {
- // Oneof field is an interface. We need to get the actual data type on the fly.
- t := f.Type
- return func(ptr pointer, _ int) int {
- p := ptr.getInterfacePointer()
- if p.isNil() {
- return 0
- }
- v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
- telem := v.Type()
- e := fi.oneofElems[telem]
- return e.sizer(p, e.tagsize)
- },
- func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) {
- p := ptr.getInterfacePointer()
- if p.isNil() {
- return b, nil
- }
- v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
- telem := v.Type()
- if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() {
- return b, errOneofHasNil
- }
- e := fi.oneofElems[telem]
- return e.marshaler(b, p, e.wiretag, deterministic)
- }
-}
-
-// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field.
-func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int {
- m, mu := ext.extensionsRead()
- if m == nil {
- return 0
- }
- mu.Lock()
-
- n := 0
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- n += len(e.enc)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- n += ei.sizer(p, ei.tagsize)
- }
- mu.Unlock()
- return n
-}
-
-// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b.
-func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
- m, mu := ext.extensionsRead()
- if m == nil {
- return b, nil
- }
- mu.Lock()
- defer mu.Unlock()
-
- var err error
- var nerr nonFatal
-
- // Fast-path for common cases: zero or one extensions.
- // Don't bother sorting the keys.
- if len(m) <= 1 {
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- b = append(b, e.enc...)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if !nerr.Merge(err) {
- return b, err
- }
- }
- return b, nerr.E
- }
-
- // Sort the keys to provide a deterministic encoding.
- // Not sure this is required, but the old code does it.
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- for _, k := range keys {
- e := m[int32(k)]
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- b = append(b, e.enc...)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if !nerr.Merge(err) {
- return b, err
- }
- }
- return b, nerr.E
-}
-
-// message set format is:
-// message MessageSet {
-// repeated group Item = 1 {
-// required int32 type_id = 2;
-// required string message = 3;
-// };
-// }
-
-// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field
-// in message set format (above).
-func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int {
- m, mu := ext.extensionsRead()
- if m == nil {
- return 0
- }
- mu.Lock()
-
- n := 0
- for id, e := range m {
- n += 2 // start group, end group. tag = 1 (size=1)
- n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1)
-
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
- siz := len(msgWithLen)
- n += siz + 1 // message, tag = 3 (size=1)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- n += ei.sizer(p, 1) // message, tag = 3 (size=1)
- }
- mu.Unlock()
- return n
-}
-
-// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above)
-// to the end of byte slice b.
-func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
- m, mu := ext.extensionsRead()
- if m == nil {
- return b, nil
- }
- mu.Lock()
- defer mu.Unlock()
-
- var err error
- var nerr nonFatal
-
- // Fast-path for common cases: zero or one extensions.
- // Don't bother sorting the keys.
- if len(m) <= 1 {
- for id, e := range m {
- b = append(b, 1<<3|WireStartGroup)
- b = append(b, 2<<3|WireVarint)
- b = appendVarint(b, uint64(id))
-
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
- b = append(b, 3<<3|WireBytes)
- b = append(b, msgWithLen...)
- b = append(b, 1<<3|WireEndGroup)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
- if !nerr.Merge(err) {
- return b, err
- }
- b = append(b, 1<<3|WireEndGroup)
- }
- return b, nerr.E
- }
-
- // Sort the keys to provide a deterministic encoding.
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- for _, id := range keys {
- e := m[int32(id)]
- b = append(b, 1<<3|WireStartGroup)
- b = append(b, 2<<3|WireVarint)
- b = appendVarint(b, uint64(id))
-
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
- b = append(b, 3<<3|WireBytes)
- b = append(b, msgWithLen...)
- b = append(b, 1<<3|WireEndGroup)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
- b = append(b, 1<<3|WireEndGroup)
- if !nerr.Merge(err) {
- return b, err
- }
- }
- return b, nerr.E
-}
-
-// sizeV1Extensions computes the size of encoded data for a V1-API extension field.
-func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int {
- if m == nil {
- return 0
- }
-
- n := 0
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- n += len(e.enc)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- n += ei.sizer(p, ei.tagsize)
- }
- return n
-}
-
-// appendV1Extensions marshals a V1-API extension field to the end of byte slice b.
-func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) {
- if m == nil {
- return b, nil
- }
-
- // Sort the keys to provide a deterministic encoding.
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- var err error
- var nerr nonFatal
- for _, k := range keys {
- e := m[int32(k)]
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- b = append(b, e.enc...)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if !nerr.Merge(err) {
- return b, err
- }
- }
- return b, nerr.E
-}
-
-// newMarshaler is the interface representing objects that can marshal themselves.
-//
-// This exists to support protoc-gen-go generated messages.
-// The proto package will stop type-asserting to this interface in the future.
-//
-// DO NOT DEPEND ON THIS.
-type newMarshaler interface {
- XXX_Size() int
- XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
-}
-
-// Size returns the encoded size of a protocol buffer message.
-// This is the main entry point.
-func Size(pb Message) int {
- if m, ok := pb.(newMarshaler); ok {
- return m.XXX_Size()
- }
- if m, ok := pb.(Marshaler); ok {
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- b, _ := m.Marshal()
- return len(b)
- }
- // in case somehow we didn't generate the wrapper
- if pb == nil {
- return 0
- }
- var info InternalMessageInfo
- return info.Size(pb)
-}
-
-// Marshal takes a protocol buffer message
-// and encodes it into the wire format, returning the data.
-// This is the main entry point.
-func Marshal(pb Message) ([]byte, error) {
- if m, ok := pb.(newMarshaler); ok {
- siz := m.XXX_Size()
- b := make([]byte, 0, siz)
- return m.XXX_Marshal(b, false)
- }
- if m, ok := pb.(Marshaler); ok {
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- return m.Marshal()
- }
- // in case somehow we didn't generate the wrapper
- if pb == nil {
- return nil, ErrNil
- }
- var info InternalMessageInfo
- siz := info.Size(pb)
- b := make([]byte, 0, siz)
- return info.Marshal(b, pb, false)
-}
-
-// Marshal takes a protocol buffer message
-// and encodes it into the wire format, writing the result to the
-// Buffer.
-// This is an alternative entry point. It is not necessary to use
-// a Buffer for most applications.
-func (p *Buffer) Marshal(pb Message) error {
- var err error
- if m, ok := pb.(newMarshaler); ok {
- siz := m.XXX_Size()
- p.grow(siz) // make sure buf has enough capacity
- p.buf, err = m.XXX_Marshal(p.buf, p.deterministic)
- return err
- }
- if m, ok := pb.(Marshaler); ok {
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- b, err := m.Marshal()
- p.buf = append(p.buf, b...)
- return err
- }
- // in case somehow we didn't generate the wrapper
- if pb == nil {
- return ErrNil
- }
- var info InternalMessageInfo
- siz := info.Size(pb)
- p.grow(siz) // make sure buf has enough capacity
- p.buf, err = info.Marshal(p.buf, pb, p.deterministic)
- return err
-}
-
-// grow grows the buffer's capacity, if necessary, to guarantee space for
-// another n bytes. After grow(n), at least n bytes can be written to the
-// buffer without another allocation.
-func (p *Buffer) grow(n int) {
- need := len(p.buf) + n
- if need <= cap(p.buf) {
- return
- }
- newCap := len(p.buf) * 2
- if newCap < need {
- newCap = need
- }
- p.buf = append(make([]byte, 0, newCap), p.buf...)
-}
diff --git a/vendor/github.com/golang/protobuf/proto/table_merge.go b/vendor/github.com/golang/protobuf/proto/table_merge.go
deleted file mode 100644
index 5525def6..00000000
--- a/vendor/github.com/golang/protobuf/proto/table_merge.go
+++ /dev/null
@@ -1,654 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "fmt"
- "reflect"
- "strings"
- "sync"
- "sync/atomic"
-)
-
-// Merge merges the src message into dst.
-// This assumes that dst and src of the same type and are non-nil.
-func (a *InternalMessageInfo) Merge(dst, src Message) {
- mi := atomicLoadMergeInfo(&a.merge)
- if mi == nil {
- mi = getMergeInfo(reflect.TypeOf(dst).Elem())
- atomicStoreMergeInfo(&a.merge, mi)
- }
- mi.merge(toPointer(&dst), toPointer(&src))
-}
-
-type mergeInfo struct {
- typ reflect.Type
-
- initialized int32 // 0: only typ is valid, 1: everything is valid
- lock sync.Mutex
-
- fields []mergeFieldInfo
- unrecognized field // Offset of XXX_unrecognized
-}
-
-type mergeFieldInfo struct {
- field field // Offset of field, guaranteed to be valid
-
- // isPointer reports whether the value in the field is a pointer.
- // This is true for the following situations:
- // * Pointer to struct
- // * Pointer to basic type (proto2 only)
- // * Slice (first value in slice header is a pointer)
- // * String (first value in string header is a pointer)
- isPointer bool
-
- // basicWidth reports the width of the field assuming that it is directly
- // embedded in the struct (as is the case for basic types in proto3).
- // The possible values are:
- // 0: invalid
- // 1: bool
- // 4: int32, uint32, float32
- // 8: int64, uint64, float64
- basicWidth int
-
- // Where dst and src are pointers to the types being merged.
- merge func(dst, src pointer)
-}
-
-var (
- mergeInfoMap = map[reflect.Type]*mergeInfo{}
- mergeInfoLock sync.Mutex
-)
-
-func getMergeInfo(t reflect.Type) *mergeInfo {
- mergeInfoLock.Lock()
- defer mergeInfoLock.Unlock()
- mi := mergeInfoMap[t]
- if mi == nil {
- mi = &mergeInfo{typ: t}
- mergeInfoMap[t] = mi
- }
- return mi
-}
-
-// merge merges src into dst assuming they are both of type *mi.typ.
-func (mi *mergeInfo) merge(dst, src pointer) {
- if dst.isNil() {
- panic("proto: nil destination")
- }
- if src.isNil() {
- return // Nothing to do.
- }
-
- if atomic.LoadInt32(&mi.initialized) == 0 {
- mi.computeMergeInfo()
- }
-
- for _, fi := range mi.fields {
- sfp := src.offset(fi.field)
-
- // As an optimization, we can avoid the merge function call cost
- // if we know for sure that the source will have no effect
- // by checking if it is the zero value.
- if unsafeAllowed {
- if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string
- continue
- }
- if fi.basicWidth > 0 {
- switch {
- case fi.basicWidth == 1 && !*sfp.toBool():
- continue
- case fi.basicWidth == 4 && *sfp.toUint32() == 0:
- continue
- case fi.basicWidth == 8 && *sfp.toUint64() == 0:
- continue
- }
- }
- }
-
- dfp := dst.offset(fi.field)
- fi.merge(dfp, sfp)
- }
-
- // TODO: Make this faster?
- out := dst.asPointerTo(mi.typ).Elem()
- in := src.asPointerTo(mi.typ).Elem()
- if emIn, err := extendable(in.Addr().Interface()); err == nil {
- emOut, _ := extendable(out.Addr().Interface())
- mIn, muIn := emIn.extensionsRead()
- if mIn != nil {
- mOut := emOut.extensionsWrite()
- muIn.Lock()
- mergeExtension(mOut, mIn)
- muIn.Unlock()
- }
- }
-
- if mi.unrecognized.IsValid() {
- if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 {
- *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...)
- }
- }
-}
-
-func (mi *mergeInfo) computeMergeInfo() {
- mi.lock.Lock()
- defer mi.lock.Unlock()
- if mi.initialized != 0 {
- return
- }
- t := mi.typ
- n := t.NumField()
-
- props := GetProperties(t)
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
-
- mfi := mergeFieldInfo{field: toField(&f)}
- tf := f.Type
-
- // As an optimization, we can avoid the merge function call cost
- // if we know for sure that the source will have no effect
- // by checking if it is the zero value.
- if unsafeAllowed {
- switch tf.Kind() {
- case reflect.Ptr, reflect.Slice, reflect.String:
- // As a special case, we assume slices and strings are pointers
- // since we know that the first field in the SliceSlice or
- // StringHeader is a data pointer.
- mfi.isPointer = true
- case reflect.Bool:
- mfi.basicWidth = 1
- case reflect.Int32, reflect.Uint32, reflect.Float32:
- mfi.basicWidth = 4
- case reflect.Int64, reflect.Uint64, reflect.Float64:
- mfi.basicWidth = 8
- }
- }
-
- // Unwrap tf to get at its most basic type.
- var isPointer, isSlice bool
- if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
- isSlice = true
- tf = tf.Elem()
- }
- if tf.Kind() == reflect.Ptr {
- isPointer = true
- tf = tf.Elem()
- }
- if isPointer && isSlice && tf.Kind() != reflect.Struct {
- panic("both pointer and slice for basic type in " + tf.Name())
- }
-
- switch tf.Kind() {
- case reflect.Int32:
- switch {
- case isSlice: // E.g., []int32
- mfi.merge = func(dst, src pointer) {
- // NOTE: toInt32Slice is not defined (see pointer_reflect.go).
- /*
- sfsp := src.toInt32Slice()
- if *sfsp != nil {
- dfsp := dst.toInt32Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []int64{}
- }
- }
- */
- sfs := src.getInt32Slice()
- if sfs != nil {
- dfs := dst.getInt32Slice()
- dfs = append(dfs, sfs...)
- if dfs == nil {
- dfs = []int32{}
- }
- dst.setInt32Slice(dfs)
- }
- }
- case isPointer: // E.g., *int32
- mfi.merge = func(dst, src pointer) {
- // NOTE: toInt32Ptr is not defined (see pointer_reflect.go).
- /*
- sfpp := src.toInt32Ptr()
- if *sfpp != nil {
- dfpp := dst.toInt32Ptr()
- if *dfpp == nil {
- *dfpp = Int32(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- */
- sfp := src.getInt32Ptr()
- if sfp != nil {
- dfp := dst.getInt32Ptr()
- if dfp == nil {
- dst.setInt32Ptr(*sfp)
- } else {
- *dfp = *sfp
- }
- }
- }
- default: // E.g., int32
- mfi.merge = func(dst, src pointer) {
- if v := *src.toInt32(); v != 0 {
- *dst.toInt32() = v
- }
- }
- }
- case reflect.Int64:
- switch {
- case isSlice: // E.g., []int64
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toInt64Slice()
- if *sfsp != nil {
- dfsp := dst.toInt64Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []int64{}
- }
- }
- }
- case isPointer: // E.g., *int64
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toInt64Ptr()
- if *sfpp != nil {
- dfpp := dst.toInt64Ptr()
- if *dfpp == nil {
- *dfpp = Int64(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., int64
- mfi.merge = func(dst, src pointer) {
- if v := *src.toInt64(); v != 0 {
- *dst.toInt64() = v
- }
- }
- }
- case reflect.Uint32:
- switch {
- case isSlice: // E.g., []uint32
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toUint32Slice()
- if *sfsp != nil {
- dfsp := dst.toUint32Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []uint32{}
- }
- }
- }
- case isPointer: // E.g., *uint32
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toUint32Ptr()
- if *sfpp != nil {
- dfpp := dst.toUint32Ptr()
- if *dfpp == nil {
- *dfpp = Uint32(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., uint32
- mfi.merge = func(dst, src pointer) {
- if v := *src.toUint32(); v != 0 {
- *dst.toUint32() = v
- }
- }
- }
- case reflect.Uint64:
- switch {
- case isSlice: // E.g., []uint64
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toUint64Slice()
- if *sfsp != nil {
- dfsp := dst.toUint64Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []uint64{}
- }
- }
- }
- case isPointer: // E.g., *uint64
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toUint64Ptr()
- if *sfpp != nil {
- dfpp := dst.toUint64Ptr()
- if *dfpp == nil {
- *dfpp = Uint64(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., uint64
- mfi.merge = func(dst, src pointer) {
- if v := *src.toUint64(); v != 0 {
- *dst.toUint64() = v
- }
- }
- }
- case reflect.Float32:
- switch {
- case isSlice: // E.g., []float32
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toFloat32Slice()
- if *sfsp != nil {
- dfsp := dst.toFloat32Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []float32{}
- }
- }
- }
- case isPointer: // E.g., *float32
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toFloat32Ptr()
- if *sfpp != nil {
- dfpp := dst.toFloat32Ptr()
- if *dfpp == nil {
- *dfpp = Float32(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., float32
- mfi.merge = func(dst, src pointer) {
- if v := *src.toFloat32(); v != 0 {
- *dst.toFloat32() = v
- }
- }
- }
- case reflect.Float64:
- switch {
- case isSlice: // E.g., []float64
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toFloat64Slice()
- if *sfsp != nil {
- dfsp := dst.toFloat64Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []float64{}
- }
- }
- }
- case isPointer: // E.g., *float64
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toFloat64Ptr()
- if *sfpp != nil {
- dfpp := dst.toFloat64Ptr()
- if *dfpp == nil {
- *dfpp = Float64(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., float64
- mfi.merge = func(dst, src pointer) {
- if v := *src.toFloat64(); v != 0 {
- *dst.toFloat64() = v
- }
- }
- }
- case reflect.Bool:
- switch {
- case isSlice: // E.g., []bool
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toBoolSlice()
- if *sfsp != nil {
- dfsp := dst.toBoolSlice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []bool{}
- }
- }
- }
- case isPointer: // E.g., *bool
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toBoolPtr()
- if *sfpp != nil {
- dfpp := dst.toBoolPtr()
- if *dfpp == nil {
- *dfpp = Bool(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., bool
- mfi.merge = func(dst, src pointer) {
- if v := *src.toBool(); v {
- *dst.toBool() = v
- }
- }
- }
- case reflect.String:
- switch {
- case isSlice: // E.g., []string
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toStringSlice()
- if *sfsp != nil {
- dfsp := dst.toStringSlice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []string{}
- }
- }
- }
- case isPointer: // E.g., *string
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toStringPtr()
- if *sfpp != nil {
- dfpp := dst.toStringPtr()
- if *dfpp == nil {
- *dfpp = String(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., string
- mfi.merge = func(dst, src pointer) {
- if v := *src.toString(); v != "" {
- *dst.toString() = v
- }
- }
- }
- case reflect.Slice:
- isProto3 := props.Prop[i].proto3
- switch {
- case isPointer:
- panic("bad pointer in byte slice case in " + tf.Name())
- case tf.Elem().Kind() != reflect.Uint8:
- panic("bad element kind in byte slice case in " + tf.Name())
- case isSlice: // E.g., [][]byte
- mfi.merge = func(dst, src pointer) {
- sbsp := src.toBytesSlice()
- if *sbsp != nil {
- dbsp := dst.toBytesSlice()
- for _, sb := range *sbsp {
- if sb == nil {
- *dbsp = append(*dbsp, nil)
- } else {
- *dbsp = append(*dbsp, append([]byte{}, sb...))
- }
- }
- if *dbsp == nil {
- *dbsp = [][]byte{}
- }
- }
- }
- default: // E.g., []byte
- mfi.merge = func(dst, src pointer) {
- sbp := src.toBytes()
- if *sbp != nil {
- dbp := dst.toBytes()
- if !isProto3 || len(*sbp) > 0 {
- *dbp = append([]byte{}, *sbp...)
- }
- }
- }
- }
- case reflect.Struct:
- switch {
- case !isPointer:
- panic(fmt.Sprintf("message field %s without pointer", tf))
- case isSlice: // E.g., []*pb.T
- mi := getMergeInfo(tf)
- mfi.merge = func(dst, src pointer) {
- sps := src.getPointerSlice()
- if sps != nil {
- dps := dst.getPointerSlice()
- for _, sp := range sps {
- var dp pointer
- if !sp.isNil() {
- dp = valToPointer(reflect.New(tf))
- mi.merge(dp, sp)
- }
- dps = append(dps, dp)
- }
- if dps == nil {
- dps = []pointer{}
- }
- dst.setPointerSlice(dps)
- }
- }
- default: // E.g., *pb.T
- mi := getMergeInfo(tf)
- mfi.merge = func(dst, src pointer) {
- sp := src.getPointer()
- if !sp.isNil() {
- dp := dst.getPointer()
- if dp.isNil() {
- dp = valToPointer(reflect.New(tf))
- dst.setPointer(dp)
- }
- mi.merge(dp, sp)
- }
- }
- }
- case reflect.Map:
- switch {
- case isPointer || isSlice:
- panic("bad pointer or slice in map case in " + tf.Name())
- default: // E.g., map[K]V
- mfi.merge = func(dst, src pointer) {
- sm := src.asPointerTo(tf).Elem()
- if sm.Len() == 0 {
- return
- }
- dm := dst.asPointerTo(tf).Elem()
- if dm.IsNil() {
- dm.Set(reflect.MakeMap(tf))
- }
-
- switch tf.Elem().Kind() {
- case reflect.Ptr: // Proto struct (e.g., *T)
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- val = reflect.ValueOf(Clone(val.Interface().(Message)))
- dm.SetMapIndex(key, val)
- }
- case reflect.Slice: // E.g. Bytes type (e.g., []byte)
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
- dm.SetMapIndex(key, val)
- }
- default: // Basic type (e.g., string)
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- dm.SetMapIndex(key, val)
- }
- }
- }
- }
- case reflect.Interface:
- // Must be oneof field.
- switch {
- case isPointer || isSlice:
- panic("bad pointer or slice in interface case in " + tf.Name())
- default: // E.g., interface{}
- // TODO: Make this faster?
- mfi.merge = func(dst, src pointer) {
- su := src.asPointerTo(tf).Elem()
- if !su.IsNil() {
- du := dst.asPointerTo(tf).Elem()
- typ := su.Elem().Type()
- if du.IsNil() || du.Elem().Type() != typ {
- du.Set(reflect.New(typ.Elem())) // Initialize interface if empty
- }
- sv := su.Elem().Elem().Field(0)
- if sv.Kind() == reflect.Ptr && sv.IsNil() {
- return
- }
- dv := du.Elem().Elem().Field(0)
- if dv.Kind() == reflect.Ptr && dv.IsNil() {
- dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty
- }
- switch sv.Type().Kind() {
- case reflect.Ptr: // Proto struct (e.g., *T)
- Merge(dv.Interface().(Message), sv.Interface().(Message))
- case reflect.Slice: // E.g. Bytes type (e.g., []byte)
- dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...)))
- default: // Basic type (e.g., string)
- dv.Set(sv)
- }
- }
- }
- }
- default:
- panic(fmt.Sprintf("merger not found for type:%s", tf))
- }
- mi.fields = append(mi.fields, mfi)
- }
-
- mi.unrecognized = invalidField
- if f, ok := t.FieldByName("XXX_unrecognized"); ok {
- if f.Type != reflect.TypeOf([]byte{}) {
- panic("expected XXX_unrecognized to be of type []byte")
- }
- mi.unrecognized = toField(&f)
- }
-
- atomic.StoreInt32(&mi.initialized, 1)
-}
diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
deleted file mode 100644
index ebf1caa5..00000000
--- a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
+++ /dev/null
@@ -1,2051 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "errors"
- "fmt"
- "io"
- "math"
- "reflect"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "unicode/utf8"
-)
-
-// Unmarshal is the entry point from the generated .pb.go files.
-// This function is not intended to be used by non-generated code.
-// This function is not subject to any compatibility guarantee.
-// msg contains a pointer to a protocol buffer struct.
-// b is the data to be unmarshaled into the protocol buffer.
-// a is a pointer to a place to store cached unmarshal information.
-func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error {
- // Load the unmarshal information for this message type.
- // The atomic load ensures memory consistency.
- u := atomicLoadUnmarshalInfo(&a.unmarshal)
- if u == nil {
- // Slow path: find unmarshal info for msg, update a with it.
- u = getUnmarshalInfo(reflect.TypeOf(msg).Elem())
- atomicStoreUnmarshalInfo(&a.unmarshal, u)
- }
- // Then do the unmarshaling.
- err := u.unmarshal(toPointer(&msg), b)
- return err
-}
-
-type unmarshalInfo struct {
- typ reflect.Type // type of the protobuf struct
-
- // 0 = only typ field is initialized
- // 1 = completely initialized
- initialized int32
- lock sync.Mutex // prevents double initialization
- dense []unmarshalFieldInfo // fields indexed by tag #
- sparse map[uint64]unmarshalFieldInfo // fields indexed by tag #
- reqFields []string // names of required fields
- reqMask uint64 // 1< 0 {
- // Read tag and wire type.
- // Special case 1 and 2 byte varints.
- var x uint64
- if b[0] < 128 {
- x = uint64(b[0])
- b = b[1:]
- } else if len(b) >= 2 && b[1] < 128 {
- x = uint64(b[0]&0x7f) + uint64(b[1])<<7
- b = b[2:]
- } else {
- var n int
- x, n = decodeVarint(b)
- if n == 0 {
- return io.ErrUnexpectedEOF
- }
- b = b[n:]
- }
- tag := x >> 3
- wire := int(x) & 7
-
- // Dispatch on the tag to one of the unmarshal* functions below.
- var f unmarshalFieldInfo
- if tag < uint64(len(u.dense)) {
- f = u.dense[tag]
- } else {
- f = u.sparse[tag]
- }
- if fn := f.unmarshal; fn != nil {
- var err error
- b, err = fn(b, m.offset(f.field), wire)
- if err == nil {
- reqMask |= f.reqMask
- continue
- }
- if r, ok := err.(*RequiredNotSetError); ok {
- // Remember this error, but keep parsing. We need to produce
- // a full parse even if a required field is missing.
- if errLater == nil {
- errLater = r
- }
- reqMask |= f.reqMask
- continue
- }
- if err != errInternalBadWireType {
- if err == errInvalidUTF8 {
- if errLater == nil {
- fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
- errLater = &invalidUTF8Error{fullName}
- }
- continue
- }
- return err
- }
- // Fragments with bad wire type are treated as unknown fields.
- }
-
- // Unknown tag.
- if !u.unrecognized.IsValid() {
- // Don't keep unrecognized data; just skip it.
- var err error
- b, err = skipField(b, wire)
- if err != nil {
- return err
- }
- continue
- }
- // Keep unrecognized data around.
- // maybe in extensions, maybe in the unrecognized field.
- z := m.offset(u.unrecognized).toBytes()
- var emap map[int32]Extension
- var e Extension
- for _, r := range u.extensionRanges {
- if uint64(r.Start) <= tag && tag <= uint64(r.End) {
- if u.extensions.IsValid() {
- mp := m.offset(u.extensions).toExtensions()
- emap = mp.extensionsWrite()
- e = emap[int32(tag)]
- z = &e.enc
- break
- }
- if u.oldExtensions.IsValid() {
- p := m.offset(u.oldExtensions).toOldExtensions()
- emap = *p
- if emap == nil {
- emap = map[int32]Extension{}
- *p = emap
- }
- e = emap[int32(tag)]
- z = &e.enc
- break
- }
- panic("no extensions field available")
- }
- }
-
- // Use wire type to skip data.
- var err error
- b0 := b
- b, err = skipField(b, wire)
- if err != nil {
- return err
- }
- *z = encodeVarint(*z, tag<<3|uint64(wire))
- *z = append(*z, b0[:len(b0)-len(b)]...)
-
- if emap != nil {
- emap[int32(tag)] = e
- }
- }
- if reqMask != u.reqMask && errLater == nil {
- // A required field of this message is missing.
- for _, n := range u.reqFields {
- if reqMask&1 == 0 {
- errLater = &RequiredNotSetError{n}
- }
- reqMask >>= 1
- }
- }
- return errLater
-}
-
-// computeUnmarshalInfo fills in u with information for use
-// in unmarshaling protocol buffers of type u.typ.
-func (u *unmarshalInfo) computeUnmarshalInfo() {
- u.lock.Lock()
- defer u.lock.Unlock()
- if u.initialized != 0 {
- return
- }
- t := u.typ
- n := t.NumField()
-
- // Set up the "not found" value for the unrecognized byte buffer.
- // This is the default for proto3.
- u.unrecognized = invalidField
- u.extensions = invalidField
- u.oldExtensions = invalidField
-
- // List of the generated type and offset for each oneof field.
- type oneofField struct {
- ityp reflect.Type // interface type of oneof field
- field field // offset in containing message
- }
- var oneofFields []oneofField
-
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if f.Name == "XXX_unrecognized" {
- // The byte slice used to hold unrecognized input is special.
- if f.Type != reflect.TypeOf(([]byte)(nil)) {
- panic("bad type for XXX_unrecognized field: " + f.Type.Name())
- }
- u.unrecognized = toField(&f)
- continue
- }
- if f.Name == "XXX_InternalExtensions" {
- // Ditto here.
- if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) {
- panic("bad type for XXX_InternalExtensions field: " + f.Type.Name())
- }
- u.extensions = toField(&f)
- if f.Tag.Get("protobuf_messageset") == "1" {
- u.isMessageSet = true
- }
- continue
- }
- if f.Name == "XXX_extensions" {
- // An older form of the extensions field.
- if f.Type != reflect.TypeOf((map[int32]Extension)(nil)) {
- panic("bad type for XXX_extensions field: " + f.Type.Name())
- }
- u.oldExtensions = toField(&f)
- continue
- }
- if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" {
- continue
- }
-
- oneof := f.Tag.Get("protobuf_oneof")
- if oneof != "" {
- oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)})
- // The rest of oneof processing happens below.
- continue
- }
-
- tags := f.Tag.Get("protobuf")
- tagArray := strings.Split(tags, ",")
- if len(tagArray) < 2 {
- panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags)
- }
- tag, err := strconv.Atoi(tagArray[1])
- if err != nil {
- panic("protobuf tag field not an integer: " + tagArray[1])
- }
-
- name := ""
- for _, tag := range tagArray[3:] {
- if strings.HasPrefix(tag, "name=") {
- name = tag[5:]
- }
- }
-
- // Extract unmarshaling function from the field (its type and tags).
- unmarshal := fieldUnmarshaler(&f)
-
- // Required field?
- var reqMask uint64
- if tagArray[2] == "req" {
- bit := len(u.reqFields)
- u.reqFields = append(u.reqFields, name)
- reqMask = uint64(1) << uint(bit)
- // TODO: if we have more than 64 required fields, we end up
- // not verifying that all required fields are present.
- // Fix this, perhaps using a count of required fields?
- }
-
- // Store the info in the correct slot in the message.
- u.setTag(tag, toField(&f), unmarshal, reqMask, name)
- }
-
- // Find any types associated with oneof fields.
- // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it?
- fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs")
- if fn.IsValid() {
- res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{}
- for i := res.Len() - 1; i >= 0; i-- {
- v := res.Index(i) // interface{}
- tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X
- typ := tptr.Elem() // Msg_X
-
- f := typ.Field(0) // oneof implementers have one field
- baseUnmarshal := fieldUnmarshaler(&f)
- tags := strings.Split(f.Tag.Get("protobuf"), ",")
- fieldNum, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("protobuf tag field not an integer: " + tags[1])
- }
- var name string
- for _, tag := range tags {
- if strings.HasPrefix(tag, "name=") {
- name = strings.TrimPrefix(tag, "name=")
- break
- }
- }
-
- // Find the oneof field that this struct implements.
- // Might take O(n^2) to process all of the oneofs, but who cares.
- for _, of := range oneofFields {
- if tptr.Implements(of.ityp) {
- // We have found the corresponding interface for this struct.
- // That lets us know where this struct should be stored
- // when we encounter it during unmarshaling.
- unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
- u.setTag(fieldNum, of.field, unmarshal, 0, name)
- }
- }
- }
- }
-
- // Get extension ranges, if any.
- fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
- if fn.IsValid() {
- if !u.extensions.IsValid() && !u.oldExtensions.IsValid() {
- panic("a message with extensions, but no extensions field in " + t.Name())
- }
- u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange)
- }
-
- // Explicitly disallow tag 0. This will ensure we flag an error
- // when decoding a buffer of all zeros. Without this code, we
- // would decode and skip an all-zero buffer of even length.
- // [0 0] is [tag=0/wiretype=varint varint-encoded-0].
- u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
- return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
- }, 0, "")
-
- // Set mask for required field check.
- u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
- for len(u.dense) <= tag {
- u.dense = append(u.dense, unmarshalFieldInfo{})
- }
- u.dense[tag] = i
- return
- }
- if u.sparse == nil {
- u.sparse = map[uint64]unmarshalFieldInfo{}
- }
- u.sparse[uint64(tag)] = i
-}
-
-// fieldUnmarshaler returns an unmarshaler for the given field.
-func fieldUnmarshaler(f *reflect.StructField) unmarshaler {
- if f.Type.Kind() == reflect.Map {
- return makeUnmarshalMap(f)
- }
- return typeUnmarshaler(f.Type, f.Tag.Get("protobuf"))
-}
-
-// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair.
-func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
- tagArray := strings.Split(tags, ",")
- encoding := tagArray[0]
- name := "unknown"
- proto3 := false
- validateUTF8 := true
- for _, tag := range tagArray[3:] {
- if strings.HasPrefix(tag, "name=") {
- name = tag[5:]
- }
- if tag == "proto3" {
- proto3 = true
- }
- }
- validateUTF8 = validateUTF8 && proto3
-
- // Figure out packaging (pointer, slice, or both)
- slice := false
- pointer := false
- if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
- slice = true
- t = t.Elem()
- }
- if t.Kind() == reflect.Ptr {
- pointer = true
- t = t.Elem()
- }
-
- // We'll never have both pointer and slice for basic types.
- if pointer && slice && t.Kind() != reflect.Struct {
- panic("both pointer and slice for basic type in " + t.Name())
- }
-
- switch t.Kind() {
- case reflect.Bool:
- if pointer {
- return unmarshalBoolPtr
- }
- if slice {
- return unmarshalBoolSlice
- }
- return unmarshalBoolValue
- case reflect.Int32:
- switch encoding {
- case "fixed32":
- if pointer {
- return unmarshalFixedS32Ptr
- }
- if slice {
- return unmarshalFixedS32Slice
- }
- return unmarshalFixedS32Value
- case "varint":
- // this could be int32 or enum
- if pointer {
- return unmarshalInt32Ptr
- }
- if slice {
- return unmarshalInt32Slice
- }
- return unmarshalInt32Value
- case "zigzag32":
- if pointer {
- return unmarshalSint32Ptr
- }
- if slice {
- return unmarshalSint32Slice
- }
- return unmarshalSint32Value
- }
- case reflect.Int64:
- switch encoding {
- case "fixed64":
- if pointer {
- return unmarshalFixedS64Ptr
- }
- if slice {
- return unmarshalFixedS64Slice
- }
- return unmarshalFixedS64Value
- case "varint":
- if pointer {
- return unmarshalInt64Ptr
- }
- if slice {
- return unmarshalInt64Slice
- }
- return unmarshalInt64Value
- case "zigzag64":
- if pointer {
- return unmarshalSint64Ptr
- }
- if slice {
- return unmarshalSint64Slice
- }
- return unmarshalSint64Value
- }
- case reflect.Uint32:
- switch encoding {
- case "fixed32":
- if pointer {
- return unmarshalFixed32Ptr
- }
- if slice {
- return unmarshalFixed32Slice
- }
- return unmarshalFixed32Value
- case "varint":
- if pointer {
- return unmarshalUint32Ptr
- }
- if slice {
- return unmarshalUint32Slice
- }
- return unmarshalUint32Value
- }
- case reflect.Uint64:
- switch encoding {
- case "fixed64":
- if pointer {
- return unmarshalFixed64Ptr
- }
- if slice {
- return unmarshalFixed64Slice
- }
- return unmarshalFixed64Value
- case "varint":
- if pointer {
- return unmarshalUint64Ptr
- }
- if slice {
- return unmarshalUint64Slice
- }
- return unmarshalUint64Value
- }
- case reflect.Float32:
- if pointer {
- return unmarshalFloat32Ptr
- }
- if slice {
- return unmarshalFloat32Slice
- }
- return unmarshalFloat32Value
- case reflect.Float64:
- if pointer {
- return unmarshalFloat64Ptr
- }
- if slice {
- return unmarshalFloat64Slice
- }
- return unmarshalFloat64Value
- case reflect.Map:
- panic("map type in typeUnmarshaler in " + t.Name())
- case reflect.Slice:
- if pointer {
- panic("bad pointer in slice case in " + t.Name())
- }
- if slice {
- return unmarshalBytesSlice
- }
- return unmarshalBytesValue
- case reflect.String:
- if validateUTF8 {
- if pointer {
- return unmarshalUTF8StringPtr
- }
- if slice {
- return unmarshalUTF8StringSlice
- }
- return unmarshalUTF8StringValue
- }
- if pointer {
- return unmarshalStringPtr
- }
- if slice {
- return unmarshalStringSlice
- }
- return unmarshalStringValue
- case reflect.Struct:
- // message or group field
- if !pointer {
- panic(fmt.Sprintf("message/group field %s:%s without pointer", t, encoding))
- }
- switch encoding {
- case "bytes":
- if slice {
- return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name)
- }
- return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name)
- case "group":
- if slice {
- return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name)
- }
- return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name)
- }
- }
- panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding))
-}
-
-// Below are all the unmarshalers for individual fields of various types.
-
-func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- *f.toInt64() = v
- return b, nil
-}
-
-func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- *f.toInt64Ptr() = &v
- return b, nil
-}
-
-func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- s := f.toInt64Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- s := f.toInt64Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- *f.toInt64() = v
- return b, nil
-}
-
-func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- *f.toInt64Ptr() = &v
- return b, nil
-}
-
-func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- s := f.toInt64Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- s := f.toInt64Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- *f.toUint64() = v
- return b, nil
-}
-
-func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- *f.toUint64Ptr() = &v
- return b, nil
-}
-
-func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- s := f.toUint64Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- s := f.toUint64Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- *f.toInt32() = v
- return b, nil
-}
-
-func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- f.setInt32Ptr(v)
- return b, nil
-}
-
-func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- f.appendInt32Slice(v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- f.appendInt32Slice(v)
- return b, nil
-}
-
-func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- *f.toInt32() = v
- return b, nil
-}
-
-func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- f.setInt32Ptr(v)
- return b, nil
-}
-
-func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- f.appendInt32Slice(v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- f.appendInt32Slice(v)
- return b, nil
-}
-
-func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- *f.toUint32() = v
- return b, nil
-}
-
-func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- *f.toUint32Ptr() = &v
- return b, nil
-}
-
-func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- s := f.toUint32Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- s := f.toUint32Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- *f.toUint64() = v
- return b[8:], nil
-}
-
-func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- *f.toUint64Ptr() = &v
- return b[8:], nil
-}
-
-func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- s := f.toUint64Slice()
- *s = append(*s, v)
- b = b[8:]
- }
- return res, nil
- }
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- s := f.toUint64Slice()
- *s = append(*s, v)
- return b[8:], nil
-}
-
-func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- *f.toInt64() = v
- return b[8:], nil
-}
-
-func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- *f.toInt64Ptr() = &v
- return b[8:], nil
-}
-
-func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- s := f.toInt64Slice()
- *s = append(*s, v)
- b = b[8:]
- }
- return res, nil
- }
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- s := f.toInt64Slice()
- *s = append(*s, v)
- return b[8:], nil
-}
-
-func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- *f.toUint32() = v
- return b[4:], nil
-}
-
-func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- *f.toUint32Ptr() = &v
- return b[4:], nil
-}
-
-func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- s := f.toUint32Slice()
- *s = append(*s, v)
- b = b[4:]
- }
- return res, nil
- }
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- s := f.toUint32Slice()
- *s = append(*s, v)
- return b[4:], nil
-}
-
-func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- *f.toInt32() = v
- return b[4:], nil
-}
-
-func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- f.setInt32Ptr(v)
- return b[4:], nil
-}
-
-func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- f.appendInt32Slice(v)
- b = b[4:]
- }
- return res, nil
- }
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- f.appendInt32Slice(v)
- return b[4:], nil
-}
-
-func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- // Note: any length varint is allowed, even though any sane
- // encoder will use one byte.
- // See https://github.com/golang/protobuf/issues/76
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- // TODO: check if x>1? Tests seem to indicate no.
- v := x != 0
- *f.toBool() = v
- return b[n:], nil
-}
-
-func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := x != 0
- *f.toBoolPtr() = &v
- return b[n:], nil
-}
-
-func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := x != 0
- s := f.toBoolSlice()
- *s = append(*s, v)
- b = b[n:]
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := x != 0
- s := f.toBoolSlice()
- *s = append(*s, v)
- return b[n:], nil
-}
-
-func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- *f.toFloat64() = v
- return b[8:], nil
-}
-
-func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- *f.toFloat64Ptr() = &v
- return b[8:], nil
-}
-
-func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- s := f.toFloat64Slice()
- *s = append(*s, v)
- b = b[8:]
- }
- return res, nil
- }
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- s := f.toFloat64Slice()
- *s = append(*s, v)
- return b[8:], nil
-}
-
-func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- *f.toFloat32() = v
- return b[4:], nil
-}
-
-func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- *f.toFloat32Ptr() = &v
- return b[4:], nil
-}
-
-func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- s := f.toFloat32Slice()
- *s = append(*s, v)
- b = b[4:]
- }
- return res, nil
- }
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- s := f.toFloat32Slice()
- *s = append(*s, v)
- return b[4:], nil
-}
-
-func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- *f.toString() = v
- return b[x:], nil
-}
-
-func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- *f.toStringPtr() = &v
- return b[x:], nil
-}
-
-func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- s := f.toStringSlice()
- *s = append(*s, v)
- return b[x:], nil
-}
-
-func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- *f.toString() = v
- if !utf8.ValidString(v) {
- return b[x:], errInvalidUTF8
- }
- return b[x:], nil
-}
-
-func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- *f.toStringPtr() = &v
- if !utf8.ValidString(v) {
- return b[x:], errInvalidUTF8
- }
- return b[x:], nil
-}
-
-func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- s := f.toStringSlice()
- *s = append(*s, v)
- if !utf8.ValidString(v) {
- return b[x:], errInvalidUTF8
- }
- return b[x:], nil
-}
-
-var emptyBuf [0]byte
-
-func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- // The use of append here is a trick which avoids the zeroing
- // that would be required if we used a make/copy pair.
- // We append to emptyBuf instead of nil because we want
- // a non-nil result even when the length is 0.
- v := append(emptyBuf[:], b[:x]...)
- *f.toBytes() = v
- return b[x:], nil
-}
-
-func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := append(emptyBuf[:], b[:x]...)
- s := f.toBytesSlice()
- *s = append(*s, v)
- return b[x:], nil
-}
-
-func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- // First read the message field to see if something is there.
- // The semantics of multiple submessages are weird. Instead of
- // the last one winning (as it is for all other fields), multiple
- // submessages are merged.
- v := f.getPointer()
- if v.isNil() {
- v = valToPointer(reflect.New(sub.typ))
- f.setPointer(v)
- }
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- return b[x:], err
- }
-}
-
-func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := valToPointer(reflect.New(sub.typ))
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- f.appendPointer(v)
- return b[x:], err
- }
-}
-
-func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireStartGroup {
- return b, errInternalBadWireType
- }
- x, y := findEndGroup(b)
- if x < 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := f.getPointer()
- if v.isNil() {
- v = valToPointer(reflect.New(sub.typ))
- f.setPointer(v)
- }
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- return b[y:], err
- }
-}
-
-func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireStartGroup {
- return b, errInternalBadWireType
- }
- x, y := findEndGroup(b)
- if x < 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := valToPointer(reflect.New(sub.typ))
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- f.appendPointer(v)
- return b[y:], err
- }
-}
-
-func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
- t := f.Type
- kt := t.Key()
- vt := t.Elem()
- unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key"))
- unmarshalVal := typeUnmarshaler(vt, f.Tag.Get("protobuf_val"))
- return func(b []byte, f pointer, w int) ([]byte, error) {
- // The map entry is a submessage. Figure out how big it is.
- if w != WireBytes {
- return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes)
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- r := b[x:] // unused data to return
- b = b[:x] // data for map entry
-
- // Note: we could use #keys * #values ~= 200 functions
- // to do map decoding without reflection. Probably not worth it.
- // Maps will be somewhat slow. Oh well.
-
- // Read key and value from data.
- var nerr nonFatal
- k := reflect.New(kt)
- v := reflect.New(vt)
- for len(b) > 0 {
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- wire := int(x) & 7
- b = b[n:]
-
- var err error
- switch x >> 3 {
- case 1:
- b, err = unmarshalKey(b, valToPointer(k), wire)
- case 2:
- b, err = unmarshalVal(b, valToPointer(v), wire)
- default:
- err = errInternalBadWireType // skip unknown tag
- }
-
- if nerr.Merge(err) {
- continue
- }
- if err != errInternalBadWireType {
- return nil, err
- }
-
- // Skip past unknown fields.
- b, err = skipField(b, wire)
- if err != nil {
- return nil, err
- }
- }
-
- // Get map, allocate if needed.
- m := f.asPointerTo(t).Elem() // an addressable map[K]T
- if m.IsNil() {
- m.Set(reflect.MakeMap(t))
- }
-
- // Insert into map.
- m.SetMapIndex(k.Elem(), v.Elem())
-
- return r, nerr.E
- }
-}
-
-// makeUnmarshalOneof makes an unmarshaler for oneof fields.
-// for:
-// message Msg {
-// oneof F {
-// int64 X = 1;
-// float64 Y = 2;
-// }
-// }
-// typ is the type of the concrete entry for a oneof case (e.g. Msg_X).
-// ityp is the interface type of the oneof field (e.g. isMsg_F).
-// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64).
-// Note that this function will be called once for each case in the oneof.
-func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler {
- sf := typ.Field(0)
- field0 := toField(&sf)
- return func(b []byte, f pointer, w int) ([]byte, error) {
- // Allocate holder for value.
- v := reflect.New(typ)
-
- // Unmarshal data into holder.
- // We unmarshal into the first field of the holder object.
- var err error
- var nerr nonFatal
- b, err = unmarshal(b, valToPointer(v).offset(field0), w)
- if !nerr.Merge(err) {
- return nil, err
- }
-
- // Write pointer to holder into target field.
- f.asPointerTo(ityp).Elem().Set(v)
-
- return b, nerr.E
- }
-}
-
-// Error used by decode internally.
-var errInternalBadWireType = errors.New("proto: internal error: bad wiretype")
-
-// skipField skips past a field of type wire and returns the remaining bytes.
-func skipField(b []byte, wire int) ([]byte, error) {
- switch wire {
- case WireVarint:
- _, k := decodeVarint(b)
- if k == 0 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[k:]
- case WireFixed32:
- if len(b) < 4 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[4:]
- case WireFixed64:
- if len(b) < 8 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[8:]
- case WireBytes:
- m, k := decodeVarint(b)
- if k == 0 || uint64(len(b)-k) < m {
- return b, io.ErrUnexpectedEOF
- }
- b = b[uint64(k)+m:]
- case WireStartGroup:
- _, i := findEndGroup(b)
- if i == -1 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[i:]
- default:
- return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire)
- }
- return b, nil
-}
-
-// findEndGroup finds the index of the next EndGroup tag.
-// Groups may be nested, so the "next" EndGroup tag is the first
-// unpaired EndGroup.
-// findEndGroup returns the indexes of the start and end of the EndGroup tag.
-// Returns (-1,-1) if it can't find one.
-func findEndGroup(b []byte) (int, int) {
- depth := 1
- i := 0
- for {
- x, n := decodeVarint(b[i:])
- if n == 0 {
- return -1, -1
- }
- j := i
- i += n
- switch x & 7 {
- case WireVarint:
- _, k := decodeVarint(b[i:])
- if k == 0 {
- return -1, -1
- }
- i += k
- case WireFixed32:
- if len(b)-4 < i {
- return -1, -1
- }
- i += 4
- case WireFixed64:
- if len(b)-8 < i {
- return -1, -1
- }
- i += 8
- case WireBytes:
- m, k := decodeVarint(b[i:])
- if k == 0 {
- return -1, -1
- }
- i += k
- if uint64(len(b)-i) < m {
- return -1, -1
- }
- i += int(m)
- case WireStartGroup:
- depth++
- case WireEndGroup:
- depth--
- if depth == 0 {
- return j, i
- }
- default:
- return -1, -1
- }
- }
-}
-
-// encodeVarint appends a varint-encoded integer to b and returns the result.
-func encodeVarint(b []byte, x uint64) []byte {
- for x >= 1<<7 {
- b = append(b, byte(x&0x7f|0x80))
- x >>= 7
- }
- return append(b, byte(x))
-}
-
-// decodeVarint reads a varint-encoded integer from b.
-// Returns the decoded integer and the number of bytes read.
-// If there is an error, it returns 0,0.
-func decodeVarint(b []byte) (uint64, int) {
- var x, y uint64
- if len(b) <= 0 {
- goto bad
- }
- x = uint64(b[0])
- if x < 0x80 {
- return x, 1
- }
- x -= 0x80
-
- if len(b) <= 1 {
- goto bad
- }
- y = uint64(b[1])
- x += y << 7
- if y < 0x80 {
- return x, 2
- }
- x -= 0x80 << 7
-
- if len(b) <= 2 {
- goto bad
- }
- y = uint64(b[2])
- x += y << 14
- if y < 0x80 {
- return x, 3
- }
- x -= 0x80 << 14
-
- if len(b) <= 3 {
- goto bad
- }
- y = uint64(b[3])
- x += y << 21
- if y < 0x80 {
- return x, 4
- }
- x -= 0x80 << 21
-
- if len(b) <= 4 {
- goto bad
- }
- y = uint64(b[4])
- x += y << 28
- if y < 0x80 {
- return x, 5
- }
- x -= 0x80 << 28
-
- if len(b) <= 5 {
- goto bad
- }
- y = uint64(b[5])
- x += y << 35
- if y < 0x80 {
- return x, 6
- }
- x -= 0x80 << 35
-
- if len(b) <= 6 {
- goto bad
- }
- y = uint64(b[6])
- x += y << 42
- if y < 0x80 {
- return x, 7
- }
- x -= 0x80 << 42
-
- if len(b) <= 7 {
- goto bad
- }
- y = uint64(b[7])
- x += y << 49
- if y < 0x80 {
- return x, 8
- }
- x -= 0x80 << 49
-
- if len(b) <= 8 {
- goto bad
- }
- y = uint64(b[8])
- x += y << 56
- if y < 0x80 {
- return x, 9
- }
- x -= 0x80 << 56
-
- if len(b) <= 9 {
- goto bad
- }
- y = uint64(b[9])
- x += y << 63
- if y < 2 {
- return x, 10
- }
-
-bad:
- return 0, 0
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go
deleted file mode 100644
index 1aaee725..00000000
--- a/vendor/github.com/golang/protobuf/proto/text.go
+++ /dev/null
@@ -1,843 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-// Functions for writing the text protocol buffer format.
-
-import (
- "bufio"
- "bytes"
- "encoding"
- "errors"
- "fmt"
- "io"
- "log"
- "math"
- "reflect"
- "sort"
- "strings"
-)
-
-var (
- newline = []byte("\n")
- spaces = []byte(" ")
- endBraceNewline = []byte("}\n")
- backslashN = []byte{'\\', 'n'}
- backslashR = []byte{'\\', 'r'}
- backslashT = []byte{'\\', 't'}
- backslashDQ = []byte{'\\', '"'}
- backslashBS = []byte{'\\', '\\'}
- posInf = []byte("inf")
- negInf = []byte("-inf")
- nan = []byte("nan")
-)
-
-type writer interface {
- io.Writer
- WriteByte(byte) error
-}
-
-// textWriter is an io.Writer that tracks its indentation level.
-type textWriter struct {
- ind int
- complete bool // if the current position is a complete line
- compact bool // whether to write out as a one-liner
- w writer
-}
-
-func (w *textWriter) WriteString(s string) (n int, err error) {
- if !strings.Contains(s, "\n") {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.complete = false
- return io.WriteString(w.w, s)
- }
- // WriteString is typically called without newlines, so this
- // codepath and its copy are rare. We copy to avoid
- // duplicating all of Write's logic here.
- return w.Write([]byte(s))
-}
-
-func (w *textWriter) Write(p []byte) (n int, err error) {
- newlines := bytes.Count(p, newline)
- if newlines == 0 {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- n, err = w.w.Write(p)
- w.complete = false
- return n, err
- }
-
- frags := bytes.SplitN(p, newline, newlines+1)
- if w.compact {
- for i, frag := range frags {
- if i > 0 {
- if err := w.w.WriteByte(' '); err != nil {
- return n, err
- }
- n++
- }
- nn, err := w.w.Write(frag)
- n += nn
- if err != nil {
- return n, err
- }
- }
- return n, nil
- }
-
- for i, frag := range frags {
- if w.complete {
- w.writeIndent()
- }
- nn, err := w.w.Write(frag)
- n += nn
- if err != nil {
- return n, err
- }
- if i+1 < len(frags) {
- if err := w.w.WriteByte('\n'); err != nil {
- return n, err
- }
- n++
- }
- }
- w.complete = len(frags[len(frags)-1]) == 0
- return n, nil
-}
-
-func (w *textWriter) WriteByte(c byte) error {
- if w.compact && c == '\n' {
- c = ' '
- }
- if !w.compact && w.complete {
- w.writeIndent()
- }
- err := w.w.WriteByte(c)
- w.complete = c == '\n'
- return err
-}
-
-func (w *textWriter) indent() { w.ind++ }
-
-func (w *textWriter) unindent() {
- if w.ind == 0 {
- log.Print("proto: textWriter unindented too far")
- return
- }
- w.ind--
-}
-
-func writeName(w *textWriter, props *Properties) error {
- if _, err := w.WriteString(props.OrigName); err != nil {
- return err
- }
- if props.Wire != "group" {
- return w.WriteByte(':')
- }
- return nil
-}
-
-func requiresQuotes(u string) bool {
- // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
- for _, ch := range u {
- switch {
- case ch == '.' || ch == '/' || ch == '_':
- continue
- case '0' <= ch && ch <= '9':
- continue
- case 'A' <= ch && ch <= 'Z':
- continue
- case 'a' <= ch && ch <= 'z':
- continue
- default:
- return true
- }
- }
- return false
-}
-
-// isAny reports whether sv is a google.protobuf.Any message
-func isAny(sv reflect.Value) bool {
- type wkt interface {
- XXX_WellKnownType() string
- }
- t, ok := sv.Addr().Interface().(wkt)
- return ok && t.XXX_WellKnownType() == "Any"
-}
-
-// writeProto3Any writes an expanded google.protobuf.Any message.
-//
-// It returns (false, nil) if sv value can't be unmarshaled (e.g. because
-// required messages are not linked in).
-//
-// It returns (true, error) when sv was written in expanded format or an error
-// was encountered.
-func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) {
- turl := sv.FieldByName("TypeUrl")
- val := sv.FieldByName("Value")
- if !turl.IsValid() || !val.IsValid() {
- return true, errors.New("proto: invalid google.protobuf.Any message")
- }
-
- b, ok := val.Interface().([]byte)
- if !ok {
- return true, errors.New("proto: invalid google.protobuf.Any message")
- }
-
- parts := strings.Split(turl.String(), "/")
- mt := MessageType(parts[len(parts)-1])
- if mt == nil {
- return false, nil
- }
- m := reflect.New(mt.Elem())
- if err := Unmarshal(b, m.Interface().(Message)); err != nil {
- return false, nil
- }
- w.Write([]byte("["))
- u := turl.String()
- if requiresQuotes(u) {
- writeString(w, u)
- } else {
- w.Write([]byte(u))
- }
- if w.compact {
- w.Write([]byte("]:<"))
- } else {
- w.Write([]byte("]: <\n"))
- w.ind++
- }
- if err := tm.writeStruct(w, m.Elem()); err != nil {
- return true, err
- }
- if w.compact {
- w.Write([]byte("> "))
- } else {
- w.ind--
- w.Write([]byte(">\n"))
- }
- return true, nil
-}
-
-func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
- if tm.ExpandAny && isAny(sv) {
- if canExpand, err := tm.writeProto3Any(w, sv); canExpand {
- return err
- }
- }
- st := sv.Type()
- sprops := GetProperties(st)
- for i := 0; i < sv.NumField(); i++ {
- fv := sv.Field(i)
- props := sprops.Prop[i]
- name := st.Field(i).Name
-
- if name == "XXX_NoUnkeyedLiteral" {
- continue
- }
-
- if strings.HasPrefix(name, "XXX_") {
- // There are two XXX_ fields:
- // XXX_unrecognized []byte
- // XXX_extensions map[int32]proto.Extension
- // The first is handled here;
- // the second is handled at the bottom of this function.
- if name == "XXX_unrecognized" && !fv.IsNil() {
- if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil {
- return err
- }
- }
- continue
- }
- if fv.Kind() == reflect.Ptr && fv.IsNil() {
- // Field not filled in. This could be an optional field or
- // a required field that wasn't filled in. Either way, there
- // isn't anything we can show for it.
- continue
- }
- if fv.Kind() == reflect.Slice && fv.IsNil() {
- // Repeated field that is empty, or a bytes field that is unused.
- continue
- }
-
- if props.Repeated && fv.Kind() == reflect.Slice {
- // Repeated field.
- for j := 0; j < fv.Len(); j++ {
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- v := fv.Index(j)
- if v.Kind() == reflect.Ptr && v.IsNil() {
- // A nil message in a repeated field is not valid,
- // but we can handle that more gracefully than panicking.
- if _, err := w.Write([]byte("\n")); err != nil {
- return err
- }
- continue
- }
- if err := tm.writeAny(w, v, props); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- continue
- }
- if fv.Kind() == reflect.Map {
- // Map fields are rendered as a repeated struct with key/value fields.
- keys := fv.MapKeys()
- sort.Sort(mapKeys(keys))
- for _, key := range keys {
- val := fv.MapIndex(key)
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- // open struct
- if err := w.WriteByte('<'); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- // key
- if _, err := w.WriteString("key:"); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, key, props.MapKeyProp); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- // nil values aren't legal, but we can avoid panicking because of them.
- if val.Kind() != reflect.Ptr || !val.IsNil() {
- // value
- if _, err := w.WriteString("value:"); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, val, props.MapValProp); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- // close struct
- w.unindent()
- if err := w.WriteByte('>'); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- continue
- }
- if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 {
- // empty bytes field
- continue
- }
- if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice {
- // proto3 non-repeated scalar field; skip if zero value
- if isProto3Zero(fv) {
- continue
- }
- }
-
- if fv.Kind() == reflect.Interface {
- // Check if it is a oneof.
- if st.Field(i).Tag.Get("protobuf_oneof") != "" {
- // fv is nil, or holds a pointer to generated struct.
- // That generated struct has exactly one field,
- // which has a protobuf struct tag.
- if fv.IsNil() {
- continue
- }
- inner := fv.Elem().Elem() // interface -> *T -> T
- tag := inner.Type().Field(0).Tag.Get("protobuf")
- props = new(Properties) // Overwrite the outer props var, but not its pointee.
- props.Parse(tag)
- // Write the value in the oneof, not the oneof itself.
- fv = inner.Field(0)
-
- // Special case to cope with malformed messages gracefully:
- // If the value in the oneof is a nil pointer, don't panic
- // in writeAny.
- if fv.Kind() == reflect.Ptr && fv.IsNil() {
- // Use errors.New so writeAny won't render quotes.
- msg := errors.New("/* nil */")
- fv = reflect.ValueOf(&msg).Elem()
- }
- }
- }
-
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
-
- // Enums have a String method, so writeAny will work fine.
- if err := tm.writeAny(w, fv, props); err != nil {
- return err
- }
-
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
-
- // Extensions (the XXX_extensions field).
- pv := sv.Addr()
- if _, err := extendable(pv.Interface()); err == nil {
- if err := tm.writeExtensions(w, pv); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// writeAny writes an arbitrary field.
-func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
- v = reflect.Indirect(v)
-
- // Floats have special cases.
- if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 {
- x := v.Float()
- var b []byte
- switch {
- case math.IsInf(x, 1):
- b = posInf
- case math.IsInf(x, -1):
- b = negInf
- case math.IsNaN(x):
- b = nan
- }
- if b != nil {
- _, err := w.Write(b)
- return err
- }
- // Other values are handled below.
- }
-
- // We don't attempt to serialise every possible value type; only those
- // that can occur in protocol buffers.
- switch v.Kind() {
- case reflect.Slice:
- // Should only be a []byte; repeated fields are handled in writeStruct.
- if err := writeString(w, string(v.Bytes())); err != nil {
- return err
- }
- case reflect.String:
- if err := writeString(w, v.String()); err != nil {
- return err
- }
- case reflect.Struct:
- // Required/optional group/message.
- var bra, ket byte = '<', '>'
- if props != nil && props.Wire == "group" {
- bra, ket = '{', '}'
- }
- if err := w.WriteByte(bra); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- if v.CanAddr() {
- // Calling v.Interface on a struct causes the reflect package to
- // copy the entire struct. This is racy with the new Marshaler
- // since we atomically update the XXX_sizecache.
- //
- // Thus, we retrieve a pointer to the struct if possible to avoid
- // a race since v.Interface on the pointer doesn't copy the struct.
- //
- // If v is not addressable, then we are not worried about a race
- // since it implies that the binary Marshaler cannot possibly be
- // mutating this value.
- v = v.Addr()
- }
- if etm, ok := v.Interface().(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
- if err != nil {
- return err
- }
- if _, err = w.Write(text); err != nil {
- return err
- }
- } else {
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- if err := tm.writeStruct(w, v); err != nil {
- return err
- }
- }
- w.unindent()
- if err := w.WriteByte(ket); err != nil {
- return err
- }
- default:
- _, err := fmt.Fprint(w, v.Interface())
- return err
- }
- return nil
-}
-
-// equivalent to C's isprint.
-func isprint(c byte) bool {
- return c >= 0x20 && c < 0x7f
-}
-
-// writeString writes a string in the protocol buffer text format.
-// It is similar to strconv.Quote except we don't use Go escape sequences,
-// we treat the string as a byte sequence, and we use octal escapes.
-// These differences are to maintain interoperability with the other
-// languages' implementations of the text format.
-func writeString(w *textWriter, s string) error {
- // use WriteByte here to get any needed indent
- if err := w.WriteByte('"'); err != nil {
- return err
- }
- // Loop over the bytes, not the runes.
- for i := 0; i < len(s); i++ {
- var err error
- // Divergence from C++: we don't escape apostrophes.
- // There's no need to escape them, and the C++ parser
- // copes with a naked apostrophe.
- switch c := s[i]; c {
- case '\n':
- _, err = w.w.Write(backslashN)
- case '\r':
- _, err = w.w.Write(backslashR)
- case '\t':
- _, err = w.w.Write(backslashT)
- case '"':
- _, err = w.w.Write(backslashDQ)
- case '\\':
- _, err = w.w.Write(backslashBS)
- default:
- if isprint(c) {
- err = w.w.WriteByte(c)
- } else {
- _, err = fmt.Fprintf(w.w, "\\%03o", c)
- }
- }
- if err != nil {
- return err
- }
- }
- return w.WriteByte('"')
-}
-
-func writeUnknownStruct(w *textWriter, data []byte) (err error) {
- if !w.compact {
- if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil {
- return err
- }
- }
- b := NewBuffer(data)
- for b.index < len(b.buf) {
- x, err := b.DecodeVarint()
- if err != nil {
- _, err := fmt.Fprintf(w, "/* %v */\n", err)
- return err
- }
- wire, tag := x&7, x>>3
- if wire == WireEndGroup {
- w.unindent()
- if _, err := w.Write(endBraceNewline); err != nil {
- return err
- }
- continue
- }
- if _, err := fmt.Fprint(w, tag); err != nil {
- return err
- }
- if wire != WireStartGroup {
- if err := w.WriteByte(':'); err != nil {
- return err
- }
- }
- if !w.compact || wire == WireStartGroup {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- switch wire {
- case WireBytes:
- buf, e := b.DecodeRawBytes(false)
- if e == nil {
- _, err = fmt.Fprintf(w, "%q", buf)
- } else {
- _, err = fmt.Fprintf(w, "/* %v */", e)
- }
- case WireFixed32:
- x, err = b.DecodeFixed32()
- err = writeUnknownInt(w, x, err)
- case WireFixed64:
- x, err = b.DecodeFixed64()
- err = writeUnknownInt(w, x, err)
- case WireStartGroup:
- err = w.WriteByte('{')
- w.indent()
- case WireVarint:
- x, err = b.DecodeVarint()
- err = writeUnknownInt(w, x, err)
- default:
- _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire)
- }
- if err != nil {
- return err
- }
- if err = w.WriteByte('\n'); err != nil {
- return err
- }
- }
- return nil
-}
-
-func writeUnknownInt(w *textWriter, x uint64, err error) error {
- if err == nil {
- _, err = fmt.Fprint(w, x)
- } else {
- _, err = fmt.Fprintf(w, "/* %v */", err)
- }
- return err
-}
-
-type int32Slice []int32
-
-func (s int32Slice) Len() int { return len(s) }
-func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] }
-func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-// writeExtensions writes all the extensions in pv.
-// pv is assumed to be a pointer to a protocol message struct that is extendable.
-func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error {
- emap := extensionMaps[pv.Type().Elem()]
- ep, _ := extendable(pv.Interface())
-
- // Order the extensions by ID.
- // This isn't strictly necessary, but it will give us
- // canonical output, which will also make testing easier.
- m, mu := ep.extensionsRead()
- if m == nil {
- return nil
- }
- mu.Lock()
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids))
- mu.Unlock()
-
- for _, extNum := range ids {
- ext := m[extNum]
- var desc *ExtensionDesc
- if emap != nil {
- desc = emap[extNum]
- }
- if desc == nil {
- // Unknown extension.
- if err := writeUnknownStruct(w, ext.enc); err != nil {
- return err
- }
- continue
- }
-
- pb, err := GetExtension(ep, desc)
- if err != nil {
- return fmt.Errorf("failed getting extension: %v", err)
- }
-
- // Repeated extensions will appear as a slice.
- if !desc.repeated() {
- if err := tm.writeExtension(w, desc.Name, pb); err != nil {
- return err
- }
- } else {
- v := reflect.ValueOf(pb)
- for i := 0; i < v.Len(); i++ {
- if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil {
- return err
- }
- }
- }
- }
- return nil
-}
-
-func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error {
- if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- return nil
-}
-
-func (w *textWriter) writeIndent() {
- if !w.complete {
- return
- }
- remain := w.ind * 2
- for remain > 0 {
- n := remain
- if n > len(spaces) {
- n = len(spaces)
- }
- w.w.Write(spaces[:n])
- remain -= n
- }
- w.complete = false
-}
-
-// TextMarshaler is a configurable text format marshaler.
-type TextMarshaler struct {
- Compact bool // use compact text format (one line).
- ExpandAny bool // expand google.protobuf.Any messages of known types
-}
-
-// Marshal writes a given protocol buffer in text format.
-// The only errors returned are from w.
-func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error {
- val := reflect.ValueOf(pb)
- if pb == nil || val.IsNil() {
- w.Write([]byte(""))
- return nil
- }
- var bw *bufio.Writer
- ww, ok := w.(writer)
- if !ok {
- bw = bufio.NewWriter(w)
- ww = bw
- }
- aw := &textWriter{
- w: ww,
- complete: true,
- compact: tm.Compact,
- }
-
- if etm, ok := pb.(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
- if err != nil {
- return err
- }
- if _, err = aw.Write(text); err != nil {
- return err
- }
- if bw != nil {
- return bw.Flush()
- }
- return nil
- }
- // Dereference the received pointer so we don't have outer < and >.
- v := reflect.Indirect(val)
- if err := tm.writeStruct(aw, v); err != nil {
- return err
- }
- if bw != nil {
- return bw.Flush()
- }
- return nil
-}
-
-// Text is the same as Marshal, but returns the string directly.
-func (tm *TextMarshaler) Text(pb Message) string {
- var buf bytes.Buffer
- tm.Marshal(&buf, pb)
- return buf.String()
-}
-
-var (
- defaultTextMarshaler = TextMarshaler{}
- compactTextMarshaler = TextMarshaler{Compact: true}
-)
-
-// TODO: consider removing some of the Marshal functions below.
-
-// MarshalText writes a given protocol buffer in text format.
-// The only errors returned are from w.
-func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) }
-
-// MarshalTextString is the same as MarshalText, but returns the string directly.
-func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) }
-
-// CompactText writes a given protocol buffer in compact text format (one line).
-func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) }
-
-// CompactTextString is the same as CompactText, but returns the string directly.
-func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) }
diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go
deleted file mode 100644
index bb55a3af..00000000
--- a/vendor/github.com/golang/protobuf/proto/text_parser.go
+++ /dev/null
@@ -1,880 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-// Functions for parsing the Text protocol buffer format.
-// TODO: message sets.
-
-import (
- "encoding"
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "unicode/utf8"
-)
-
-// Error string emitted when deserializing Any and fields are already set
-const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set"
-
-type ParseError struct {
- Message string
- Line int // 1-based line number
- Offset int // 0-based byte offset from start of input
-}
-
-func (p *ParseError) Error() string {
- if p.Line == 1 {
- // show offset only for first line
- return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message)
- }
- return fmt.Sprintf("line %d: %v", p.Line, p.Message)
-}
-
-type token struct {
- value string
- err *ParseError
- line int // line number
- offset int // byte number from start of input, not start of line
- unquoted string // the unquoted version of value, if it was a quoted string
-}
-
-func (t *token) String() string {
- if t.err == nil {
- return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset)
- }
- return fmt.Sprintf("parse error: %v", t.err)
-}
-
-type textParser struct {
- s string // remaining input
- done bool // whether the parsing is finished (success or error)
- backed bool // whether back() was called
- offset, line int
- cur token
-}
-
-func newTextParser(s string) *textParser {
- p := new(textParser)
- p.s = s
- p.line = 1
- p.cur.line = 1
- return p
-}
-
-func (p *textParser) errorf(format string, a ...interface{}) *ParseError {
- pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}
- p.cur.err = pe
- p.done = true
- return pe
-}
-
-// Numbers and identifiers are matched by [-+._A-Za-z0-9]
-func isIdentOrNumberChar(c byte) bool {
- switch {
- case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':
- return true
- case '0' <= c && c <= '9':
- return true
- }
- switch c {
- case '-', '+', '.', '_':
- return true
- }
- return false
-}
-
-func isWhitespace(c byte) bool {
- switch c {
- case ' ', '\t', '\n', '\r':
- return true
- }
- return false
-}
-
-func isQuote(c byte) bool {
- switch c {
- case '"', '\'':
- return true
- }
- return false
-}
-
-func (p *textParser) skipWhitespace() {
- i := 0
- for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {
- if p.s[i] == '#' {
- // comment; skip to end of line or input
- for i < len(p.s) && p.s[i] != '\n' {
- i++
- }
- if i == len(p.s) {
- break
- }
- }
- if p.s[i] == '\n' {
- p.line++
- }
- i++
- }
- p.offset += i
- p.s = p.s[i:len(p.s)]
- if len(p.s) == 0 {
- p.done = true
- }
-}
-
-func (p *textParser) advance() {
- // Skip whitespace
- p.skipWhitespace()
- if p.done {
- return
- }
-
- // Start of non-whitespace
- p.cur.err = nil
- p.cur.offset, p.cur.line = p.offset, p.line
- p.cur.unquoted = ""
- switch p.s[0] {
- case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':
- // Single symbol
- p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]
- case '"', '\'':
- // Quoted string
- i := 1
- for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' {
- if p.s[i] == '\\' && i+1 < len(p.s) {
- // skip escaped char
- i++
- }
- i++
- }
- if i >= len(p.s) || p.s[i] != p.s[0] {
- p.errorf("unmatched quote")
- return
- }
- unq, err := unquoteC(p.s[1:i], rune(p.s[0]))
- if err != nil {
- p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err)
- return
- }
- p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]
- p.cur.unquoted = unq
- default:
- i := 0
- for i < len(p.s) && isIdentOrNumberChar(p.s[i]) {
- i++
- }
- if i == 0 {
- p.errorf("unexpected byte %#x", p.s[0])
- return
- }
- p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]
- }
- p.offset += len(p.cur.value)
-}
-
-var (
- errBadUTF8 = errors.New("proto: bad UTF-8")
-)
-
-func unquoteC(s string, quote rune) (string, error) {
- // This is based on C++'s tokenizer.cc.
- // Despite its name, this is *not* parsing C syntax.
- // For instance, "\0" is an invalid quoted string.
-
- // Avoid allocation in trivial cases.
- simple := true
- for _, r := range s {
- if r == '\\' || r == quote {
- simple = false
- break
- }
- }
- if simple {
- return s, nil
- }
-
- buf := make([]byte, 0, 3*len(s)/2)
- for len(s) > 0 {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", errBadUTF8
- }
- s = s[n:]
- if r != '\\' {
- if r < utf8.RuneSelf {
- buf = append(buf, byte(r))
- } else {
- buf = append(buf, string(r)...)
- }
- continue
- }
-
- ch, tail, err := unescape(s)
- if err != nil {
- return "", err
- }
- buf = append(buf, ch...)
- s = tail
- }
- return string(buf), nil
-}
-
-func unescape(s string) (ch string, tail string, err error) {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", "", errBadUTF8
- }
- s = s[n:]
- switch r {
- case 'a':
- return "\a", s, nil
- case 'b':
- return "\b", s, nil
- case 'f':
- return "\f", s, nil
- case 'n':
- return "\n", s, nil
- case 'r':
- return "\r", s, nil
- case 't':
- return "\t", s, nil
- case 'v':
- return "\v", s, nil
- case '?':
- return "?", s, nil // trigraph workaround
- case '\'', '"', '\\':
- return string(r), s, nil
- case '0', '1', '2', '3', '4', '5', '6', '7':
- if len(s) < 2 {
- return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
- }
- ss := string(r) + s[:2]
- s = s[2:]
- i, err := strconv.ParseUint(ss, 8, 8)
- if err != nil {
- return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss)
- }
- return string([]byte{byte(i)}), s, nil
- case 'x', 'X', 'u', 'U':
- var n int
- switch r {
- case 'x', 'X':
- n = 2
- case 'u':
- n = 4
- case 'U':
- n = 8
- }
- if len(s) < n {
- return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n)
- }
- ss := s[:n]
- s = s[n:]
- i, err := strconv.ParseUint(ss, 16, 64)
- if err != nil {
- return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss)
- }
- if r == 'x' || r == 'X' {
- return string([]byte{byte(i)}), s, nil
- }
- if i > utf8.MaxRune {
- return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
- }
- return string(i), s, nil
- }
- return "", "", fmt.Errorf(`unknown escape \%c`, r)
-}
-
-// Back off the parser by one token. Can only be done between calls to next().
-// It makes the next advance() a no-op.
-func (p *textParser) back() { p.backed = true }
-
-// Advances the parser and returns the new current token.
-func (p *textParser) next() *token {
- if p.backed || p.done {
- p.backed = false
- return &p.cur
- }
- p.advance()
- if p.done {
- p.cur.value = ""
- } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {
- // Look for multiple quoted strings separated by whitespace,
- // and concatenate them.
- cat := p.cur
- for {
- p.skipWhitespace()
- if p.done || !isQuote(p.s[0]) {
- break
- }
- p.advance()
- if p.cur.err != nil {
- return &p.cur
- }
- cat.value += " " + p.cur.value
- cat.unquoted += p.cur.unquoted
- }
- p.done = false // parser may have seen EOF, but we want to return cat
- p.cur = cat
- }
- return &p.cur
-}
-
-func (p *textParser) consumeToken(s string) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != s {
- p.back()
- return p.errorf("expected %q, found %q", s, tok.value)
- }
- return nil
-}
-
-// Return a RequiredNotSetError indicating which required field was not set.
-func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError {
- st := sv.Type()
- sprops := GetProperties(st)
- for i := 0; i < st.NumField(); i++ {
- if !isNil(sv.Field(i)) {
- continue
- }
-
- props := sprops.Prop[i]
- if props.Required {
- return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)}
- }
- }
- return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen
-}
-
-// Returns the index in the struct for the named field, as well as the parsed tag properties.
-func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) {
- i, ok := sprops.decoderOrigNames[name]
- if ok {
- return i, sprops.Prop[i], true
- }
- return -1, nil, false
-}
-
-// Consume a ':' from the input stream (if the next token is a colon),
-// returning an error if a colon is needed but not present.
-func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ":" {
- // Colon is optional when the field is a group or message.
- needColon := true
- switch props.Wire {
- case "group":
- needColon = false
- case "bytes":
- // A "bytes" field is either a message, a string, or a repeated field;
- // those three become *T, *string and []T respectively, so we can check for
- // this field being a pointer to a non-string.
- if typ.Kind() == reflect.Ptr {
- // *T or *string
- if typ.Elem().Kind() == reflect.String {
- break
- }
- } else if typ.Kind() == reflect.Slice {
- // []T or []*T
- if typ.Elem().Kind() != reflect.Ptr {
- break
- }
- } else if typ.Kind() == reflect.String {
- // The proto3 exception is for a string field,
- // which requires a colon.
- break
- }
- needColon = false
- }
- if needColon {
- return p.errorf("expected ':', found %q", tok.value)
- }
- p.back()
- }
- return nil
-}
-
-func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
- st := sv.Type()
- sprops := GetProperties(st)
- reqCount := sprops.reqCount
- var reqFieldErr error
- fieldSet := make(map[string]bool)
- // A struct is a sequence of "name: value", terminated by one of
- // '>' or '}', or the end of the input. A name may also be
- // "[extension]" or "[type/url]".
- //
- // The whole struct can also be an expanded Any message, like:
- // [type/url] < ... struct contents ... >
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- if tok.value == "[" {
- // Looks like an extension or an Any.
- //
- // TODO: Check whether we need to handle
- // namespace rooted names (e.g. ".something.Foo").
- extName, err := p.consumeExtName()
- if err != nil {
- return err
- }
-
- if s := strings.LastIndex(extName, "/"); s >= 0 {
- // If it contains a slash, it's an Any type URL.
- messageName := extName[s+1:]
- mt := MessageType(messageName)
- if mt == nil {
- return p.errorf("unrecognized message %q in google.protobuf.Any", messageName)
- }
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- // consume an optional colon
- if tok.value == ":" {
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- }
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- v := reflect.New(mt.Elem())
- if pe := p.readStruct(v.Elem(), terminator); pe != nil {
- return pe
- }
- b, err := Marshal(v.Interface().(Message))
- if err != nil {
- return p.errorf("failed to marshal message of type %q: %v", messageName, err)
- }
- if fieldSet["type_url"] {
- return p.errorf(anyRepeatedlyUnpacked, "type_url")
- }
- if fieldSet["value"] {
- return p.errorf(anyRepeatedlyUnpacked, "value")
- }
- sv.FieldByName("TypeUrl").SetString(extName)
- sv.FieldByName("Value").SetBytes(b)
- fieldSet["type_url"] = true
- fieldSet["value"] = true
- continue
- }
-
- var desc *ExtensionDesc
- // This could be faster, but it's functional.
- // TODO: Do something smarter than a linear scan.
- for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) {
- if d.Name == extName {
- desc = d
- break
- }
- }
- if desc == nil {
- return p.errorf("unrecognized extension %q", extName)
- }
-
- props := &Properties{}
- props.Parse(desc.Tag)
-
- typ := reflect.TypeOf(desc.ExtensionType)
- if err := p.checkForColon(props, typ); err != nil {
- return err
- }
-
- rep := desc.repeated()
-
- // Read the extension structure, and set it in
- // the value we're constructing.
- var ext reflect.Value
- if !rep {
- ext = reflect.New(typ).Elem()
- } else {
- ext = reflect.New(typ.Elem()).Elem()
- }
- if err := p.readAny(ext, props); err != nil {
- if _, ok := err.(*RequiredNotSetError); !ok {
- return err
- }
- reqFieldErr = err
- }
- ep := sv.Addr().Interface().(Message)
- if !rep {
- SetExtension(ep, desc, ext.Interface())
- } else {
- old, err := GetExtension(ep, desc)
- var sl reflect.Value
- if err == nil {
- sl = reflect.ValueOf(old) // existing slice
- } else {
- sl = reflect.MakeSlice(typ, 0, 1)
- }
- sl = reflect.Append(sl, ext)
- SetExtension(ep, desc, sl.Interface())
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- continue
- }
-
- // This is a normal, non-extension field.
- name := tok.value
- var dst reflect.Value
- fi, props, ok := structFieldByName(sprops, name)
- if ok {
- dst = sv.Field(fi)
- } else if oop, ok := sprops.OneofTypes[name]; ok {
- // It is a oneof.
- props = oop.Prop
- nv := reflect.New(oop.Type.Elem())
- dst = nv.Elem().Field(0)
- field := sv.Field(oop.Field)
- if !field.IsNil() {
- return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name)
- }
- field.Set(nv)
- }
- if !dst.IsValid() {
- return p.errorf("unknown field name %q in %v", name, st)
- }
-
- if dst.Kind() == reflect.Map {
- // Consume any colon.
- if err := p.checkForColon(props, dst.Type()); err != nil {
- return err
- }
-
- // Construct the map if it doesn't already exist.
- if dst.IsNil() {
- dst.Set(reflect.MakeMap(dst.Type()))
- }
- key := reflect.New(dst.Type().Key()).Elem()
- val := reflect.New(dst.Type().Elem()).Elem()
-
- // The map entry should be this sequence of tokens:
- // < key : KEY value : VALUE >
- // However, implementations may omit key or value, and technically
- // we should support them in any order. See b/28924776 for a time
- // this went wrong.
-
- tok := p.next()
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- switch tok.value {
- case "key":
- if err := p.consumeToken(":"); err != nil {
- return err
- }
- if err := p.readAny(key, props.MapKeyProp); err != nil {
- return err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- case "value":
- if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil {
- return err
- }
- if err := p.readAny(val, props.MapValProp); err != nil {
- return err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- default:
- p.back()
- return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value)
- }
- }
-
- dst.SetMapIndex(key, val)
- continue
- }
-
- // Check that it's not already set if it's not a repeated field.
- if !props.Repeated && fieldSet[name] {
- return p.errorf("non-repeated field %q was repeated", name)
- }
-
- if err := p.checkForColon(props, dst.Type()); err != nil {
- return err
- }
-
- // Parse into the field.
- fieldSet[name] = true
- if err := p.readAny(dst, props); err != nil {
- if _, ok := err.(*RequiredNotSetError); !ok {
- return err
- }
- reqFieldErr = err
- }
- if props.Required {
- reqCount--
- }
-
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
-
- }
-
- if reqCount > 0 {
- return p.missingRequiredFieldError(sv)
- }
- return reqFieldErr
-}
-
-// consumeExtName consumes extension name or expanded Any type URL and the
-// following ']'. It returns the name or URL consumed.
-func (p *textParser) consumeExtName() (string, error) {
- tok := p.next()
- if tok.err != nil {
- return "", tok.err
- }
-
- // If extension name or type url is quoted, it's a single token.
- if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {
- name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))
- if err != nil {
- return "", err
- }
- return name, p.consumeToken("]")
- }
-
- // Consume everything up to "]"
- var parts []string
- for tok.value != "]" {
- parts = append(parts, tok.value)
- tok = p.next()
- if tok.err != nil {
- return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
- }
- if p.done && tok.value != "]" {
- return "", p.errorf("unclosed type_url or extension name")
- }
- }
- return strings.Join(parts, ""), nil
-}
-
-// consumeOptionalSeparator consumes an optional semicolon or comma.
-// It is used in readStruct to provide backward compatibility.
-func (p *textParser) consumeOptionalSeparator() error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ";" && tok.value != "," {
- p.back()
- }
- return nil
-}
-
-func (p *textParser) readAny(v reflect.Value, props *Properties) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == "" {
- return p.errorf("unexpected EOF")
- }
-
- switch fv := v; fv.Kind() {
- case reflect.Slice:
- at := v.Type()
- if at.Elem().Kind() == reflect.Uint8 {
- // Special case for []byte
- if tok.value[0] != '"' && tok.value[0] != '\'' {
- // Deliberately written out here, as the error after
- // this switch statement would write "invalid []byte: ...",
- // which is not as user-friendly.
- return p.errorf("invalid string: %v", tok.value)
- }
- bytes := []byte(tok.unquoted)
- fv.Set(reflect.ValueOf(bytes))
- return nil
- }
- // Repeated field.
- if tok.value == "[" {
- // Repeated field with list notation, like [1,2,3].
- for {
- fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
- err := p.readAny(fv.Index(fv.Len()-1), props)
- if err != nil {
- return err
- }
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == "]" {
- break
- }
- if tok.value != "," {
- return p.errorf("Expected ']' or ',' found %q", tok.value)
- }
- }
- return nil
- }
- // One value of the repeated field.
- p.back()
- fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
- return p.readAny(fv.Index(fv.Len()-1), props)
- case reflect.Bool:
- // true/1/t/True or false/f/0/False.
- switch tok.value {
- case "true", "1", "t", "True":
- fv.SetBool(true)
- return nil
- case "false", "0", "f", "False":
- fv.SetBool(false)
- return nil
- }
- case reflect.Float32, reflect.Float64:
- v := tok.value
- // Ignore 'f' for compatibility with output generated by C++, but don't
- // remove 'f' when the value is "-inf" or "inf".
- if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" {
- v = v[:len(v)-1]
- }
- if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil {
- fv.SetFloat(f)
- return nil
- }
- case reflect.Int32:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- fv.SetInt(x)
- return nil
- }
-
- if len(props.Enum) == 0 {
- break
- }
- m, ok := enumValueMaps[props.Enum]
- if !ok {
- break
- }
- x, ok := m[tok.value]
- if !ok {
- break
- }
- fv.SetInt(int64(x))
- return nil
- case reflect.Int64:
- if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {
- fv.SetInt(x)
- return nil
- }
-
- case reflect.Ptr:
- // A basic field (indirected through pointer), or a repeated message/group
- p.back()
- fv.Set(reflect.New(fv.Type().Elem()))
- return p.readAny(fv.Elem(), props)
- case reflect.String:
- if tok.value[0] == '"' || tok.value[0] == '\'' {
- fv.SetString(tok.unquoted)
- return nil
- }
- case reflect.Struct:
- var terminator string
- switch tok.value {
- case "{":
- terminator = "}"
- case "<":
- terminator = ">"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- // TODO: Handle nested messages which implement encoding.TextUnmarshaler.
- return p.readStruct(fv, terminator)
- case reflect.Uint32:
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- fv.SetUint(uint64(x))
- return nil
- }
- case reflect.Uint64:
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- fv.SetUint(x)
- return nil
- }
- }
- return p.errorf("invalid %v: %v", v.Type(), tok.value)
-}
-
-// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb
-// before starting to unmarshal, so any existing data in pb is always removed.
-// If a required field is not set and no other error occurs,
-// UnmarshalText returns *RequiredNotSetError.
-func UnmarshalText(s string, pb Message) error {
- if um, ok := pb.(encoding.TextUnmarshaler); ok {
- return um.UnmarshalText([]byte(s))
- }
- pb.Reset()
- v := reflect.ValueOf(pb)
- return newTextParser(s).readStruct(v.Elem(), "")
-}
diff --git a/vendor/golang.org/x/net/AUTHORS b/vendor/golang.org/x/net/AUTHORS
deleted file mode 100644
index 15167cd7..00000000
--- a/vendor/golang.org/x/net/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/net/CONTRIBUTORS b/vendor/golang.org/x/net/CONTRIBUTORS
deleted file mode 100644
index 1c4577e9..00000000
--- a/vendor/golang.org/x/net/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE
deleted file mode 100644
index 6a66aea5..00000000
--- a/vendor/golang.org/x/net/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/net/PATENTS b/vendor/golang.org/x/net/PATENTS
deleted file mode 100644
index 73309904..00000000
--- a/vendor/golang.org/x/net/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go
deleted file mode 100644
index a3c021d3..00000000
--- a/vendor/golang.org/x/net/context/context.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package context defines the Context type, which carries deadlines,
-// cancelation signals, and other request-scoped values across API boundaries
-// and between processes.
-// As of Go 1.7 this package is available in the standard library under the
-// name context. https://golang.org/pkg/context.
-//
-// Incoming requests to a server should create a Context, and outgoing calls to
-// servers should accept a Context. The chain of function calls between must
-// propagate the Context, optionally replacing it with a modified copy created
-// using WithDeadline, WithTimeout, WithCancel, or WithValue.
-//
-// Programs that use Contexts should follow these rules to keep interfaces
-// consistent across packages and enable static analysis tools to check context
-// propagation:
-//
-// Do not store Contexts inside a struct type; instead, pass a Context
-// explicitly to each function that needs it. The Context should be the first
-// parameter, typically named ctx:
-//
-// func DoSomething(ctx context.Context, arg Arg) error {
-// // ... use ctx ...
-// }
-//
-// Do not pass a nil Context, even if a function permits it. Pass context.TODO
-// if you are unsure about which Context to use.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
-//
-// The same Context may be passed to functions running in different goroutines;
-// Contexts are safe for simultaneous use by multiple goroutines.
-//
-// See http://blog.golang.org/context for example code for a server that uses
-// Contexts.
-package context // import "golang.org/x/net/context"
-
-// Background returns a non-nil, empty Context. It is never canceled, has no
-// values, and has no deadline. It is typically used by the main function,
-// initialization, and tests, and as the top-level Context for incoming
-// requests.
-func Background() Context {
- return background
-}
-
-// TODO returns a non-nil, empty Context. Code should use context.TODO when
-// it's unclear which Context to use or it is not yet available (because the
-// surrounding function has not yet been extended to accept a Context
-// parameter). TODO is recognized by static analysis tools that determine
-// whether Contexts are propagated correctly in a program.
-func TODO() Context {
- return todo
-}
diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
deleted file mode 100644
index 37dc0cfd..00000000
--- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package ctxhttp provides helper functions for performing context-aware HTTP requests.
-package ctxhttp // import "golang.org/x/net/context/ctxhttp"
-
-import (
- "context"
- "io"
- "net/http"
- "net/url"
- "strings"
-)
-
-// Do sends an HTTP request with the provided http.Client and returns
-// an HTTP response.
-//
-// If the client is nil, http.DefaultClient is used.
-//
-// The provided ctx must be non-nil. If it is canceled or times out,
-// ctx.Err() will be returned.
-func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
- if client == nil {
- client = http.DefaultClient
- }
- resp, err := client.Do(req.WithContext(ctx))
- // If we got an error, and the context has been canceled,
- // the context's error is probably more useful.
- if err != nil {
- select {
- case <-ctx.Done():
- err = ctx.Err()
- default:
- }
- }
- return resp, err
-}
-
-// Get issues a GET request via the Do function.
-func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Head issues a HEAD request via the Do function.
-func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("HEAD", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Post issues a POST request via the Do function.
-func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
- req, err := http.NewRequest("POST", url, body)
- if err != nil {
- return nil, err
- }
- req.Header.Set("Content-Type", bodyType)
- return Do(ctx, client, req)
-}
-
-// PostForm issues a POST request via the Do function.
-func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
- return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
-}
diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go
deleted file mode 100644
index d20f52b7..00000000
--- a/vendor/golang.org/x/net/context/go17.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package context
-
-import (
- "context" // standard library's context, as of Go 1.7
- "time"
-)
-
-var (
- todo = context.TODO()
- background = context.Background()
-)
-
-// Canceled is the error returned by Context.Err when the context is canceled.
-var Canceled = context.Canceled
-
-// DeadlineExceeded is the error returned by Context.Err when the context's
-// deadline passes.
-var DeadlineExceeded = context.DeadlineExceeded
-
-// WithCancel returns a copy of parent with a new Done channel. The returned
-// context's Done channel is closed when the returned cancel function is called
-// or when the parent context's Done channel is closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
- ctx, f := context.WithCancel(parent)
- return ctx, CancelFunc(f)
-}
-
-// WithDeadline returns a copy of the parent context with the deadline adjusted
-// to be no later than d. If the parent's deadline is already earlier than d,
-// WithDeadline(parent, d) is semantically equivalent to parent. The returned
-// context's Done channel is closed when the deadline expires, when the returned
-// cancel function is called, or when the parent context's Done channel is
-// closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
- ctx, f := context.WithDeadline(parent, deadline)
- return ctx, CancelFunc(f)
-}
-
-// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete:
-//
-// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
-// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
-// defer cancel() // releases resources if slowOperation completes before timeout elapses
-// return slowOperation(ctx)
-// }
-func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
- return WithDeadline(parent, time.Now().Add(timeout))
-}
-
-// WithValue returns a copy of parent in which the value associated with key is
-// val.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
-func WithValue(parent Context, key interface{}, val interface{}) Context {
- return context.WithValue(parent, key, val)
-}
diff --git a/vendor/golang.org/x/net/context/go19.go b/vendor/golang.org/x/net/context/go19.go
deleted file mode 100644
index d88bd1db..00000000
--- a/vendor/golang.org/x/net/context/go19.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.9
-
-package context
-
-import "context" // standard library's context, as of Go 1.7
-
-// A Context carries a deadline, a cancelation signal, and other values across
-// API boundaries.
-//
-// Context's methods may be called by multiple goroutines simultaneously.
-type Context = context.Context
-
-// A CancelFunc tells an operation to abandon its work.
-// A CancelFunc does not wait for the work to stop.
-// After the first call, subsequent calls to a CancelFunc do nothing.
-type CancelFunc = context.CancelFunc
diff --git a/vendor/golang.org/x/net/context/pre_go17.go b/vendor/golang.org/x/net/context/pre_go17.go
deleted file mode 100644
index 0f35592d..00000000
--- a/vendor/golang.org/x/net/context/pre_go17.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !go1.7
-
-package context
-
-import (
- "errors"
- "fmt"
- "sync"
- "time"
-)
-
-// An emptyCtx is never canceled, has no values, and has no deadline. It is not
-// struct{}, since vars of this type must have distinct addresses.
-type emptyCtx int
-
-func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
- return
-}
-
-func (*emptyCtx) Done() <-chan struct{} {
- return nil
-}
-
-func (*emptyCtx) Err() error {
- return nil
-}
-
-func (*emptyCtx) Value(key interface{}) interface{} {
- return nil
-}
-
-func (e *emptyCtx) String() string {
- switch e {
- case background:
- return "context.Background"
- case todo:
- return "context.TODO"
- }
- return "unknown empty Context"
-}
-
-var (
- background = new(emptyCtx)
- todo = new(emptyCtx)
-)
-
-// Canceled is the error returned by Context.Err when the context is canceled.
-var Canceled = errors.New("context canceled")
-
-// DeadlineExceeded is the error returned by Context.Err when the context's
-// deadline passes.
-var DeadlineExceeded = errors.New("context deadline exceeded")
-
-// WithCancel returns a copy of parent with a new Done channel. The returned
-// context's Done channel is closed when the returned cancel function is called
-// or when the parent context's Done channel is closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
- c := newCancelCtx(parent)
- propagateCancel(parent, c)
- return c, func() { c.cancel(true, Canceled) }
-}
-
-// newCancelCtx returns an initialized cancelCtx.
-func newCancelCtx(parent Context) *cancelCtx {
- return &cancelCtx{
- Context: parent,
- done: make(chan struct{}),
- }
-}
-
-// propagateCancel arranges for child to be canceled when parent is.
-func propagateCancel(parent Context, child canceler) {
- if parent.Done() == nil {
- return // parent is never canceled
- }
- if p, ok := parentCancelCtx(parent); ok {
- p.mu.Lock()
- if p.err != nil {
- // parent has already been canceled
- child.cancel(false, p.err)
- } else {
- if p.children == nil {
- p.children = make(map[canceler]bool)
- }
- p.children[child] = true
- }
- p.mu.Unlock()
- } else {
- go func() {
- select {
- case <-parent.Done():
- child.cancel(false, parent.Err())
- case <-child.Done():
- }
- }()
- }
-}
-
-// parentCancelCtx follows a chain of parent references until it finds a
-// *cancelCtx. This function understands how each of the concrete types in this
-// package represents its parent.
-func parentCancelCtx(parent Context) (*cancelCtx, bool) {
- for {
- switch c := parent.(type) {
- case *cancelCtx:
- return c, true
- case *timerCtx:
- return c.cancelCtx, true
- case *valueCtx:
- parent = c.Context
- default:
- return nil, false
- }
- }
-}
-
-// removeChild removes a context from its parent.
-func removeChild(parent Context, child canceler) {
- p, ok := parentCancelCtx(parent)
- if !ok {
- return
- }
- p.mu.Lock()
- if p.children != nil {
- delete(p.children, child)
- }
- p.mu.Unlock()
-}
-
-// A canceler is a context type that can be canceled directly. The
-// implementations are *cancelCtx and *timerCtx.
-type canceler interface {
- cancel(removeFromParent bool, err error)
- Done() <-chan struct{}
-}
-
-// A cancelCtx can be canceled. When canceled, it also cancels any children
-// that implement canceler.
-type cancelCtx struct {
- Context
-
- done chan struct{} // closed by the first cancel call.
-
- mu sync.Mutex
- children map[canceler]bool // set to nil by the first cancel call
- err error // set to non-nil by the first cancel call
-}
-
-func (c *cancelCtx) Done() <-chan struct{} {
- return c.done
-}
-
-func (c *cancelCtx) Err() error {
- c.mu.Lock()
- defer c.mu.Unlock()
- return c.err
-}
-
-func (c *cancelCtx) String() string {
- return fmt.Sprintf("%v.WithCancel", c.Context)
-}
-
-// cancel closes c.done, cancels each of c's children, and, if
-// removeFromParent is true, removes c from its parent's children.
-func (c *cancelCtx) cancel(removeFromParent bool, err error) {
- if err == nil {
- panic("context: internal error: missing cancel error")
- }
- c.mu.Lock()
- if c.err != nil {
- c.mu.Unlock()
- return // already canceled
- }
- c.err = err
- close(c.done)
- for child := range c.children {
- // NOTE: acquiring the child's lock while holding parent's lock.
- child.cancel(false, err)
- }
- c.children = nil
- c.mu.Unlock()
-
- if removeFromParent {
- removeChild(c.Context, c)
- }
-}
-
-// WithDeadline returns a copy of the parent context with the deadline adjusted
-// to be no later than d. If the parent's deadline is already earlier than d,
-// WithDeadline(parent, d) is semantically equivalent to parent. The returned
-// context's Done channel is closed when the deadline expires, when the returned
-// cancel function is called, or when the parent context's Done channel is
-// closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
- if cur, ok := parent.Deadline(); ok && cur.Before(deadline) {
- // The current deadline is already sooner than the new one.
- return WithCancel(parent)
- }
- c := &timerCtx{
- cancelCtx: newCancelCtx(parent),
- deadline: deadline,
- }
- propagateCancel(parent, c)
- d := deadline.Sub(time.Now())
- if d <= 0 {
- c.cancel(true, DeadlineExceeded) // deadline has already passed
- return c, func() { c.cancel(true, Canceled) }
- }
- c.mu.Lock()
- defer c.mu.Unlock()
- if c.err == nil {
- c.timer = time.AfterFunc(d, func() {
- c.cancel(true, DeadlineExceeded)
- })
- }
- return c, func() { c.cancel(true, Canceled) }
-}
-
-// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to
-// implement Done and Err. It implements cancel by stopping its timer then
-// delegating to cancelCtx.cancel.
-type timerCtx struct {
- *cancelCtx
- timer *time.Timer // Under cancelCtx.mu.
-
- deadline time.Time
-}
-
-func (c *timerCtx) Deadline() (deadline time.Time, ok bool) {
- return c.deadline, true
-}
-
-func (c *timerCtx) String() string {
- return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now()))
-}
-
-func (c *timerCtx) cancel(removeFromParent bool, err error) {
- c.cancelCtx.cancel(false, err)
- if removeFromParent {
- // Remove this timerCtx from its parent cancelCtx's children.
- removeChild(c.cancelCtx.Context, c)
- }
- c.mu.Lock()
- if c.timer != nil {
- c.timer.Stop()
- c.timer = nil
- }
- c.mu.Unlock()
-}
-
-// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete:
-//
-// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
-// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
-// defer cancel() // releases resources if slowOperation completes before timeout elapses
-// return slowOperation(ctx)
-// }
-func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
- return WithDeadline(parent, time.Now().Add(timeout))
-}
-
-// WithValue returns a copy of parent in which the value associated with key is
-// val.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
-func WithValue(parent Context, key interface{}, val interface{}) Context {
- return &valueCtx{parent, key, val}
-}
-
-// A valueCtx carries a key-value pair. It implements Value for that key and
-// delegates all other calls to the embedded Context.
-type valueCtx struct {
- Context
- key, val interface{}
-}
-
-func (c *valueCtx) String() string {
- return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val)
-}
-
-func (c *valueCtx) Value(key interface{}) interface{} {
- if c.key == key {
- return c.val
- }
- return c.Context.Value(key)
-}
diff --git a/vendor/golang.org/x/net/context/pre_go19.go b/vendor/golang.org/x/net/context/pre_go19.go
deleted file mode 100644
index b105f80b..00000000
--- a/vendor/golang.org/x/net/context/pre_go19.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !go1.9
-
-package context
-
-import "time"
-
-// A Context carries a deadline, a cancelation signal, and other values across
-// API boundaries.
-//
-// Context's methods may be called by multiple goroutines simultaneously.
-type Context interface {
- // Deadline returns the time when work done on behalf of this context
- // should be canceled. Deadline returns ok==false when no deadline is
- // set. Successive calls to Deadline return the same results.
- Deadline() (deadline time.Time, ok bool)
-
- // Done returns a channel that's closed when work done on behalf of this
- // context should be canceled. Done may return nil if this context can
- // never be canceled. Successive calls to Done return the same value.
- //
- // WithCancel arranges for Done to be closed when cancel is called;
- // WithDeadline arranges for Done to be closed when the deadline
- // expires; WithTimeout arranges for Done to be closed when the timeout
- // elapses.
- //
- // Done is provided for use in select statements:
- //
- // // Stream generates values with DoSomething and sends them to out
- // // until DoSomething returns an error or ctx.Done is closed.
- // func Stream(ctx context.Context, out chan<- Value) error {
- // for {
- // v, err := DoSomething(ctx)
- // if err != nil {
- // return err
- // }
- // select {
- // case <-ctx.Done():
- // return ctx.Err()
- // case out <- v:
- // }
- // }
- // }
- //
- // See http://blog.golang.org/pipelines for more examples of how to use
- // a Done channel for cancelation.
- Done() <-chan struct{}
-
- // Err returns a non-nil error value after Done is closed. Err returns
- // Canceled if the context was canceled or DeadlineExceeded if the
- // context's deadline passed. No other values for Err are defined.
- // After Done is closed, successive calls to Err return the same value.
- Err() error
-
- // Value returns the value associated with this context for key, or nil
- // if no value is associated with key. Successive calls to Value with
- // the same key returns the same result.
- //
- // Use context values only for request-scoped data that transits
- // processes and API boundaries, not for passing optional parameters to
- // functions.
- //
- // A key identifies a specific value in a Context. Functions that wish
- // to store values in Context typically allocate a key in a global
- // variable then use that key as the argument to context.WithValue and
- // Context.Value. A key can be any type that supports equality;
- // packages should define keys as an unexported type to avoid
- // collisions.
- //
- // Packages that define a Context key should provide type-safe accessors
- // for the values stores using that key:
- //
- // // Package user defines a User type that's stored in Contexts.
- // package user
- //
- // import "golang.org/x/net/context"
- //
- // // User is the type of value stored in the Contexts.
- // type User struct {...}
- //
- // // key is an unexported type for keys defined in this package.
- // // This prevents collisions with keys defined in other packages.
- // type key int
- //
- // // userKey is the key for user.User values in Contexts. It is
- // // unexported; clients use user.NewContext and user.FromContext
- // // instead of using this key directly.
- // var userKey key = 0
- //
- // // NewContext returns a new Context that carries value u.
- // func NewContext(ctx context.Context, u *User) context.Context {
- // return context.WithValue(ctx, userKey, u)
- // }
- //
- // // FromContext returns the User value stored in ctx, if any.
- // func FromContext(ctx context.Context) (*User, bool) {
- // u, ok := ctx.Value(userKey).(*User)
- // return u, ok
- // }
- Value(key interface{}) interface{}
-}
-
-// A CancelFunc tells an operation to abandon its work.
-// A CancelFunc does not wait for the work to stop.
-// After the first call, subsequent calls to a CancelFunc do nothing.
-type CancelFunc func()
diff --git a/vendor/golang.org/x/oauth2/AUTHORS b/vendor/golang.org/x/oauth2/AUTHORS
deleted file mode 100644
index 15167cd7..00000000
--- a/vendor/golang.org/x/oauth2/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/oauth2/CONTRIBUTORS b/vendor/golang.org/x/oauth2/CONTRIBUTORS
deleted file mode 100644
index 1c4577e9..00000000
--- a/vendor/golang.org/x/oauth2/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/oauth2/LICENSE
+++ b/vendor/golang.org/x/oauth2/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md
index 0f443e69..48dbb9d8 100644
--- a/vendor/golang.org/x/oauth2/README.md
+++ b/vendor/golang.org/x/oauth2/README.md
@@ -1,35 +1,35 @@
# OAuth2 for Go
+[![Go Reference](https://pkg.go.dev/badge/golang.org/x/oauth2.svg)](https://pkg.go.dev/golang.org/x/oauth2)
[![Build Status](https://travis-ci.org/golang/oauth2.svg?branch=master)](https://travis-ci.org/golang/oauth2)
-[![GoDoc](https://godoc.org/golang.org/x/oauth2?status.svg)](https://godoc.org/golang.org/x/oauth2)
oauth2 package contains a client implementation for OAuth 2.0 spec.
-## Installation
+See pkg.go.dev for further documentation and examples.
-~~~~
-go get golang.org/x/oauth2
-~~~~
+* [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2)
+* [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google)
-Or you can manually git clone the repository to
-`$(go env GOPATH)/src/golang.org/x/oauth2`.
+## Policy for new endpoints
-See godoc for further documentation and examples.
+We no longer accept new provider-specific packages in this repo if all
+they do is add a single endpoint variable. If you just want to add a
+single endpoint, add it to the
+[pkg.go.dev/golang.org/x/oauth2/endpoints](https://pkg.go.dev/golang.org/x/oauth2/endpoints)
+package.
-* [godoc.org/golang.org/x/oauth2](http://godoc.org/golang.org/x/oauth2)
-* [godoc.org/golang.org/x/oauth2/google](http://godoc.org/golang.org/x/oauth2/google)
+## Report Issues / Send Patches
-## Policy for new packages
+The main issue tracker for the oauth2 repository is located at
+https://github.com/golang/oauth2/issues.
-We no longer accept new provider-specific packages in this repo. For
-defining provider endpoints and provider-specific OAuth2 behavior, we
-encourage you to create packages elsewhere. We'll keep the existing
-packages for compatibility.
+This repository uses Gerrit for code changes. To learn how to submit changes to
+this repository, see https://go.dev/doc/contribute.
-## Report Issues / Send Patches
+The git repository is https://go.googlesource.com/oauth2.
-This repository uses Gerrit for code changes. To learn how to submit changes to
-this repository, see https://golang.org/doc/contribute.html.
+Note:
-The main issue tracker for the oauth2 repository is located at
-https://github.com/golang/oauth2/issues.
+* Excluding trivial changes, all contributions should be connected to an existing issue.
+* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted.
+* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2).
diff --git a/vendor/golang.org/x/oauth2/deviceauth.go b/vendor/golang.org/x/oauth2/deviceauth.go
new file mode 100644
index 00000000..e99c92f3
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/deviceauth.go
@@ -0,0 +1,198 @@
+package oauth2
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+ "time"
+
+ "golang.org/x/oauth2/internal"
+)
+
+// https://datatracker.ietf.org/doc/html/rfc8628#section-3.5
+const (
+ errAuthorizationPending = "authorization_pending"
+ errSlowDown = "slow_down"
+ errAccessDenied = "access_denied"
+ errExpiredToken = "expired_token"
+)
+
+// DeviceAuthResponse describes a successful RFC 8628 Device Authorization Response
+// https://datatracker.ietf.org/doc/html/rfc8628#section-3.2
+type DeviceAuthResponse struct {
+ // DeviceCode
+ DeviceCode string `json:"device_code"`
+ // UserCode is the code the user should enter at the verification uri
+ UserCode string `json:"user_code"`
+ // VerificationURI is where user should enter the user code
+ VerificationURI string `json:"verification_uri"`
+ // VerificationURIComplete (if populated) includes the user code in the verification URI. This is typically shown to the user in non-textual form, such as a QR code.
+ VerificationURIComplete string `json:"verification_uri_complete,omitempty"`
+ // Expiry is when the device code and user code expire
+ Expiry time.Time `json:"expires_in,omitempty"`
+ // Interval is the duration in seconds that Poll should wait between requests
+ Interval int64 `json:"interval,omitempty"`
+}
+
+func (d DeviceAuthResponse) MarshalJSON() ([]byte, error) {
+ type Alias DeviceAuthResponse
+ var expiresIn int64
+ if !d.Expiry.IsZero() {
+ expiresIn = int64(time.Until(d.Expiry).Seconds())
+ }
+ return json.Marshal(&struct {
+ ExpiresIn int64 `json:"expires_in,omitempty"`
+ *Alias
+ }{
+ ExpiresIn: expiresIn,
+ Alias: (*Alias)(&d),
+ })
+
+}
+
+func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
+ type Alias DeviceAuthResponse
+ aux := &struct {
+ ExpiresIn int64 `json:"expires_in"`
+ // workaround misspelling of verification_uri
+ VerificationURL string `json:"verification_url"`
+ *Alias
+ }{
+ Alias: (*Alias)(c),
+ }
+ if err := json.Unmarshal(data, &aux); err != nil {
+ return err
+ }
+ if aux.ExpiresIn != 0 {
+ c.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn))
+ }
+ if c.VerificationURI == "" {
+ c.VerificationURI = aux.VerificationURL
+ }
+ return nil
+}
+
+// DeviceAuth returns a device auth struct which contains a device code
+// and authorization information provided for users to enter on another device.
+func (c *Config) DeviceAuth(ctx context.Context, opts ...AuthCodeOption) (*DeviceAuthResponse, error) {
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.1
+ v := url.Values{
+ "client_id": {c.ClientID},
+ }
+ if len(c.Scopes) > 0 {
+ v.Set("scope", strings.Join(c.Scopes, " "))
+ }
+ for _, opt := range opts {
+ opt.setValue(v)
+ }
+ return retrieveDeviceAuth(ctx, c, v)
+}
+
+func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAuthResponse, error) {
+ if c.Endpoint.DeviceAuthURL == "" {
+ return nil, errors.New("endpoint missing DeviceAuthURL")
+ }
+
+ req, err := http.NewRequest("POST", c.Endpoint.DeviceAuthURL, strings.NewReader(v.Encode()))
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+ req.Header.Set("Accept", "application/json")
+
+ t := time.Now()
+ r, err := internal.ContextClient(ctx).Do(req)
+ if err != nil {
+ return nil, err
+ }
+
+ body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20))
+ if err != nil {
+ return nil, fmt.Errorf("oauth2: cannot auth device: %v", err)
+ }
+ if code := r.StatusCode; code < 200 || code > 299 {
+ return nil, &RetrieveError{
+ Response: r,
+ Body: body,
+ }
+ }
+
+ da := &DeviceAuthResponse{}
+ err = json.Unmarshal(body, &da)
+ if err != nil {
+ return nil, fmt.Errorf("unmarshal %s", err)
+ }
+
+ if !da.Expiry.IsZero() {
+ // Make a small adjustment to account for time taken by the request
+ da.Expiry = da.Expiry.Add(-time.Since(t))
+ }
+
+ return da, nil
+}
+
+// DeviceAccessToken polls the server to exchange a device code for a token.
+func (c *Config) DeviceAccessToken(ctx context.Context, da *DeviceAuthResponse, opts ...AuthCodeOption) (*Token, error) {
+ if !da.Expiry.IsZero() {
+ var cancel context.CancelFunc
+ ctx, cancel = context.WithDeadline(ctx, da.Expiry)
+ defer cancel()
+ }
+
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.4
+ v := url.Values{
+ "client_id": {c.ClientID},
+ "grant_type": {"urn:ietf:params:oauth:grant-type:device_code"},
+ "device_code": {da.DeviceCode},
+ }
+ if len(c.Scopes) > 0 {
+ v.Set("scope", strings.Join(c.Scopes, " "))
+ }
+ for _, opt := range opts {
+ opt.setValue(v)
+ }
+
+ // "If no value is provided, clients MUST use 5 as the default."
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.2
+ interval := da.Interval
+ if interval == 0 {
+ interval = 5
+ }
+
+ ticker := time.NewTicker(time.Duration(interval) * time.Second)
+ defer ticker.Stop()
+ for {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case <-ticker.C:
+ tok, err := retrieveToken(ctx, c, v)
+ if err == nil {
+ return tok, nil
+ }
+
+ e, ok := err.(*RetrieveError)
+ if !ok {
+ return nil, err
+ }
+ switch e.ErrorCode {
+ case errSlowDown:
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.5
+ // "the interval MUST be increased by 5 seconds for this and all subsequent requests"
+ interval += 5
+ ticker.Reset(time.Duration(interval) * time.Second)
+ case errAuthorizationPending:
+ // Do nothing.
+ case errAccessDenied, errExpiredToken:
+ fallthrough
+ default:
+ return tok, err
+ }
+ }
+ }
+}
diff --git a/vendor/golang.org/x/oauth2/go.mod b/vendor/golang.org/x/oauth2/go.mod
index b3457815..d73aa699 100644
--- a/vendor/golang.org/x/oauth2/go.mod
+++ b/vendor/golang.org/x/oauth2/go.mod
@@ -1,10 +1,8 @@
module golang.org/x/oauth2
-go 1.11
+go 1.18
require (
- cloud.google.com/go v0.34.0
- golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
- golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
- google.golang.org/appengine v1.4.0
+ cloud.google.com/go/compute/metadata v0.3.0
+ github.com/google/go-cmp v0.5.9
)
diff --git a/vendor/golang.org/x/oauth2/go.sum b/vendor/golang.org/x/oauth2/go.sum
index 6f0079b0..0c905286 100644
--- a/vendor/golang.org/x/oauth2/go.sum
+++ b/vendor/golang.org/x/oauth2/go.sum
@@ -1,12 +1,4 @@
-cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
+cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
diff --git a/vendor/golang.org/x/oauth2/internal/client_appengine.go b/vendor/golang.org/x/oauth2/internal/client_appengine.go
deleted file mode 100644
index 74348718..00000000
--- a/vendor/golang.org/x/oauth2/internal/client_appengine.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build appengine
-
-package internal
-
-import "google.golang.org/appengine/urlfetch"
-
-func init() {
- appengineClientHook = urlfetch.Client
-}
diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go
index c0ab196c..14989bea 100644
--- a/vendor/golang.org/x/oauth2/internal/oauth2.go
+++ b/vendor/golang.org/x/oauth2/internal/oauth2.go
@@ -14,7 +14,7 @@ import (
// ParseKey converts the binary contents of a private key file
// to an *rsa.PrivateKey. It detects whether the private key is in a
-// PEM container or not. If so, it extracts the the private key
+// PEM container or not. If so, it extracts the private key
// from PEM container before conversion. It only supports PEM
// containers with no passphrase.
func ParseKey(key []byte) (*rsa.PrivateKey, error) {
diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go
index 355c3869..e83ddeef 100644
--- a/vendor/golang.org/x/oauth2/internal/token.go
+++ b/vendor/golang.org/x/oauth2/internal/token.go
@@ -18,9 +18,8 @@ import (
"strconv"
"strings"
"sync"
+ "sync/atomic"
"time"
-
- "golang.org/x/net/context/ctxhttp"
)
// Token represents the credentials used to authorize
@@ -57,12 +56,18 @@ type Token struct {
}
// tokenJSON is the struct representing the HTTP response from OAuth2
-// providers returning a token in JSON form.
+// providers returning a token or error in JSON form.
+// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
type tokenJSON struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
ExpiresIn expirationTime `json:"expires_in"` // at least PayPal returns string, while most return number
+ // error fields
+ // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
+ ErrorCode string `json:"error"`
+ ErrorDescription string `json:"error_description"`
+ ErrorURI string `json:"error_uri"`
}
func (e *tokenJSON) expiry() (t time.Time) {
@@ -111,41 +116,60 @@ const (
AuthStyleInHeader AuthStyle = 2
)
-// authStyleCache is the set of tokenURLs we've successfully used via
+// LazyAuthStyleCache is a backwards compatibility compromise to let Configs
+// have a lazily-initialized AuthStyleCache.
+//
+// The two users of this, oauth2.Config and oauth2/clientcredentials.Config,
+// both would ideally just embed an unexported AuthStyleCache but because both
+// were historically allowed to be copied by value we can't retroactively add an
+// uncopyable Mutex to them.
+//
+// We could use an atomic.Pointer, but that was added recently enough (in Go
+// 1.18) that we'd break Go 1.17 users where the tests as of 2023-08-03
+// still pass. By using an atomic.Value, it supports both Go 1.17 and
+// copying by value, even if that's not ideal.
+type LazyAuthStyleCache struct {
+ v atomic.Value // of *AuthStyleCache
+}
+
+func (lc *LazyAuthStyleCache) Get() *AuthStyleCache {
+ if c, ok := lc.v.Load().(*AuthStyleCache); ok {
+ return c
+ }
+ c := new(AuthStyleCache)
+ if !lc.v.CompareAndSwap(nil, c) {
+ c = lc.v.Load().(*AuthStyleCache)
+ }
+ return c
+}
+
+// AuthStyleCache is the set of tokenURLs we've successfully used via
// RetrieveToken and which style auth we ended up using.
// It's called a cache, but it doesn't (yet?) shrink. It's expected that
// the set of OAuth2 servers a program contacts over time is fixed and
// small.
-var authStyleCache struct {
- sync.Mutex
- m map[string]AuthStyle // keyed by tokenURL
-}
-
-// ResetAuthCache resets the global authentication style cache used
-// for AuthStyleUnknown token requests.
-func ResetAuthCache() {
- authStyleCache.Lock()
- defer authStyleCache.Unlock()
- authStyleCache.m = nil
+type AuthStyleCache struct {
+ mu sync.Mutex
+ m map[string]AuthStyle // keyed by tokenURL
}
// lookupAuthStyle reports which auth style we last used with tokenURL
// when calling RetrieveToken and whether we have ever done so.
-func lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {
- authStyleCache.Lock()
- defer authStyleCache.Unlock()
- style, ok = authStyleCache.m[tokenURL]
+func (c *AuthStyleCache) lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ style, ok = c.m[tokenURL]
return
}
// setAuthStyle adds an entry to authStyleCache, documented above.
-func setAuthStyle(tokenURL string, v AuthStyle) {
- authStyleCache.Lock()
- defer authStyleCache.Unlock()
- if authStyleCache.m == nil {
- authStyleCache.m = make(map[string]AuthStyle)
+func (c *AuthStyleCache) setAuthStyle(tokenURL string, v AuthStyle) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ if c.m == nil {
+ c.m = make(map[string]AuthStyle)
}
- authStyleCache.m[tokenURL] = v
+ c.m[tokenURL] = v
}
// newTokenRequest returns a new *http.Request to retrieve a new token
@@ -185,10 +209,10 @@ func cloneURLValues(v url.Values) url.Values {
return v2
}
-func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle) (*Token, error) {
+func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle, styleCache *AuthStyleCache) (*Token, error) {
needsAuthStyleProbe := authStyle == 0
if needsAuthStyleProbe {
- if style, ok := lookupAuthStyle(tokenURL); ok {
+ if style, ok := styleCache.lookupAuthStyle(tokenURL); ok {
authStyle = style
needsAuthStyleProbe = false
} else {
@@ -218,7 +242,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
token, err = doTokenRoundTrip(ctx, req)
}
if needsAuthStyleProbe && err == nil {
- setAuthStyle(tokenURL, authStyle)
+ styleCache.setAuthStyle(tokenURL, authStyle)
}
// Don't overwrite `RefreshToken` with an empty value
// if this was a token refreshing request.
@@ -229,7 +253,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
}
func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
- r, err := ctxhttp.Do(ctx, ContextClient(ctx), req)
+ r, err := ContextClient(ctx).Do(req.WithContext(ctx))
if err != nil {
return nil, err
}
@@ -238,21 +262,29 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
if err != nil {
return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err)
}
- if code := r.StatusCode; code < 200 || code > 299 {
- return nil, &RetrieveError{
- Response: r,
- Body: body,
- }
+
+ failureStatus := r.StatusCode < 200 || r.StatusCode > 299
+ retrieveError := &RetrieveError{
+ Response: r,
+ Body: body,
+ // attempt to populate error detail below
}
var token *Token
content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type"))
switch content {
case "application/x-www-form-urlencoded", "text/plain":
+ // some endpoints return a query string
vals, err := url.ParseQuery(string(body))
if err != nil {
- return nil, err
+ if failureStatus {
+ return nil, retrieveError
+ }
+ return nil, fmt.Errorf("oauth2: cannot parse response: %v", err)
}
+ retrieveError.ErrorCode = vals.Get("error")
+ retrieveError.ErrorDescription = vals.Get("error_description")
+ retrieveError.ErrorURI = vals.Get("error_uri")
token = &Token{
AccessToken: vals.Get("access_token"),
TokenType: vals.Get("token_type"),
@@ -267,8 +299,14 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
default:
var tj tokenJSON
if err = json.Unmarshal(body, &tj); err != nil {
- return nil, err
+ if failureStatus {
+ return nil, retrieveError
+ }
+ return nil, fmt.Errorf("oauth2: cannot parse json: %v", err)
}
+ retrieveError.ErrorCode = tj.ErrorCode
+ retrieveError.ErrorDescription = tj.ErrorDescription
+ retrieveError.ErrorURI = tj.ErrorURI
token = &Token{
AccessToken: tj.AccessToken,
TokenType: tj.TokenType,
@@ -278,17 +316,37 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
}
json.Unmarshal(body, &token.Raw) // no error checks for optional fields
}
+ // according to spec, servers should respond status 400 in error case
+ // https://www.rfc-editor.org/rfc/rfc6749#section-5.2
+ // but some unorthodox servers respond 200 in error case
+ if failureStatus || retrieveError.ErrorCode != "" {
+ return nil, retrieveError
+ }
if token.AccessToken == "" {
return nil, errors.New("oauth2: server response missing access_token")
}
return token, nil
}
+// mirrors oauth2.RetrieveError
type RetrieveError struct {
- Response *http.Response
- Body []byte
+ Response *http.Response
+ Body []byte
+ ErrorCode string
+ ErrorDescription string
+ ErrorURI string
}
func (r *RetrieveError) Error() string {
+ if r.ErrorCode != "" {
+ s := fmt.Sprintf("oauth2: %q", r.ErrorCode)
+ if r.ErrorDescription != "" {
+ s += fmt.Sprintf(" %q", r.ErrorDescription)
+ }
+ if r.ErrorURI != "" {
+ s += fmt.Sprintf(" %q", r.ErrorURI)
+ }
+ return s
+ }
return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body)
}
diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go
index 572074a6..b9db01dd 100644
--- a/vendor/golang.org/x/oauth2/internal/transport.go
+++ b/vendor/golang.org/x/oauth2/internal/transport.go
@@ -18,16 +18,11 @@ var HTTPClient ContextKey
// because nobody else can create a ContextKey, being unexported.
type ContextKey struct{}
-var appengineClientHook func(context.Context) *http.Client
-
func ContextClient(ctx context.Context) *http.Client {
if ctx != nil {
if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok {
return hc
}
}
- if appengineClientHook != nil {
- return appengineClientHook(ctx)
- }
return http.DefaultClient
}
diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go
index 291df5c8..74f052aa 100644
--- a/vendor/golang.org/x/oauth2/oauth2.go
+++ b/vendor/golang.org/x/oauth2/oauth2.go
@@ -16,6 +16,7 @@ import (
"net/url"
"strings"
"sync"
+ "time"
"golang.org/x/oauth2/internal"
)
@@ -55,8 +56,12 @@ type Config struct {
// the OAuth flow, after the resource owner's URLs.
RedirectURL string
- // Scope specifies optional requested permissions.
+ // Scopes specifies optional requested permissions.
Scopes []string
+
+ // authStyleCache caches which auth style to use when Endpoint.AuthStyle is
+ // the zero value (AuthStyleAutoDetect).
+ authStyleCache internal.LazyAuthStyleCache
}
// A TokenSource is anything that can return a token.
@@ -70,8 +75,9 @@ type TokenSource interface {
// Endpoint represents an OAuth 2.0 provider's authorization and token
// endpoint URLs.
type Endpoint struct {
- AuthURL string
- TokenURL string
+ AuthURL string
+ DeviceAuthURL string
+ TokenURL string
// AuthStyle optionally specifies how the endpoint wants the
// client ID & client secret sent. The zero value means to
@@ -138,15 +144,19 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page
// that asks for permissions for the required scopes explicitly.
//
-// State is a token to protect the user from CSRF attacks. You must
-// always provide a non-empty string and validate that it matches the
-// the state query parameter on your redirect callback.
-// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info.
+// State is an opaque value used by the client to maintain state between the
+// request and callback. The authorization server includes this value when
+// redirecting the user agent back to the client.
//
// Opts may include AccessTypeOnline or AccessTypeOffline, as well
// as ApprovalForce.
-// It can also be used to pass the PKCE challenge.
-// See https://www.oauth.com/oauth2-servers/pkce/ for more info.
+//
+// To protect against CSRF attacks, opts should include a PKCE challenge
+// (S256ChallengeOption). Not all servers support PKCE. An alternative is to
+// generate a random state parameter and verify it after exchange.
+// See https://datatracker.ietf.org/doc/html/rfc6749#section-10.12 (predating
+// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
+// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
var buf bytes.Buffer
buf.WriteString(c.Endpoint.AuthURL)
@@ -161,7 +171,6 @@ func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
v.Set("scope", strings.Join(c.Scopes, " "))
}
if state != "" {
- // TODO(light): Docs say never to omit state; don't allow empty.
v.Set("state", state)
}
for _, opt := range opts {
@@ -206,10 +215,11 @@ func (c *Config) PasswordCredentialsToken(ctx context.Context, username, passwor
// The provided context optionally controls which HTTP client is used. See the HTTPClient variable.
//
// The code will be in the *http.Request.FormValue("code"). Before
-// calling Exchange, be sure to validate FormValue("state").
+// calling Exchange, be sure to validate FormValue("state") if you are
+// using it to protect against CSRF attacks.
//
-// Opts may include the PKCE verifier code if previously used in AuthCodeURL.
-// See https://www.oauth.com/oauth2-servers/pkce/ for more info.
+// If using PKCE to protect against CSRF attacks, opts should include a
+// VerifierOption.
func (c *Config) Exchange(ctx context.Context, code string, opts ...AuthCodeOption) (*Token, error) {
v := url.Values{
"grant_type": {"authorization_code"},
@@ -290,6 +300,8 @@ type reuseTokenSource struct {
mu sync.Mutex // guards t
t *Token
+
+ expiryDelta time.Duration
}
// Token returns the current token if it's still valid, else will
@@ -305,6 +317,7 @@ func (s *reuseTokenSource) Token() (*Token, error) {
if err != nil {
return nil, err
}
+ t.expiryDelta = s.expiryDelta
s.t = t
return t, nil
}
@@ -379,3 +392,30 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource {
new: src,
}
}
+
+// ReuseTokenSourceWithExpiry returns a TokenSource that acts in the same manner as the
+// TokenSource returned by ReuseTokenSource, except the expiry buffer is
+// configurable. The expiration time of a token is calculated as
+// t.Expiry.Add(-earlyExpiry).
+func ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource {
+ // Don't wrap a reuseTokenSource in itself. That would work,
+ // but cause an unnecessary number of mutex operations.
+ // Just build the equivalent one.
+ if rt, ok := src.(*reuseTokenSource); ok {
+ if t == nil {
+ // Just use it directly, but set the expiryDelta to earlyExpiry,
+ // so the behavior matches what the user expects.
+ rt.expiryDelta = earlyExpiry
+ return rt
+ }
+ src = rt.new
+ }
+ if t != nil {
+ t.expiryDelta = earlyExpiry
+ }
+ return &reuseTokenSource{
+ t: t,
+ new: src,
+ expiryDelta: earlyExpiry,
+ }
+}
diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go
new file mode 100644
index 00000000..50593b6d
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/pkce.go
@@ -0,0 +1,68 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+package oauth2
+
+import (
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/base64"
+ "net/url"
+)
+
+const (
+ codeChallengeKey = "code_challenge"
+ codeChallengeMethodKey = "code_challenge_method"
+ codeVerifierKey = "code_verifier"
+)
+
+// GenerateVerifier generates a PKCE code verifier with 32 octets of randomness.
+// This follows recommendations in RFC 7636.
+//
+// A fresh verifier should be generated for each authorization.
+// S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL
+// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange
+// (or Config.DeviceAccessToken).
+func GenerateVerifier() string {
+ // "RECOMMENDED that the output of a suitable random number generator be
+ // used to create a 32-octet sequence. The octet sequence is then
+ // base64url-encoded to produce a 43-octet URL-safe string to use as the
+ // code verifier."
+ // https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
+ data := make([]byte, 32)
+ if _, err := rand.Read(data); err != nil {
+ panic(err)
+ }
+ return base64.RawURLEncoding.EncodeToString(data)
+}
+
+// VerifierOption returns a PKCE code verifier AuthCodeOption. It should be
+// passed to Config.Exchange or Config.DeviceAccessToken only.
+func VerifierOption(verifier string) AuthCodeOption {
+ return setParam{k: codeVerifierKey, v: verifier}
+}
+
+// S256ChallengeFromVerifier returns a PKCE code challenge derived from verifier with method S256.
+//
+// Prefer to use S256ChallengeOption where possible.
+func S256ChallengeFromVerifier(verifier string) string {
+ sha := sha256.Sum256([]byte(verifier))
+ return base64.RawURLEncoding.EncodeToString(sha[:])
+}
+
+// S256ChallengeOption derives a PKCE code challenge derived from verifier with
+// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess
+// only.
+func S256ChallengeOption(verifier string) AuthCodeOption {
+ return challengeOption{
+ challenge_method: "S256",
+ challenge: S256ChallengeFromVerifier(verifier),
+ }
+}
+
+type challengeOption struct{ challenge_method, challenge string }
+
+func (p challengeOption) setValue(m url.Values) {
+ m.Set(codeChallengeMethodKey, p.challenge_method)
+ m.Set(codeChallengeKey, p.challenge)
+}
diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go
index 82272034..109997d7 100644
--- a/vendor/golang.org/x/oauth2/token.go
+++ b/vendor/golang.org/x/oauth2/token.go
@@ -16,10 +16,10 @@ import (
"golang.org/x/oauth2/internal"
)
-// expiryDelta determines how earlier a token should be considered
+// defaultExpiryDelta determines how earlier a token should be considered
// expired than its actual expiration time. It is used to avoid late
// expirations due to client-server time mismatches.
-const expiryDelta = 10 * time.Second
+const defaultExpiryDelta = 10 * time.Second
// Token represents the credentials used to authorize
// the requests to access protected resources on the OAuth 2.0
@@ -49,9 +49,21 @@ type Token struct {
// mechanisms for that TokenSource will not be used.
Expiry time.Time `json:"expiry,omitempty"`
+ // ExpiresIn is the OAuth2 wire format "expires_in" field,
+ // which specifies how many seconds later the token expires,
+ // relative to an unknown time base approximately around "now".
+ // It is the application's responsibility to populate
+ // `Expiry` from `ExpiresIn` when required.
+ ExpiresIn int64 `json:"expires_in,omitempty"`
+
// raw optionally contains extra metadata from the server
// when updating a token.
raw interface{}
+
+ // expiryDelta is used to calculate when a token is considered
+ // expired, by subtracting from Expiry. If zero, defaultExpiryDelta
+ // is used.
+ expiryDelta time.Duration
}
// Type returns t.TokenType if non-empty, else "Bearer".
@@ -127,6 +139,11 @@ func (t *Token) expired() bool {
if t.Expiry.IsZero() {
return false
}
+
+ expiryDelta := defaultExpiryDelta
+ if t.expiryDelta != 0 {
+ expiryDelta = t.expiryDelta
+ }
return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow())
}
@@ -154,7 +171,7 @@ func tokenFromInternal(t *internal.Token) *Token {
// This token is then mapped from *internal.Token into an *oauth2.Token which is returned along
// with an error..
func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) {
- tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle))
+ tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle), c.authStyleCache.Get())
if err != nil {
if rErr, ok := err.(*internal.RetrieveError); ok {
return nil, (*RetrieveError)(rErr)
@@ -165,14 +182,31 @@ func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error)
}
// RetrieveError is the error returned when the token endpoint returns a
-// non-2XX HTTP status code.
+// non-2XX HTTP status code or populates RFC 6749's 'error' parameter.
+// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
type RetrieveError struct {
Response *http.Response
// Body is the body that was consumed by reading Response.Body.
// It may be truncated.
Body []byte
+ // ErrorCode is RFC 6749's 'error' parameter.
+ ErrorCode string
+ // ErrorDescription is RFC 6749's 'error_description' parameter.
+ ErrorDescription string
+ // ErrorURI is RFC 6749's 'error_uri' parameter.
+ ErrorURI string
}
func (r *RetrieveError) Error() string {
+ if r.ErrorCode != "" {
+ s := fmt.Sprintf("oauth2: %q", r.ErrorCode)
+ if r.ErrorDescription != "" {
+ s += fmt.Sprintf(" %q", r.ErrorDescription)
+ }
+ if r.ErrorURI != "" {
+ s += fmt.Sprintf(" %q", r.ErrorURI)
+ }
+ return s
+ }
return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body)
}
diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go
index aa0d34f1..90657915 100644
--- a/vendor/golang.org/x/oauth2/transport.go
+++ b/vendor/golang.org/x/oauth2/transport.go
@@ -6,7 +6,7 @@ package oauth2
import (
"errors"
- "io"
+ "log"
"net/http"
"sync"
)
@@ -25,9 +25,6 @@ type Transport struct {
// Base is the base RoundTripper used to make HTTP requests.
// If nil, http.DefaultTransport is used.
Base http.RoundTripper
-
- mu sync.Mutex // guards modReq
- modReq map[*http.Request]*http.Request // original -> modified
}
// RoundTrip authorizes and authenticates the request with an
@@ -52,35 +49,22 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
req2 := cloneRequest(req) // per RoundTripper contract
token.SetAuthHeader(req2)
- t.setModReq(req, req2)
- res, err := t.base().RoundTrip(req2)
- // req.Body is assumed to have been closed by the base RoundTripper.
+ // req.Body is assumed to be closed by the base RoundTripper.
reqBodyClosed = true
-
- if err != nil {
- t.setModReq(req, nil)
- return nil, err
- }
- res.Body = &onEOFReader{
- rc: res.Body,
- fn: func() { t.setModReq(req, nil) },
- }
- return res, nil
+ return t.base().RoundTrip(req2)
}
-// CancelRequest cancels an in-flight request by closing its connection.
+var cancelOnce sync.Once
+
+// CancelRequest does nothing. It used to be a legacy cancellation mechanism
+// but now only it only logs on first use to warn that it's deprecated.
+//
+// Deprecated: use contexts for cancellation instead.
func (t *Transport) CancelRequest(req *http.Request) {
- type canceler interface {
- CancelRequest(*http.Request)
- }
- if cr, ok := t.base().(canceler); ok {
- t.mu.Lock()
- modReq := t.modReq[req]
- delete(t.modReq, req)
- t.mu.Unlock()
- cr.CancelRequest(modReq)
- }
+ cancelOnce.Do(func() {
+ log.Printf("deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts")
+ })
}
func (t *Transport) base() http.RoundTripper {
@@ -90,19 +74,6 @@ func (t *Transport) base() http.RoundTripper {
return http.DefaultTransport
}
-func (t *Transport) setModReq(orig, mod *http.Request) {
- t.mu.Lock()
- defer t.mu.Unlock()
- if t.modReq == nil {
- t.modReq = make(map[*http.Request]*http.Request)
- }
- if mod == nil {
- delete(t.modReq, orig)
- } else {
- t.modReq[orig] = mod
- }
-}
-
// cloneRequest returns a clone of the provided *http.Request.
// The clone is a shallow copy of the struct and its Header map.
func cloneRequest(r *http.Request) *http.Request {
@@ -116,29 +87,3 @@ func cloneRequest(r *http.Request) *http.Request {
}
return r2
}
-
-type onEOFReader struct {
- rc io.ReadCloser
- fn func()
-}
-
-func (r *onEOFReader) Read(p []byte) (n int, err error) {
- n, err = r.rc.Read(p)
- if err == io.EOF {
- r.runFunc()
- }
- return
-}
-
-func (r *onEOFReader) Close() error {
- err := r.rc.Close()
- r.runFunc()
- return err
-}
-
-func (r *onEOFReader) runFunc() {
- if fn := r.fn; fn != nil {
- fn()
- r.fn = nil
- }
-}
diff --git a/vendor/google.golang.org/appengine/LICENSE b/vendor/google.golang.org/appengine/LICENSE
deleted file mode 100644
index d6456956..00000000
--- a/vendor/google.golang.org/appengine/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/google.golang.org/appengine/internal/api.go b/vendor/google.golang.org/appengine/internal/api.go
deleted file mode 100644
index bbc1cb9c..00000000
--- a/vendor/google.golang.org/appengine/internal/api.go
+++ /dev/null
@@ -1,671 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build !appengine
-
-package internal
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io/ioutil"
- "log"
- "net"
- "net/http"
- "net/url"
- "os"
- "runtime"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/golang/protobuf/proto"
- netcontext "golang.org/x/net/context"
-
- basepb "google.golang.org/appengine/internal/base"
- logpb "google.golang.org/appengine/internal/log"
- remotepb "google.golang.org/appengine/internal/remote_api"
-)
-
-const (
- apiPath = "/rpc_http"
- defaultTicketSuffix = "/default.20150612t184001.0"
-)
-
-var (
- // Incoming headers.
- ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket")
- dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo")
- traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context")
- curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace")
- userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP")
- remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr")
-
- // Outgoing headers.
- apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint")
- apiEndpointHeaderValue = []string{"app-engine-apis"}
- apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method")
- apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"}
- apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline")
- apiContentType = http.CanonicalHeaderKey("Content-Type")
- apiContentTypeValue = []string{"application/octet-stream"}
- logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count")
-
- apiHTTPClient = &http.Client{
- Transport: &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: limitDial,
- },
- }
-
- defaultTicketOnce sync.Once
- defaultTicket string
- backgroundContextOnce sync.Once
- backgroundContext netcontext.Context
-)
-
-func apiURL() *url.URL {
- host, port := "appengine.googleapis.internal", "10001"
- if h := os.Getenv("API_HOST"); h != "" {
- host = h
- }
- if p := os.Getenv("API_PORT"); p != "" {
- port = p
- }
- return &url.URL{
- Scheme: "http",
- Host: host + ":" + port,
- Path: apiPath,
- }
-}
-
-func handleHTTP(w http.ResponseWriter, r *http.Request) {
- c := &context{
- req: r,
- outHeader: w.Header(),
- apiURL: apiURL(),
- }
- r = r.WithContext(withContext(r.Context(), c))
- c.req = r
-
- stopFlushing := make(chan int)
-
- // Patch up RemoteAddr so it looks reasonable.
- if addr := r.Header.Get(userIPHeader); addr != "" {
- r.RemoteAddr = addr
- } else if addr = r.Header.Get(remoteAddrHeader); addr != "" {
- r.RemoteAddr = addr
- } else {
- // Should not normally reach here, but pick a sensible default anyway.
- r.RemoteAddr = "127.0.0.1"
- }
- // The address in the headers will most likely be of these forms:
- // 123.123.123.123
- // 2001:db8::1
- // net/http.Request.RemoteAddr is specified to be in "IP:port" form.
- if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil {
- // Assume the remote address is only a host; add a default port.
- r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80")
- }
-
- // Start goroutine responsible for flushing app logs.
- // This is done after adding c to ctx.m (and stopped before removing it)
- // because flushing logs requires making an API call.
- go c.logFlusher(stopFlushing)
-
- executeRequestSafely(c, r)
- c.outHeader = nil // make sure header changes aren't respected any more
-
- stopFlushing <- 1 // any logging beyond this point will be dropped
-
- // Flush any pending logs asynchronously.
- c.pendingLogs.Lock()
- flushes := c.pendingLogs.flushes
- if len(c.pendingLogs.lines) > 0 {
- flushes++
- }
- c.pendingLogs.Unlock()
- flushed := make(chan struct{})
- go func() {
- defer close(flushed)
- // Force a log flush, because with very short requests we
- // may not ever flush logs.
- c.flushLog(true)
- }()
- w.Header().Set(logFlushHeader, strconv.Itoa(flushes))
-
- // Avoid nil Write call if c.Write is never called.
- if c.outCode != 0 {
- w.WriteHeader(c.outCode)
- }
- if c.outBody != nil {
- w.Write(c.outBody)
- }
- // Wait for the last flush to complete before returning,
- // otherwise the security ticket will not be valid.
- <-flushed
-}
-
-func executeRequestSafely(c *context, r *http.Request) {
- defer func() {
- if x := recover(); x != nil {
- logf(c, 4, "%s", renderPanic(x)) // 4 == critical
- c.outCode = 500
- }
- }()
-
- http.DefaultServeMux.ServeHTTP(c, r)
-}
-
-func renderPanic(x interface{}) string {
- buf := make([]byte, 16<<10) // 16 KB should be plenty
- buf = buf[:runtime.Stack(buf, false)]
-
- // Remove the first few stack frames:
- // this func
- // the recover closure in the caller
- // That will root the stack trace at the site of the panic.
- const (
- skipStart = "internal.renderPanic"
- skipFrames = 2
- )
- start := bytes.Index(buf, []byte(skipStart))
- p := start
- for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ {
- p = bytes.IndexByte(buf[p+1:], '\n') + p + 1
- if p < 0 {
- break
- }
- }
- if p >= 0 {
- // buf[start:p+1] is the block to remove.
- // Copy buf[p+1:] over buf[start:] and shrink buf.
- copy(buf[start:], buf[p+1:])
- buf = buf[:len(buf)-(p+1-start)]
- }
-
- // Add panic heading.
- head := fmt.Sprintf("panic: %v\n\n", x)
- if len(head) > len(buf) {
- // Extremely unlikely to happen.
- return head
- }
- copy(buf[len(head):], buf)
- copy(buf, head)
-
- return string(buf)
-}
-
-// context represents the context of an in-flight HTTP request.
-// It implements the appengine.Context and http.ResponseWriter interfaces.
-type context struct {
- req *http.Request
-
- outCode int
- outHeader http.Header
- outBody []byte
-
- pendingLogs struct {
- sync.Mutex
- lines []*logpb.UserAppLogLine
- flushes int
- }
-
- apiURL *url.URL
-}
-
-var contextKey = "holds a *context"
-
-// jointContext joins two contexts in a superficial way.
-// It takes values and timeouts from a base context, and only values from another context.
-type jointContext struct {
- base netcontext.Context
- valuesOnly netcontext.Context
-}
-
-func (c jointContext) Deadline() (time.Time, bool) {
- return c.base.Deadline()
-}
-
-func (c jointContext) Done() <-chan struct{} {
- return c.base.Done()
-}
-
-func (c jointContext) Err() error {
- return c.base.Err()
-}
-
-func (c jointContext) Value(key interface{}) interface{} {
- if val := c.base.Value(key); val != nil {
- return val
- }
- return c.valuesOnly.Value(key)
-}
-
-// fromContext returns the App Engine context or nil if ctx is not
-// derived from an App Engine context.
-func fromContext(ctx netcontext.Context) *context {
- c, _ := ctx.Value(&contextKey).(*context)
- return c
-}
-
-func withContext(parent netcontext.Context, c *context) netcontext.Context {
- ctx := netcontext.WithValue(parent, &contextKey, c)
- if ns := c.req.Header.Get(curNamespaceHeader); ns != "" {
- ctx = withNamespace(ctx, ns)
- }
- return ctx
-}
-
-func toContext(c *context) netcontext.Context {
- return withContext(netcontext.Background(), c)
-}
-
-func IncomingHeaders(ctx netcontext.Context) http.Header {
- if c := fromContext(ctx); c != nil {
- return c.req.Header
- }
- return nil
-}
-
-func ReqContext(req *http.Request) netcontext.Context {
- return req.Context()
-}
-
-func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
- return jointContext{
- base: parent,
- valuesOnly: req.Context(),
- }
-}
-
-// DefaultTicket returns a ticket used for background context or dev_appserver.
-func DefaultTicket() string {
- defaultTicketOnce.Do(func() {
- if IsDevAppServer() {
- defaultTicket = "testapp" + defaultTicketSuffix
- return
- }
- appID := partitionlessAppID()
- escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1)
- majVersion := VersionID(nil)
- if i := strings.Index(majVersion, "."); i > 0 {
- majVersion = majVersion[:i]
- }
- defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID())
- })
- return defaultTicket
-}
-
-func BackgroundContext() netcontext.Context {
- backgroundContextOnce.Do(func() {
- // Compute background security ticket.
- ticket := DefaultTicket()
-
- c := &context{
- req: &http.Request{
- Header: http.Header{
- ticketHeader: []string{ticket},
- },
- },
- apiURL: apiURL(),
- }
- backgroundContext = toContext(c)
-
- // TODO(dsymonds): Wire up the shutdown handler to do a final flush.
- go c.logFlusher(make(chan int))
- })
-
- return backgroundContext
-}
-
-// RegisterTestRequest registers the HTTP request req for testing, such that
-// any API calls are sent to the provided URL. It returns a closure to delete
-// the registration.
-// It should only be used by aetest package.
-func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) {
- c := &context{
- req: req,
- apiURL: apiURL,
- }
- ctx := withContext(decorate(req.Context()), c)
- req = req.WithContext(ctx)
- c.req = req
- return req, func() {}
-}
-
-var errTimeout = &CallError{
- Detail: "Deadline exceeded",
- Code: int32(remotepb.RpcError_CANCELLED),
- Timeout: true,
-}
-
-func (c *context) Header() http.Header { return c.outHeader }
-
-// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status
-// codes do not permit a response body (nor response entity headers such as
-// Content-Length, Content-Type, etc).
-func bodyAllowedForStatus(status int) bool {
- switch {
- case status >= 100 && status <= 199:
- return false
- case status == 204:
- return false
- case status == 304:
- return false
- }
- return true
-}
-
-func (c *context) Write(b []byte) (int, error) {
- if c.outCode == 0 {
- c.WriteHeader(http.StatusOK)
- }
- if len(b) > 0 && !bodyAllowedForStatus(c.outCode) {
- return 0, http.ErrBodyNotAllowed
- }
- c.outBody = append(c.outBody, b...)
- return len(b), nil
-}
-
-func (c *context) WriteHeader(code int) {
- if c.outCode != 0 {
- logf(c, 3, "WriteHeader called multiple times on request.") // error level
- return
- }
- c.outCode = code
-}
-
-func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) {
- hreq := &http.Request{
- Method: "POST",
- URL: c.apiURL,
- Header: http.Header{
- apiEndpointHeader: apiEndpointHeaderValue,
- apiMethodHeader: apiMethodHeaderValue,
- apiContentType: apiContentTypeValue,
- apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)},
- },
- Body: ioutil.NopCloser(bytes.NewReader(body)),
- ContentLength: int64(len(body)),
- Host: c.apiURL.Host,
- }
- if info := c.req.Header.Get(dapperHeader); info != "" {
- hreq.Header.Set(dapperHeader, info)
- }
- if info := c.req.Header.Get(traceHeader); info != "" {
- hreq.Header.Set(traceHeader, info)
- }
-
- tr := apiHTTPClient.Transport.(*http.Transport)
-
- var timedOut int32 // atomic; set to 1 if timed out
- t := time.AfterFunc(timeout, func() {
- atomic.StoreInt32(&timedOut, 1)
- tr.CancelRequest(hreq)
- })
- defer t.Stop()
- defer func() {
- // Check if timeout was exceeded.
- if atomic.LoadInt32(&timedOut) != 0 {
- err = errTimeout
- }
- }()
-
- hresp, err := apiHTTPClient.Do(hreq)
- if err != nil {
- return nil, &CallError{
- Detail: fmt.Sprintf("service bridge HTTP failed: %v", err),
- Code: int32(remotepb.RpcError_UNKNOWN),
- }
- }
- defer hresp.Body.Close()
- hrespBody, err := ioutil.ReadAll(hresp.Body)
- if hresp.StatusCode != 200 {
- return nil, &CallError{
- Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody),
- Code: int32(remotepb.RpcError_UNKNOWN),
- }
- }
- if err != nil {
- return nil, &CallError{
- Detail: fmt.Sprintf("service bridge response bad: %v", err),
- Code: int32(remotepb.RpcError_UNKNOWN),
- }
- }
- return hrespBody, nil
-}
-
-func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error {
- if ns := NamespaceFromContext(ctx); ns != "" {
- if fn, ok := NamespaceMods[service]; ok {
- fn(in, ns)
- }
- }
-
- if f, ctx, ok := callOverrideFromContext(ctx); ok {
- return f(ctx, service, method, in, out)
- }
-
- // Handle already-done contexts quickly.
- select {
- case <-ctx.Done():
- return ctx.Err()
- default:
- }
-
- c := fromContext(ctx)
- if c == nil {
- // Give a good error message rather than a panic lower down.
- return errNotAppEngineContext
- }
-
- // Apply transaction modifications if we're in a transaction.
- if t := transactionFromContext(ctx); t != nil {
- if t.finished {
- return errors.New("transaction context has expired")
- }
- applyTransaction(in, &t.transaction)
- }
-
- // Default RPC timeout is 60s.
- timeout := 60 * time.Second
- if deadline, ok := ctx.Deadline(); ok {
- timeout = deadline.Sub(time.Now())
- }
-
- data, err := proto.Marshal(in)
- if err != nil {
- return err
- }
-
- ticket := c.req.Header.Get(ticketHeader)
- // Use a test ticket under test environment.
- if ticket == "" {
- if appid := ctx.Value(&appIDOverrideKey); appid != nil {
- ticket = appid.(string) + defaultTicketSuffix
- }
- }
- // Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver.
- if ticket == "" {
- ticket = DefaultTicket()
- }
- req := &remotepb.Request{
- ServiceName: &service,
- Method: &method,
- Request: data,
- RequestId: &ticket,
- }
- hreqBody, err := proto.Marshal(req)
- if err != nil {
- return err
- }
-
- hrespBody, err := c.post(hreqBody, timeout)
- if err != nil {
- return err
- }
-
- res := &remotepb.Response{}
- if err := proto.Unmarshal(hrespBody, res); err != nil {
- return err
- }
- if res.RpcError != nil {
- ce := &CallError{
- Detail: res.RpcError.GetDetail(),
- Code: *res.RpcError.Code,
- }
- switch remotepb.RpcError_ErrorCode(ce.Code) {
- case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED:
- ce.Timeout = true
- }
- return ce
- }
- if res.ApplicationError != nil {
- return &APIError{
- Service: *req.ServiceName,
- Detail: res.ApplicationError.GetDetail(),
- Code: *res.ApplicationError.Code,
- }
- }
- if res.Exception != nil || res.JavaException != nil {
- // This shouldn't happen, but let's be defensive.
- return &CallError{
- Detail: "service bridge returned exception",
- Code: int32(remotepb.RpcError_UNKNOWN),
- }
- }
- return proto.Unmarshal(res.Response, out)
-}
-
-func (c *context) Request() *http.Request {
- return c.req
-}
-
-func (c *context) addLogLine(ll *logpb.UserAppLogLine) {
- // Truncate long log lines.
- // TODO(dsymonds): Check if this is still necessary.
- const lim = 8 << 10
- if len(*ll.Message) > lim {
- suffix := fmt.Sprintf("...(length %d)", len(*ll.Message))
- ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix)
- }
-
- c.pendingLogs.Lock()
- c.pendingLogs.lines = append(c.pendingLogs.lines, ll)
- c.pendingLogs.Unlock()
-}
-
-var logLevelName = map[int64]string{
- 0: "DEBUG",
- 1: "INFO",
- 2: "WARNING",
- 3: "ERROR",
- 4: "CRITICAL",
-}
-
-func logf(c *context, level int64, format string, args ...interface{}) {
- if c == nil {
- panic("not an App Engine context")
- }
- s := fmt.Sprintf(format, args...)
- s = strings.TrimRight(s, "\n") // Remove any trailing newline characters.
- c.addLogLine(&logpb.UserAppLogLine{
- TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3),
- Level: &level,
- Message: &s,
- })
- // Only duplicate log to stderr if not running on App Engine second generation
- if !IsSecondGen() {
- log.Print(logLevelName[level] + ": " + s)
- }
-}
-
-// flushLog attempts to flush any pending logs to the appserver.
-// It should not be called concurrently.
-func (c *context) flushLog(force bool) (flushed bool) {
- c.pendingLogs.Lock()
- // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious.
- n, rem := 0, 30<<20
- for ; n < len(c.pendingLogs.lines); n++ {
- ll := c.pendingLogs.lines[n]
- // Each log line will require about 3 bytes of overhead.
- nb := proto.Size(ll) + 3
- if nb > rem {
- break
- }
- rem -= nb
- }
- lines := c.pendingLogs.lines[:n]
- c.pendingLogs.lines = c.pendingLogs.lines[n:]
- c.pendingLogs.Unlock()
-
- if len(lines) == 0 && !force {
- // Nothing to flush.
- return false
- }
-
- rescueLogs := false
- defer func() {
- if rescueLogs {
- c.pendingLogs.Lock()
- c.pendingLogs.lines = append(lines, c.pendingLogs.lines...)
- c.pendingLogs.Unlock()
- }
- }()
-
- buf, err := proto.Marshal(&logpb.UserAppLogGroup{
- LogLine: lines,
- })
- if err != nil {
- log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err)
- rescueLogs = true
- return false
- }
-
- req := &logpb.FlushRequest{
- Logs: buf,
- }
- res := &basepb.VoidProto{}
- c.pendingLogs.Lock()
- c.pendingLogs.flushes++
- c.pendingLogs.Unlock()
- if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil {
- log.Printf("internal.flushLog: Flush RPC: %v", err)
- rescueLogs = true
- return false
- }
- return true
-}
-
-const (
- // Log flushing parameters.
- flushInterval = 1 * time.Second
- forceFlushInterval = 60 * time.Second
-)
-
-func (c *context) logFlusher(stop <-chan int) {
- lastFlush := time.Now()
- tick := time.NewTicker(flushInterval)
- for {
- select {
- case <-stop:
- // Request finished.
- tick.Stop()
- return
- case <-tick.C:
- force := time.Now().Sub(lastFlush) > forceFlushInterval
- if c.flushLog(force) {
- lastFlush = time.Now()
- }
- }
- }
-}
-
-func ContextForTesting(req *http.Request) netcontext.Context {
- return toContext(&context{req: req})
-}
diff --git a/vendor/google.golang.org/appengine/internal/api_classic.go b/vendor/google.golang.org/appengine/internal/api_classic.go
deleted file mode 100644
index f0f40b2e..00000000
--- a/vendor/google.golang.org/appengine/internal/api_classic.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build appengine
-
-package internal
-
-import (
- "errors"
- "fmt"
- "net/http"
- "time"
-
- "appengine"
- "appengine_internal"
- basepb "appengine_internal/base"
-
- "github.com/golang/protobuf/proto"
- netcontext "golang.org/x/net/context"
-)
-
-var contextKey = "holds an appengine.Context"
-
-// fromContext returns the App Engine context or nil if ctx is not
-// derived from an App Engine context.
-func fromContext(ctx netcontext.Context) appengine.Context {
- c, _ := ctx.Value(&contextKey).(appengine.Context)
- return c
-}
-
-// This is only for classic App Engine adapters.
-func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error) {
- c := fromContext(ctx)
- if c == nil {
- return nil, errNotAppEngineContext
- }
- return c, nil
-}
-
-func withContext(parent netcontext.Context, c appengine.Context) netcontext.Context {
- ctx := netcontext.WithValue(parent, &contextKey, c)
-
- s := &basepb.StringProto{}
- c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil)
- if ns := s.GetValue(); ns != "" {
- ctx = NamespacedContext(ctx, ns)
- }
-
- return ctx
-}
-
-func IncomingHeaders(ctx netcontext.Context) http.Header {
- if c := fromContext(ctx); c != nil {
- if req, ok := c.Request().(*http.Request); ok {
- return req.Header
- }
- }
- return nil
-}
-
-func ReqContext(req *http.Request) netcontext.Context {
- return WithContext(netcontext.Background(), req)
-}
-
-func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
- c := appengine.NewContext(req)
- return withContext(parent, c)
-}
-
-type testingContext struct {
- appengine.Context
-
- req *http.Request
-}
-
-func (t *testingContext) FullyQualifiedAppID() string { return "dev~testcontext" }
-func (t *testingContext) Call(service, method string, _, _ appengine_internal.ProtoMessage, _ *appengine_internal.CallOptions) error {
- if service == "__go__" && method == "GetNamespace" {
- return nil
- }
- return fmt.Errorf("testingContext: unsupported Call")
-}
-func (t *testingContext) Request() interface{} { return t.req }
-
-func ContextForTesting(req *http.Request) netcontext.Context {
- return withContext(netcontext.Background(), &testingContext{req: req})
-}
-
-func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error {
- if ns := NamespaceFromContext(ctx); ns != "" {
- if fn, ok := NamespaceMods[service]; ok {
- fn(in, ns)
- }
- }
-
- if f, ctx, ok := callOverrideFromContext(ctx); ok {
- return f(ctx, service, method, in, out)
- }
-
- // Handle already-done contexts quickly.
- select {
- case <-ctx.Done():
- return ctx.Err()
- default:
- }
-
- c := fromContext(ctx)
- if c == nil {
- // Give a good error message rather than a panic lower down.
- return errNotAppEngineContext
- }
-
- // Apply transaction modifications if we're in a transaction.
- if t := transactionFromContext(ctx); t != nil {
- if t.finished {
- return errors.New("transaction context has expired")
- }
- applyTransaction(in, &t.transaction)
- }
-
- var opts *appengine_internal.CallOptions
- if d, ok := ctx.Deadline(); ok {
- opts = &appengine_internal.CallOptions{
- Timeout: d.Sub(time.Now()),
- }
- }
-
- err := c.Call(service, method, in, out, opts)
- switch v := err.(type) {
- case *appengine_internal.APIError:
- return &APIError{
- Service: v.Service,
- Detail: v.Detail,
- Code: v.Code,
- }
- case *appengine_internal.CallError:
- return &CallError{
- Detail: v.Detail,
- Code: v.Code,
- Timeout: v.Timeout,
- }
- }
- return err
-}
-
-func handleHTTP(w http.ResponseWriter, r *http.Request) {
- panic("handleHTTP called; this should be impossible")
-}
-
-func logf(c appengine.Context, level int64, format string, args ...interface{}) {
- var fn func(format string, args ...interface{})
- switch level {
- case 0:
- fn = c.Debugf
- case 1:
- fn = c.Infof
- case 2:
- fn = c.Warningf
- case 3:
- fn = c.Errorf
- case 4:
- fn = c.Criticalf
- default:
- // This shouldn't happen.
- fn = c.Criticalf
- }
- fn(format, args...)
-}
diff --git a/vendor/google.golang.org/appengine/internal/api_common.go b/vendor/google.golang.org/appengine/internal/api_common.go
deleted file mode 100644
index e0c0b214..00000000
--- a/vendor/google.golang.org/appengine/internal/api_common.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package internal
-
-import (
- "errors"
- "os"
-
- "github.com/golang/protobuf/proto"
- netcontext "golang.org/x/net/context"
-)
-
-var errNotAppEngineContext = errors.New("not an App Engine context")
-
-type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error
-
-var callOverrideKey = "holds []CallOverrideFunc"
-
-func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Context {
- // We avoid appending to any existing call override
- // so we don't risk overwriting a popped stack below.
- var cofs []CallOverrideFunc
- if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok {
- cofs = append(cofs, uf...)
- }
- cofs = append(cofs, f)
- return netcontext.WithValue(ctx, &callOverrideKey, cofs)
-}
-
-func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netcontext.Context, bool) {
- cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc)
- if len(cofs) == 0 {
- return nil, nil, false
- }
- // We found a list of overrides; grab the last, and reconstitute a
- // context that will hide it.
- f := cofs[len(cofs)-1]
- ctx = netcontext.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1])
- return f, ctx, true
-}
-
-type logOverrideFunc func(level int64, format string, args ...interface{})
-
-var logOverrideKey = "holds a logOverrideFunc"
-
-func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context {
- return netcontext.WithValue(ctx, &logOverrideKey, f)
-}
-
-var appIDOverrideKey = "holds a string, being the full app ID"
-
-func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context {
- return netcontext.WithValue(ctx, &appIDOverrideKey, appID)
-}
-
-var namespaceKey = "holds the namespace string"
-
-func withNamespace(ctx netcontext.Context, ns string) netcontext.Context {
- return netcontext.WithValue(ctx, &namespaceKey, ns)
-}
-
-func NamespaceFromContext(ctx netcontext.Context) string {
- // If there's no namespace, return the empty string.
- ns, _ := ctx.Value(&namespaceKey).(string)
- return ns
-}
-
-// FullyQualifiedAppID returns the fully-qualified application ID.
-// This may contain a partition prefix (e.g. "s~" for High Replication apps),
-// or a domain prefix (e.g. "example.com:").
-func FullyQualifiedAppID(ctx netcontext.Context) string {
- if id, ok := ctx.Value(&appIDOverrideKey).(string); ok {
- return id
- }
- return fullyQualifiedAppID(ctx)
-}
-
-func Logf(ctx netcontext.Context, level int64, format string, args ...interface{}) {
- if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok {
- f(level, format, args...)
- return
- }
- c := fromContext(ctx)
- if c == nil {
- panic(errNotAppEngineContext)
- }
- logf(c, level, format, args...)
-}
-
-// NamespacedContext wraps a Context to support namespaces.
-func NamespacedContext(ctx netcontext.Context, namespace string) netcontext.Context {
- return withNamespace(ctx, namespace)
-}
-
-// SetTestEnv sets the env variables for testing background ticket in Flex.
-func SetTestEnv() func() {
- var environ = []struct {
- key, value string
- }{
- {"GAE_LONG_APP_ID", "my-app-id"},
- {"GAE_MINOR_VERSION", "067924799508853122"},
- {"GAE_MODULE_INSTANCE", "0"},
- {"GAE_MODULE_NAME", "default"},
- {"GAE_MODULE_VERSION", "20150612t184001"},
- }
-
- for _, v := range environ {
- old := os.Getenv(v.key)
- os.Setenv(v.key, v.value)
- v.value = old
- }
- return func() { // Restore old environment after the test completes.
- for _, v := range environ {
- if v.value == "" {
- os.Unsetenv(v.key)
- continue
- }
- os.Setenv(v.key, v.value)
- }
- }
-}
diff --git a/vendor/google.golang.org/appengine/internal/app_id.go b/vendor/google.golang.org/appengine/internal/app_id.go
deleted file mode 100644
index 11df8c07..00000000
--- a/vendor/google.golang.org/appengine/internal/app_id.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package internal
-
-import (
- "strings"
-)
-
-func parseFullAppID(appid string) (partition, domain, displayID string) {
- if i := strings.Index(appid, "~"); i != -1 {
- partition, appid = appid[:i], appid[i+1:]
- }
- if i := strings.Index(appid, ":"); i != -1 {
- domain, appid = appid[:i], appid[i+1:]
- }
- return partition, domain, appid
-}
-
-// appID returns "appid" or "domain.com:appid".
-func appID(fullAppID string) string {
- _, dom, dis := parseFullAppID(fullAppID)
- if dom != "" {
- return dom + ":" + dis
- }
- return dis
-}
diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go b/vendor/google.golang.org/appengine/internal/base/api_base.pb.go
deleted file mode 100644
index db4777e6..00000000
--- a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go
+++ /dev/null
@@ -1,308 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google.golang.org/appengine/internal/base/api_base.proto
-
-package base
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type StringProto struct {
- Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StringProto) Reset() { *m = StringProto{} }
-func (m *StringProto) String() string { return proto.CompactTextString(m) }
-func (*StringProto) ProtoMessage() {}
-func (*StringProto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{0}
-}
-func (m *StringProto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StringProto.Unmarshal(m, b)
-}
-func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StringProto.Marshal(b, m, deterministic)
-}
-func (dst *StringProto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StringProto.Merge(dst, src)
-}
-func (m *StringProto) XXX_Size() int {
- return xxx_messageInfo_StringProto.Size(m)
-}
-func (m *StringProto) XXX_DiscardUnknown() {
- xxx_messageInfo_StringProto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StringProto proto.InternalMessageInfo
-
-func (m *StringProto) GetValue() string {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return ""
-}
-
-type Integer32Proto struct {
- Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Integer32Proto) Reset() { *m = Integer32Proto{} }
-func (m *Integer32Proto) String() string { return proto.CompactTextString(m) }
-func (*Integer32Proto) ProtoMessage() {}
-func (*Integer32Proto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{1}
-}
-func (m *Integer32Proto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Integer32Proto.Unmarshal(m, b)
-}
-func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic)
-}
-func (dst *Integer32Proto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Integer32Proto.Merge(dst, src)
-}
-func (m *Integer32Proto) XXX_Size() int {
- return xxx_messageInfo_Integer32Proto.Size(m)
-}
-func (m *Integer32Proto) XXX_DiscardUnknown() {
- xxx_messageInfo_Integer32Proto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo
-
-func (m *Integer32Proto) GetValue() int32 {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return 0
-}
-
-type Integer64Proto struct {
- Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Integer64Proto) Reset() { *m = Integer64Proto{} }
-func (m *Integer64Proto) String() string { return proto.CompactTextString(m) }
-func (*Integer64Proto) ProtoMessage() {}
-func (*Integer64Proto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{2}
-}
-func (m *Integer64Proto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Integer64Proto.Unmarshal(m, b)
-}
-func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic)
-}
-func (dst *Integer64Proto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Integer64Proto.Merge(dst, src)
-}
-func (m *Integer64Proto) XXX_Size() int {
- return xxx_messageInfo_Integer64Proto.Size(m)
-}
-func (m *Integer64Proto) XXX_DiscardUnknown() {
- xxx_messageInfo_Integer64Proto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo
-
-func (m *Integer64Proto) GetValue() int64 {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return 0
-}
-
-type BoolProto struct {
- Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *BoolProto) Reset() { *m = BoolProto{} }
-func (m *BoolProto) String() string { return proto.CompactTextString(m) }
-func (*BoolProto) ProtoMessage() {}
-func (*BoolProto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{3}
-}
-func (m *BoolProto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_BoolProto.Unmarshal(m, b)
-}
-func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic)
-}
-func (dst *BoolProto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_BoolProto.Merge(dst, src)
-}
-func (m *BoolProto) XXX_Size() int {
- return xxx_messageInfo_BoolProto.Size(m)
-}
-func (m *BoolProto) XXX_DiscardUnknown() {
- xxx_messageInfo_BoolProto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BoolProto proto.InternalMessageInfo
-
-func (m *BoolProto) GetValue() bool {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return false
-}
-
-type DoubleProto struct {
- Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DoubleProto) Reset() { *m = DoubleProto{} }
-func (m *DoubleProto) String() string { return proto.CompactTextString(m) }
-func (*DoubleProto) ProtoMessage() {}
-func (*DoubleProto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{4}
-}
-func (m *DoubleProto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DoubleProto.Unmarshal(m, b)
-}
-func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic)
-}
-func (dst *DoubleProto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DoubleProto.Merge(dst, src)
-}
-func (m *DoubleProto) XXX_Size() int {
- return xxx_messageInfo_DoubleProto.Size(m)
-}
-func (m *DoubleProto) XXX_DiscardUnknown() {
- xxx_messageInfo_DoubleProto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DoubleProto proto.InternalMessageInfo
-
-func (m *DoubleProto) GetValue() float64 {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return 0
-}
-
-type BytesProto struct {
- Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *BytesProto) Reset() { *m = BytesProto{} }
-func (m *BytesProto) String() string { return proto.CompactTextString(m) }
-func (*BytesProto) ProtoMessage() {}
-func (*BytesProto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{5}
-}
-func (m *BytesProto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_BytesProto.Unmarshal(m, b)
-}
-func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic)
-}
-func (dst *BytesProto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_BytesProto.Merge(dst, src)
-}
-func (m *BytesProto) XXX_Size() int {
- return xxx_messageInfo_BytesProto.Size(m)
-}
-func (m *BytesProto) XXX_DiscardUnknown() {
- xxx_messageInfo_BytesProto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BytesProto proto.InternalMessageInfo
-
-func (m *BytesProto) GetValue() []byte {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type VoidProto struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *VoidProto) Reset() { *m = VoidProto{} }
-func (m *VoidProto) String() string { return proto.CompactTextString(m) }
-func (*VoidProto) ProtoMessage() {}
-func (*VoidProto) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_base_9d49f8792e0c1140, []int{6}
-}
-func (m *VoidProto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_VoidProto.Unmarshal(m, b)
-}
-func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic)
-}
-func (dst *VoidProto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_VoidProto.Merge(dst, src)
-}
-func (m *VoidProto) XXX_Size() int {
- return xxx_messageInfo_VoidProto.Size(m)
-}
-func (m *VoidProto) XXX_DiscardUnknown() {
- xxx_messageInfo_VoidProto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_VoidProto proto.InternalMessageInfo
-
-func init() {
- proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto")
- proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto")
- proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto")
- proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto")
- proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto")
- proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto")
- proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto")
-}
-
-func init() {
- proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140)
-}
-
-var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{
- // 199 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30,
- 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40,
- 0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6,
- 0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62,
- 0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71,
- 0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe,
- 0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1,
- 0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71,
- 0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d,
- 0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff,
- 0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d,
- 0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba,
- 0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00,
-}
diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.proto b/vendor/google.golang.org/appengine/internal/base/api_base.proto
deleted file mode 100644
index 56cd7a3c..00000000
--- a/vendor/google.golang.org/appengine/internal/base/api_base.proto
+++ /dev/null
@@ -1,33 +0,0 @@
-// Built-in base types for API calls. Primarily useful as return types.
-
-syntax = "proto2";
-option go_package = "base";
-
-package appengine.base;
-
-message StringProto {
- required string value = 1;
-}
-
-message Integer32Proto {
- required int32 value = 1;
-}
-
-message Integer64Proto {
- required int64 value = 1;
-}
-
-message BoolProto {
- required bool value = 1;
-}
-
-message DoubleProto {
- required double value = 1;
-}
-
-message BytesProto {
- required bytes value = 1 [ctype=CORD];
-}
-
-message VoidProto {
-}
diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
deleted file mode 100644
index 2fb74828..00000000
--- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
+++ /dev/null
@@ -1,4367 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google.golang.org/appengine/internal/datastore/datastore_v3.proto
-
-package datastore
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type Property_Meaning int32
-
-const (
- Property_NO_MEANING Property_Meaning = 0
- Property_BLOB Property_Meaning = 14
- Property_TEXT Property_Meaning = 15
- Property_BYTESTRING Property_Meaning = 16
- Property_ATOM_CATEGORY Property_Meaning = 1
- Property_ATOM_LINK Property_Meaning = 2
- Property_ATOM_TITLE Property_Meaning = 3
- Property_ATOM_CONTENT Property_Meaning = 4
- Property_ATOM_SUMMARY Property_Meaning = 5
- Property_ATOM_AUTHOR Property_Meaning = 6
- Property_GD_WHEN Property_Meaning = 7
- Property_GD_EMAIL Property_Meaning = 8
- Property_GEORSS_POINT Property_Meaning = 9
- Property_GD_IM Property_Meaning = 10
- Property_GD_PHONENUMBER Property_Meaning = 11
- Property_GD_POSTALADDRESS Property_Meaning = 12
- Property_GD_RATING Property_Meaning = 13
- Property_BLOBKEY Property_Meaning = 17
- Property_ENTITY_PROTO Property_Meaning = 19
- Property_INDEX_VALUE Property_Meaning = 18
-)
-
-var Property_Meaning_name = map[int32]string{
- 0: "NO_MEANING",
- 14: "BLOB",
- 15: "TEXT",
- 16: "BYTESTRING",
- 1: "ATOM_CATEGORY",
- 2: "ATOM_LINK",
- 3: "ATOM_TITLE",
- 4: "ATOM_CONTENT",
- 5: "ATOM_SUMMARY",
- 6: "ATOM_AUTHOR",
- 7: "GD_WHEN",
- 8: "GD_EMAIL",
- 9: "GEORSS_POINT",
- 10: "GD_IM",
- 11: "GD_PHONENUMBER",
- 12: "GD_POSTALADDRESS",
- 13: "GD_RATING",
- 17: "BLOBKEY",
- 19: "ENTITY_PROTO",
- 18: "INDEX_VALUE",
-}
-var Property_Meaning_value = map[string]int32{
- "NO_MEANING": 0,
- "BLOB": 14,
- "TEXT": 15,
- "BYTESTRING": 16,
- "ATOM_CATEGORY": 1,
- "ATOM_LINK": 2,
- "ATOM_TITLE": 3,
- "ATOM_CONTENT": 4,
- "ATOM_SUMMARY": 5,
- "ATOM_AUTHOR": 6,
- "GD_WHEN": 7,
- "GD_EMAIL": 8,
- "GEORSS_POINT": 9,
- "GD_IM": 10,
- "GD_PHONENUMBER": 11,
- "GD_POSTALADDRESS": 12,
- "GD_RATING": 13,
- "BLOBKEY": 17,
- "ENTITY_PROTO": 19,
- "INDEX_VALUE": 18,
-}
-
-func (x Property_Meaning) Enum() *Property_Meaning {
- p := new(Property_Meaning)
- *p = x
- return p
-}
-func (x Property_Meaning) String() string {
- return proto.EnumName(Property_Meaning_name, int32(x))
-}
-func (x *Property_Meaning) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Property_Meaning_value, data, "Property_Meaning")
- if err != nil {
- return err
- }
- *x = Property_Meaning(value)
- return nil
-}
-func (Property_Meaning) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0}
-}
-
-type Property_FtsTokenizationOption int32
-
-const (
- Property_HTML Property_FtsTokenizationOption = 1
- Property_ATOM Property_FtsTokenizationOption = 2
-)
-
-var Property_FtsTokenizationOption_name = map[int32]string{
- 1: "HTML",
- 2: "ATOM",
-}
-var Property_FtsTokenizationOption_value = map[string]int32{
- "HTML": 1,
- "ATOM": 2,
-}
-
-func (x Property_FtsTokenizationOption) Enum() *Property_FtsTokenizationOption {
- p := new(Property_FtsTokenizationOption)
- *p = x
- return p
-}
-func (x Property_FtsTokenizationOption) String() string {
- return proto.EnumName(Property_FtsTokenizationOption_name, int32(x))
-}
-func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Property_FtsTokenizationOption_value, data, "Property_FtsTokenizationOption")
- if err != nil {
- return err
- }
- *x = Property_FtsTokenizationOption(value)
- return nil
-}
-func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1}
-}
-
-type EntityProto_Kind int32
-
-const (
- EntityProto_GD_CONTACT EntityProto_Kind = 1
- EntityProto_GD_EVENT EntityProto_Kind = 2
- EntityProto_GD_MESSAGE EntityProto_Kind = 3
-)
-
-var EntityProto_Kind_name = map[int32]string{
- 1: "GD_CONTACT",
- 2: "GD_EVENT",
- 3: "GD_MESSAGE",
-}
-var EntityProto_Kind_value = map[string]int32{
- "GD_CONTACT": 1,
- "GD_EVENT": 2,
- "GD_MESSAGE": 3,
-}
-
-func (x EntityProto_Kind) Enum() *EntityProto_Kind {
- p := new(EntityProto_Kind)
- *p = x
- return p
-}
-func (x EntityProto_Kind) String() string {
- return proto.EnumName(EntityProto_Kind_name, int32(x))
-}
-func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(EntityProto_Kind_value, data, "EntityProto_Kind")
- if err != nil {
- return err
- }
- *x = EntityProto_Kind(value)
- return nil
-}
-func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0}
-}
-
-type Index_Property_Direction int32
-
-const (
- Index_Property_ASCENDING Index_Property_Direction = 1
- Index_Property_DESCENDING Index_Property_Direction = 2
-)
-
-var Index_Property_Direction_name = map[int32]string{
- 1: "ASCENDING",
- 2: "DESCENDING",
-}
-var Index_Property_Direction_value = map[string]int32{
- "ASCENDING": 1,
- "DESCENDING": 2,
-}
-
-func (x Index_Property_Direction) Enum() *Index_Property_Direction {
- p := new(Index_Property_Direction)
- *p = x
- return p
-}
-func (x Index_Property_Direction) String() string {
- return proto.EnumName(Index_Property_Direction_name, int32(x))
-}
-func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Index_Property_Direction_value, data, "Index_Property_Direction")
- if err != nil {
- return err
- }
- *x = Index_Property_Direction(value)
- return nil
-}
-func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0}
-}
-
-type CompositeIndex_State int32
-
-const (
- CompositeIndex_WRITE_ONLY CompositeIndex_State = 1
- CompositeIndex_READ_WRITE CompositeIndex_State = 2
- CompositeIndex_DELETED CompositeIndex_State = 3
- CompositeIndex_ERROR CompositeIndex_State = 4
-)
-
-var CompositeIndex_State_name = map[int32]string{
- 1: "WRITE_ONLY",
- 2: "READ_WRITE",
- 3: "DELETED",
- 4: "ERROR",
-}
-var CompositeIndex_State_value = map[string]int32{
- "WRITE_ONLY": 1,
- "READ_WRITE": 2,
- "DELETED": 3,
- "ERROR": 4,
-}
-
-func (x CompositeIndex_State) Enum() *CompositeIndex_State {
- p := new(CompositeIndex_State)
- *p = x
- return p
-}
-func (x CompositeIndex_State) String() string {
- return proto.EnumName(CompositeIndex_State_name, int32(x))
-}
-func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(CompositeIndex_State_value, data, "CompositeIndex_State")
- if err != nil {
- return err
- }
- *x = CompositeIndex_State(value)
- return nil
-}
-func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0}
-}
-
-type Snapshot_Status int32
-
-const (
- Snapshot_INACTIVE Snapshot_Status = 0
- Snapshot_ACTIVE Snapshot_Status = 1
-)
-
-var Snapshot_Status_name = map[int32]string{
- 0: "INACTIVE",
- 1: "ACTIVE",
-}
-var Snapshot_Status_value = map[string]int32{
- "INACTIVE": 0,
- "ACTIVE": 1,
-}
-
-func (x Snapshot_Status) Enum() *Snapshot_Status {
- p := new(Snapshot_Status)
- *p = x
- return p
-}
-func (x Snapshot_Status) String() string {
- return proto.EnumName(Snapshot_Status_name, int32(x))
-}
-func (x *Snapshot_Status) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Snapshot_Status_value, data, "Snapshot_Status")
- if err != nil {
- return err
- }
- *x = Snapshot_Status(value)
- return nil
-}
-func (Snapshot_Status) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0}
-}
-
-type Query_Hint int32
-
-const (
- Query_ORDER_FIRST Query_Hint = 1
- Query_ANCESTOR_FIRST Query_Hint = 2
- Query_FILTER_FIRST Query_Hint = 3
-)
-
-var Query_Hint_name = map[int32]string{
- 1: "ORDER_FIRST",
- 2: "ANCESTOR_FIRST",
- 3: "FILTER_FIRST",
-}
-var Query_Hint_value = map[string]int32{
- "ORDER_FIRST": 1,
- "ANCESTOR_FIRST": 2,
- "FILTER_FIRST": 3,
-}
-
-func (x Query_Hint) Enum() *Query_Hint {
- p := new(Query_Hint)
- *p = x
- return p
-}
-func (x Query_Hint) String() string {
- return proto.EnumName(Query_Hint_name, int32(x))
-}
-func (x *Query_Hint) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Query_Hint_value, data, "Query_Hint")
- if err != nil {
- return err
- }
- *x = Query_Hint(value)
- return nil
-}
-func (Query_Hint) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0}
-}
-
-type Query_Filter_Operator int32
-
-const (
- Query_Filter_LESS_THAN Query_Filter_Operator = 1
- Query_Filter_LESS_THAN_OR_EQUAL Query_Filter_Operator = 2
- Query_Filter_GREATER_THAN Query_Filter_Operator = 3
- Query_Filter_GREATER_THAN_OR_EQUAL Query_Filter_Operator = 4
- Query_Filter_EQUAL Query_Filter_Operator = 5
- Query_Filter_IN Query_Filter_Operator = 6
- Query_Filter_EXISTS Query_Filter_Operator = 7
-)
-
-var Query_Filter_Operator_name = map[int32]string{
- 1: "LESS_THAN",
- 2: "LESS_THAN_OR_EQUAL",
- 3: "GREATER_THAN",
- 4: "GREATER_THAN_OR_EQUAL",
- 5: "EQUAL",
- 6: "IN",
- 7: "EXISTS",
-}
-var Query_Filter_Operator_value = map[string]int32{
- "LESS_THAN": 1,
- "LESS_THAN_OR_EQUAL": 2,
- "GREATER_THAN": 3,
- "GREATER_THAN_OR_EQUAL": 4,
- "EQUAL": 5,
- "IN": 6,
- "EXISTS": 7,
-}
-
-func (x Query_Filter_Operator) Enum() *Query_Filter_Operator {
- p := new(Query_Filter_Operator)
- *p = x
- return p
-}
-func (x Query_Filter_Operator) String() string {
- return proto.EnumName(Query_Filter_Operator_name, int32(x))
-}
-func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Query_Filter_Operator_value, data, "Query_Filter_Operator")
- if err != nil {
- return err
- }
- *x = Query_Filter_Operator(value)
- return nil
-}
-func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0}
-}
-
-type Query_Order_Direction int32
-
-const (
- Query_Order_ASCENDING Query_Order_Direction = 1
- Query_Order_DESCENDING Query_Order_Direction = 2
-)
-
-var Query_Order_Direction_name = map[int32]string{
- 1: "ASCENDING",
- 2: "DESCENDING",
-}
-var Query_Order_Direction_value = map[string]int32{
- "ASCENDING": 1,
- "DESCENDING": 2,
-}
-
-func (x Query_Order_Direction) Enum() *Query_Order_Direction {
- p := new(Query_Order_Direction)
- *p = x
- return p
-}
-func (x Query_Order_Direction) String() string {
- return proto.EnumName(Query_Order_Direction_name, int32(x))
-}
-func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Query_Order_Direction_value, data, "Query_Order_Direction")
- if err != nil {
- return err
- }
- *x = Query_Order_Direction(value)
- return nil
-}
-func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0}
-}
-
-type Error_ErrorCode int32
-
-const (
- Error_BAD_REQUEST Error_ErrorCode = 1
- Error_CONCURRENT_TRANSACTION Error_ErrorCode = 2
- Error_INTERNAL_ERROR Error_ErrorCode = 3
- Error_NEED_INDEX Error_ErrorCode = 4
- Error_TIMEOUT Error_ErrorCode = 5
- Error_PERMISSION_DENIED Error_ErrorCode = 6
- Error_BIGTABLE_ERROR Error_ErrorCode = 7
- Error_COMMITTED_BUT_STILL_APPLYING Error_ErrorCode = 8
- Error_CAPABILITY_DISABLED Error_ErrorCode = 9
- Error_TRY_ALTERNATE_BACKEND Error_ErrorCode = 10
- Error_SAFE_TIME_TOO_OLD Error_ErrorCode = 11
-)
-
-var Error_ErrorCode_name = map[int32]string{
- 1: "BAD_REQUEST",
- 2: "CONCURRENT_TRANSACTION",
- 3: "INTERNAL_ERROR",
- 4: "NEED_INDEX",
- 5: "TIMEOUT",
- 6: "PERMISSION_DENIED",
- 7: "BIGTABLE_ERROR",
- 8: "COMMITTED_BUT_STILL_APPLYING",
- 9: "CAPABILITY_DISABLED",
- 10: "TRY_ALTERNATE_BACKEND",
- 11: "SAFE_TIME_TOO_OLD",
-}
-var Error_ErrorCode_value = map[string]int32{
- "BAD_REQUEST": 1,
- "CONCURRENT_TRANSACTION": 2,
- "INTERNAL_ERROR": 3,
- "NEED_INDEX": 4,
- "TIMEOUT": 5,
- "PERMISSION_DENIED": 6,
- "BIGTABLE_ERROR": 7,
- "COMMITTED_BUT_STILL_APPLYING": 8,
- "CAPABILITY_DISABLED": 9,
- "TRY_ALTERNATE_BACKEND": 10,
- "SAFE_TIME_TOO_OLD": 11,
-}
-
-func (x Error_ErrorCode) Enum() *Error_ErrorCode {
- p := new(Error_ErrorCode)
- *p = x
- return p
-}
-func (x Error_ErrorCode) String() string {
- return proto.EnumName(Error_ErrorCode_name, int32(x))
-}
-func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Error_ErrorCode_value, data, "Error_ErrorCode")
- if err != nil {
- return err
- }
- *x = Error_ErrorCode(value)
- return nil
-}
-func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0}
-}
-
-type PutRequest_AutoIdPolicy int32
-
-const (
- PutRequest_CURRENT PutRequest_AutoIdPolicy = 0
- PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1
-)
-
-var PutRequest_AutoIdPolicy_name = map[int32]string{
- 0: "CURRENT",
- 1: "SEQUENTIAL",
-}
-var PutRequest_AutoIdPolicy_value = map[string]int32{
- "CURRENT": 0,
- "SEQUENTIAL": 1,
-}
-
-func (x PutRequest_AutoIdPolicy) Enum() *PutRequest_AutoIdPolicy {
- p := new(PutRequest_AutoIdPolicy)
- *p = x
- return p
-}
-func (x PutRequest_AutoIdPolicy) String() string {
- return proto.EnumName(PutRequest_AutoIdPolicy_name, int32(x))
-}
-func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(PutRequest_AutoIdPolicy_value, data, "PutRequest_AutoIdPolicy")
- if err != nil {
- return err
- }
- *x = PutRequest_AutoIdPolicy(value)
- return nil
-}
-func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0}
-}
-
-type BeginTransactionRequest_TransactionMode int32
-
-const (
- BeginTransactionRequest_UNKNOWN BeginTransactionRequest_TransactionMode = 0
- BeginTransactionRequest_READ_ONLY BeginTransactionRequest_TransactionMode = 1
- BeginTransactionRequest_READ_WRITE BeginTransactionRequest_TransactionMode = 2
-)
-
-var BeginTransactionRequest_TransactionMode_name = map[int32]string{
- 0: "UNKNOWN",
- 1: "READ_ONLY",
- 2: "READ_WRITE",
-}
-var BeginTransactionRequest_TransactionMode_value = map[string]int32{
- "UNKNOWN": 0,
- "READ_ONLY": 1,
- "READ_WRITE": 2,
-}
-
-func (x BeginTransactionRequest_TransactionMode) Enum() *BeginTransactionRequest_TransactionMode {
- p := new(BeginTransactionRequest_TransactionMode)
- *p = x
- return p
-}
-func (x BeginTransactionRequest_TransactionMode) String() string {
- return proto.EnumName(BeginTransactionRequest_TransactionMode_name, int32(x))
-}
-func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_TransactionMode_value, data, "BeginTransactionRequest_TransactionMode")
- if err != nil {
- return err
- }
- *x = BeginTransactionRequest_TransactionMode(value)
- return nil
-}
-func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0}
-}
-
-type Action struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Action) Reset() { *m = Action{} }
-func (m *Action) String() string { return proto.CompactTextString(m) }
-func (*Action) ProtoMessage() {}
-func (*Action) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0}
-}
-func (m *Action) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Action.Unmarshal(m, b)
-}
-func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Action.Marshal(b, m, deterministic)
-}
-func (dst *Action) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Action.Merge(dst, src)
-}
-func (m *Action) XXX_Size() int {
- return xxx_messageInfo_Action.Size(m)
-}
-func (m *Action) XXX_DiscardUnknown() {
- xxx_messageInfo_Action.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Action proto.InternalMessageInfo
-
-type PropertyValue struct {
- Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"`
- BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"`
- StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"`
- DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"`
- Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"`
- Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"`
- Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PropertyValue) Reset() { *m = PropertyValue{} }
-func (m *PropertyValue) String() string { return proto.CompactTextString(m) }
-func (*PropertyValue) ProtoMessage() {}
-func (*PropertyValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1}
-}
-func (m *PropertyValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PropertyValue.Unmarshal(m, b)
-}
-func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic)
-}
-func (dst *PropertyValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PropertyValue.Merge(dst, src)
-}
-func (m *PropertyValue) XXX_Size() int {
- return xxx_messageInfo_PropertyValue.Size(m)
-}
-func (m *PropertyValue) XXX_DiscardUnknown() {
- xxx_messageInfo_PropertyValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PropertyValue proto.InternalMessageInfo
-
-func (m *PropertyValue) GetInt64Value() int64 {
- if m != nil && m.Int64Value != nil {
- return *m.Int64Value
- }
- return 0
-}
-
-func (m *PropertyValue) GetBooleanValue() bool {
- if m != nil && m.BooleanValue != nil {
- return *m.BooleanValue
- }
- return false
-}
-
-func (m *PropertyValue) GetStringValue() string {
- if m != nil && m.StringValue != nil {
- return *m.StringValue
- }
- return ""
-}
-
-func (m *PropertyValue) GetDoubleValue() float64 {
- if m != nil && m.DoubleValue != nil {
- return *m.DoubleValue
- }
- return 0
-}
-
-func (m *PropertyValue) GetPointvalue() *PropertyValue_PointValue {
- if m != nil {
- return m.Pointvalue
- }
- return nil
-}
-
-func (m *PropertyValue) GetUservalue() *PropertyValue_UserValue {
- if m != nil {
- return m.Uservalue
- }
- return nil
-}
-
-func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue {
- if m != nil {
- return m.Referencevalue
- }
- return nil
-}
-
-type PropertyValue_PointValue struct {
- X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"`
- Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} }
-func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) }
-func (*PropertyValue_PointValue) ProtoMessage() {}
-func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0}
-}
-func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b)
-}
-func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic)
-}
-func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src)
-}
-func (m *PropertyValue_PointValue) XXX_Size() int {
- return xxx_messageInfo_PropertyValue_PointValue.Size(m)
-}
-func (m *PropertyValue_PointValue) XXX_DiscardUnknown() {
- xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo
-
-func (m *PropertyValue_PointValue) GetX() float64 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-func (m *PropertyValue_PointValue) GetY() float64 {
- if m != nil && m.Y != nil {
- return *m.Y
- }
- return 0
-}
-
-type PropertyValue_UserValue struct {
- Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"`
- AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
- Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"`
- FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"`
- FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} }
-func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) }
-func (*PropertyValue_UserValue) ProtoMessage() {}
-func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1}
-}
-func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b)
-}
-func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic)
-}
-func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src)
-}
-func (m *PropertyValue_UserValue) XXX_Size() int {
- return xxx_messageInfo_PropertyValue_UserValue.Size(m)
-}
-func (m *PropertyValue_UserValue) XXX_DiscardUnknown() {
- xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo
-
-func (m *PropertyValue_UserValue) GetEmail() string {
- if m != nil && m.Email != nil {
- return *m.Email
- }
- return ""
-}
-
-func (m *PropertyValue_UserValue) GetAuthDomain() string {
- if m != nil && m.AuthDomain != nil {
- return *m.AuthDomain
- }
- return ""
-}
-
-func (m *PropertyValue_UserValue) GetNickname() string {
- if m != nil && m.Nickname != nil {
- return *m.Nickname
- }
- return ""
-}
-
-func (m *PropertyValue_UserValue) GetFederatedIdentity() string {
- if m != nil && m.FederatedIdentity != nil {
- return *m.FederatedIdentity
- }
- return ""
-}
-
-func (m *PropertyValue_UserValue) GetFederatedProvider() string {
- if m != nil && m.FederatedProvider != nil {
- return *m.FederatedProvider
- }
- return ""
-}
-
-type PropertyValue_ReferenceValue struct {
- App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"`
- NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"`
- Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} }
-func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) }
-func (*PropertyValue_ReferenceValue) ProtoMessage() {}
-func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2}
-}
-func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b)
-}
-func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic)
-}
-func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src)
-}
-func (m *PropertyValue_ReferenceValue) XXX_Size() int {
- return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m)
-}
-func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() {
- xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo
-
-func (m *PropertyValue_ReferenceValue) GetApp() string {
- if m != nil && m.App != nil {
- return *m.App
- }
- return ""
-}
-
-func (m *PropertyValue_ReferenceValue) GetNameSpace() string {
- if m != nil && m.NameSpace != nil {
- return *m.NameSpace
- }
- return ""
-}
-
-func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement {
- if m != nil {
- return m.Pathelement
- }
- return nil
-}
-
-type PropertyValue_ReferenceValue_PathElement struct {
- Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"`
- Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"`
- Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PropertyValue_ReferenceValue_PathElement) Reset() {
- *m = PropertyValue_ReferenceValue_PathElement{}
-}
-func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) }
-func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {}
-func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0}
-}
-func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b)
-}
-func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic)
-}
-func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src)
-}
-func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int {
- return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m)
-}
-func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() {
- xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo
-
-func (m *PropertyValue_ReferenceValue_PathElement) GetType() string {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return ""
-}
-
-func (m *PropertyValue_ReferenceValue_PathElement) GetId() int64 {
- if m != nil && m.Id != nil {
- return *m.Id
- }
- return 0
-}
-
-func (m *PropertyValue_ReferenceValue_PathElement) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-type Property struct {
- Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.Property_Meaning,def=0" json:"meaning,omitempty"`
- MeaningUri *string `protobuf:"bytes,2,opt,name=meaning_uri,json=meaningUri" json:"meaning_uri,omitempty"`
- Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"`
- Value *PropertyValue `protobuf:"bytes,5,req,name=value" json:"value,omitempty"`
- Multiple *bool `protobuf:"varint,4,req,name=multiple" json:"multiple,omitempty"`
- Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"`
- FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"`
- Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Property) Reset() { *m = Property{} }
-func (m *Property) String() string { return proto.CompactTextString(m) }
-func (*Property) ProtoMessage() {}
-func (*Property) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2}
-}
-func (m *Property) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Property.Unmarshal(m, b)
-}
-func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Property.Marshal(b, m, deterministic)
-}
-func (dst *Property) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Property.Merge(dst, src)
-}
-func (m *Property) XXX_Size() int {
- return xxx_messageInfo_Property.Size(m)
-}
-func (m *Property) XXX_DiscardUnknown() {
- xxx_messageInfo_Property.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Property proto.InternalMessageInfo
-
-const Default_Property_Meaning Property_Meaning = Property_NO_MEANING
-const Default_Property_Searchable bool = false
-const Default_Property_Locale string = "en"
-
-func (m *Property) GetMeaning() Property_Meaning {
- if m != nil && m.Meaning != nil {
- return *m.Meaning
- }
- return Default_Property_Meaning
-}
-
-func (m *Property) GetMeaningUri() string {
- if m != nil && m.MeaningUri != nil {
- return *m.MeaningUri
- }
- return ""
-}
-
-func (m *Property) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *Property) GetValue() *PropertyValue {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *Property) GetMultiple() bool {
- if m != nil && m.Multiple != nil {
- return *m.Multiple
- }
- return false
-}
-
-func (m *Property) GetSearchable() bool {
- if m != nil && m.Searchable != nil {
- return *m.Searchable
- }
- return Default_Property_Searchable
-}
-
-func (m *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption {
- if m != nil && m.FtsTokenizationOption != nil {
- return *m.FtsTokenizationOption
- }
- return Property_HTML
-}
-
-func (m *Property) GetLocale() string {
- if m != nil && m.Locale != nil {
- return *m.Locale
- }
- return Default_Property_Locale
-}
-
-type Path struct {
- Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Path) Reset() { *m = Path{} }
-func (m *Path) String() string { return proto.CompactTextString(m) }
-func (*Path) ProtoMessage() {}
-func (*Path) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3}
-}
-func (m *Path) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Path.Unmarshal(m, b)
-}
-func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Path.Marshal(b, m, deterministic)
-}
-func (dst *Path) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Path.Merge(dst, src)
-}
-func (m *Path) XXX_Size() int {
- return xxx_messageInfo_Path.Size(m)
-}
-func (m *Path) XXX_DiscardUnknown() {
- xxx_messageInfo_Path.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Path proto.InternalMessageInfo
-
-func (m *Path) GetElement() []*Path_Element {
- if m != nil {
- return m.Element
- }
- return nil
-}
-
-type Path_Element struct {
- Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"`
- Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"`
- Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Path_Element) Reset() { *m = Path_Element{} }
-func (m *Path_Element) String() string { return proto.CompactTextString(m) }
-func (*Path_Element) ProtoMessage() {}
-func (*Path_Element) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0}
-}
-func (m *Path_Element) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Path_Element.Unmarshal(m, b)
-}
-func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic)
-}
-func (dst *Path_Element) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Path_Element.Merge(dst, src)
-}
-func (m *Path_Element) XXX_Size() int {
- return xxx_messageInfo_Path_Element.Size(m)
-}
-func (m *Path_Element) XXX_DiscardUnknown() {
- xxx_messageInfo_Path_Element.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Path_Element proto.InternalMessageInfo
-
-func (m *Path_Element) GetType() string {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return ""
-}
-
-func (m *Path_Element) GetId() int64 {
- if m != nil && m.Id != nil {
- return *m.Id
- }
- return 0
-}
-
-func (m *Path_Element) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-type Reference struct {
- App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"`
- NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"`
- Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Reference) Reset() { *m = Reference{} }
-func (m *Reference) String() string { return proto.CompactTextString(m) }
-func (*Reference) ProtoMessage() {}
-func (*Reference) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4}
-}
-func (m *Reference) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Reference.Unmarshal(m, b)
-}
-func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Reference.Marshal(b, m, deterministic)
-}
-func (dst *Reference) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Reference.Merge(dst, src)
-}
-func (m *Reference) XXX_Size() int {
- return xxx_messageInfo_Reference.Size(m)
-}
-func (m *Reference) XXX_DiscardUnknown() {
- xxx_messageInfo_Reference.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Reference proto.InternalMessageInfo
-
-func (m *Reference) GetApp() string {
- if m != nil && m.App != nil {
- return *m.App
- }
- return ""
-}
-
-func (m *Reference) GetNameSpace() string {
- if m != nil && m.NameSpace != nil {
- return *m.NameSpace
- }
- return ""
-}
-
-func (m *Reference) GetPath() *Path {
- if m != nil {
- return m.Path
- }
- return nil
-}
-
-type User struct {
- Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"`
- AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
- Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
- FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"`
- FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *User) Reset() { *m = User{} }
-func (m *User) String() string { return proto.CompactTextString(m) }
-func (*User) ProtoMessage() {}
-func (*User) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5}
-}
-func (m *User) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_User.Unmarshal(m, b)
-}
-func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_User.Marshal(b, m, deterministic)
-}
-func (dst *User) XXX_Merge(src proto.Message) {
- xxx_messageInfo_User.Merge(dst, src)
-}
-func (m *User) XXX_Size() int {
- return xxx_messageInfo_User.Size(m)
-}
-func (m *User) XXX_DiscardUnknown() {
- xxx_messageInfo_User.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_User proto.InternalMessageInfo
-
-func (m *User) GetEmail() string {
- if m != nil && m.Email != nil {
- return *m.Email
- }
- return ""
-}
-
-func (m *User) GetAuthDomain() string {
- if m != nil && m.AuthDomain != nil {
- return *m.AuthDomain
- }
- return ""
-}
-
-func (m *User) GetNickname() string {
- if m != nil && m.Nickname != nil {
- return *m.Nickname
- }
- return ""
-}
-
-func (m *User) GetFederatedIdentity() string {
- if m != nil && m.FederatedIdentity != nil {
- return *m.FederatedIdentity
- }
- return ""
-}
-
-func (m *User) GetFederatedProvider() string {
- if m != nil && m.FederatedProvider != nil {
- return *m.FederatedProvider
- }
- return ""
-}
-
-type EntityProto struct {
- Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"`
- EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"`
- Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"`
- Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"`
- KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"`
- Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"`
- RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"`
- Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EntityProto) Reset() { *m = EntityProto{} }
-func (m *EntityProto) String() string { return proto.CompactTextString(m) }
-func (*EntityProto) ProtoMessage() {}
-func (*EntityProto) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6}
-}
-func (m *EntityProto) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_EntityProto.Unmarshal(m, b)
-}
-func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic)
-}
-func (dst *EntityProto) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EntityProto.Merge(dst, src)
-}
-func (m *EntityProto) XXX_Size() int {
- return xxx_messageInfo_EntityProto.Size(m)
-}
-func (m *EntityProto) XXX_DiscardUnknown() {
- xxx_messageInfo_EntityProto.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EntityProto proto.InternalMessageInfo
-
-func (m *EntityProto) GetKey() *Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *EntityProto) GetEntityGroup() *Path {
- if m != nil {
- return m.EntityGroup
- }
- return nil
-}
-
-func (m *EntityProto) GetOwner() *User {
- if m != nil {
- return m.Owner
- }
- return nil
-}
-
-func (m *EntityProto) GetKind() EntityProto_Kind {
- if m != nil && m.Kind != nil {
- return *m.Kind
- }
- return EntityProto_GD_CONTACT
-}
-
-func (m *EntityProto) GetKindUri() string {
- if m != nil && m.KindUri != nil {
- return *m.KindUri
- }
- return ""
-}
-
-func (m *EntityProto) GetProperty() []*Property {
- if m != nil {
- return m.Property
- }
- return nil
-}
-
-func (m *EntityProto) GetRawProperty() []*Property {
- if m != nil {
- return m.RawProperty
- }
- return nil
-}
-
-func (m *EntityProto) GetRank() int32 {
- if m != nil && m.Rank != nil {
- return *m.Rank
- }
- return 0
-}
-
-type CompositeProperty struct {
- IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"`
- Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompositeProperty) Reset() { *m = CompositeProperty{} }
-func (m *CompositeProperty) String() string { return proto.CompactTextString(m) }
-func (*CompositeProperty) ProtoMessage() {}
-func (*CompositeProperty) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7}
-}
-func (m *CompositeProperty) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompositeProperty.Unmarshal(m, b)
-}
-func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic)
-}
-func (dst *CompositeProperty) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompositeProperty.Merge(dst, src)
-}
-func (m *CompositeProperty) XXX_Size() int {
- return xxx_messageInfo_CompositeProperty.Size(m)
-}
-func (m *CompositeProperty) XXX_DiscardUnknown() {
- xxx_messageInfo_CompositeProperty.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo
-
-func (m *CompositeProperty) GetIndexId() int64 {
- if m != nil && m.IndexId != nil {
- return *m.IndexId
- }
- return 0
-}
-
-func (m *CompositeProperty) GetValue() []string {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type Index struct {
- EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"`
- Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"`
- Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Index) Reset() { *m = Index{} }
-func (m *Index) String() string { return proto.CompactTextString(m) }
-func (*Index) ProtoMessage() {}
-func (*Index) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8}
-}
-func (m *Index) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Index.Unmarshal(m, b)
-}
-func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Index.Marshal(b, m, deterministic)
-}
-func (dst *Index) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Index.Merge(dst, src)
-}
-func (m *Index) XXX_Size() int {
- return xxx_messageInfo_Index.Size(m)
-}
-func (m *Index) XXX_DiscardUnknown() {
- xxx_messageInfo_Index.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Index proto.InternalMessageInfo
-
-func (m *Index) GetEntityType() string {
- if m != nil && m.EntityType != nil {
- return *m.EntityType
- }
- return ""
-}
-
-func (m *Index) GetAncestor() bool {
- if m != nil && m.Ancestor != nil {
- return *m.Ancestor
- }
- return false
-}
-
-func (m *Index) GetProperty() []*Index_Property {
- if m != nil {
- return m.Property
- }
- return nil
-}
-
-type Index_Property struct {
- Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"`
- Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Index_Property) Reset() { *m = Index_Property{} }
-func (m *Index_Property) String() string { return proto.CompactTextString(m) }
-func (*Index_Property) ProtoMessage() {}
-func (*Index_Property) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0}
-}
-func (m *Index_Property) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Index_Property.Unmarshal(m, b)
-}
-func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic)
-}
-func (dst *Index_Property) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Index_Property.Merge(dst, src)
-}
-func (m *Index_Property) XXX_Size() int {
- return xxx_messageInfo_Index_Property.Size(m)
-}
-func (m *Index_Property) XXX_DiscardUnknown() {
- xxx_messageInfo_Index_Property.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Index_Property proto.InternalMessageInfo
-
-const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING
-
-func (m *Index_Property) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *Index_Property) GetDirection() Index_Property_Direction {
- if m != nil && m.Direction != nil {
- return *m.Direction
- }
- return Default_Index_Property_Direction
-}
-
-type CompositeIndex struct {
- AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
- Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"`
- Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"`
- State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"`
- OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompositeIndex) Reset() { *m = CompositeIndex{} }
-func (m *CompositeIndex) String() string { return proto.CompactTextString(m) }
-func (*CompositeIndex) ProtoMessage() {}
-func (*CompositeIndex) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9}
-}
-func (m *CompositeIndex) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompositeIndex.Unmarshal(m, b)
-}
-func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic)
-}
-func (dst *CompositeIndex) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompositeIndex.Merge(dst, src)
-}
-func (m *CompositeIndex) XXX_Size() int {
- return xxx_messageInfo_CompositeIndex.Size(m)
-}
-func (m *CompositeIndex) XXX_DiscardUnknown() {
- xxx_messageInfo_CompositeIndex.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo
-
-const Default_CompositeIndex_OnlyUseIfRequired bool = false
-
-func (m *CompositeIndex) GetAppId() string {
- if m != nil && m.AppId != nil {
- return *m.AppId
- }
- return ""
-}
-
-func (m *CompositeIndex) GetId() int64 {
- if m != nil && m.Id != nil {
- return *m.Id
- }
- return 0
-}
-
-func (m *CompositeIndex) GetDefinition() *Index {
- if m != nil {
- return m.Definition
- }
- return nil
-}
-
-func (m *CompositeIndex) GetState() CompositeIndex_State {
- if m != nil && m.State != nil {
- return *m.State
- }
- return CompositeIndex_WRITE_ONLY
-}
-
-func (m *CompositeIndex) GetOnlyUseIfRequired() bool {
- if m != nil && m.OnlyUseIfRequired != nil {
- return *m.OnlyUseIfRequired
- }
- return Default_CompositeIndex_OnlyUseIfRequired
-}
-
-type IndexPostfix struct {
- IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"`
- Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
- Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *IndexPostfix) Reset() { *m = IndexPostfix{} }
-func (m *IndexPostfix) String() string { return proto.CompactTextString(m) }
-func (*IndexPostfix) ProtoMessage() {}
-func (*IndexPostfix) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10}
-}
-func (m *IndexPostfix) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_IndexPostfix.Unmarshal(m, b)
-}
-func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic)
-}
-func (dst *IndexPostfix) XXX_Merge(src proto.Message) {
- xxx_messageInfo_IndexPostfix.Merge(dst, src)
-}
-func (m *IndexPostfix) XXX_Size() int {
- return xxx_messageInfo_IndexPostfix.Size(m)
-}
-func (m *IndexPostfix) XXX_DiscardUnknown() {
- xxx_messageInfo_IndexPostfix.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo
-
-const Default_IndexPostfix_Before bool = true
-
-func (m *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue {
- if m != nil {
- return m.IndexValue
- }
- return nil
-}
-
-func (m *IndexPostfix) GetKey() *Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *IndexPostfix) GetBefore() bool {
- if m != nil && m.Before != nil {
- return *m.Before
- }
- return Default_IndexPostfix_Before
-}
-
-type IndexPostfix_IndexValue struct {
- PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"`
- Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} }
-func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) }
-func (*IndexPostfix_IndexValue) ProtoMessage() {}
-func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0}
-}
-func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b)
-}
-func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic)
-}
-func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src)
-}
-func (m *IndexPostfix_IndexValue) XXX_Size() int {
- return xxx_messageInfo_IndexPostfix_IndexValue.Size(m)
-}
-func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() {
- xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo
-
-func (m *IndexPostfix_IndexValue) GetPropertyName() string {
- if m != nil && m.PropertyName != nil {
- return *m.PropertyName
- }
- return ""
-}
-
-func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type IndexPosition struct {
- Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
- Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *IndexPosition) Reset() { *m = IndexPosition{} }
-func (m *IndexPosition) String() string { return proto.CompactTextString(m) }
-func (*IndexPosition) ProtoMessage() {}
-func (*IndexPosition) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11}
-}
-func (m *IndexPosition) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_IndexPosition.Unmarshal(m, b)
-}
-func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic)
-}
-func (dst *IndexPosition) XXX_Merge(src proto.Message) {
- xxx_messageInfo_IndexPosition.Merge(dst, src)
-}
-func (m *IndexPosition) XXX_Size() int {
- return xxx_messageInfo_IndexPosition.Size(m)
-}
-func (m *IndexPosition) XXX_DiscardUnknown() {
- xxx_messageInfo_IndexPosition.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_IndexPosition proto.InternalMessageInfo
-
-const Default_IndexPosition_Before bool = true
-
-func (m *IndexPosition) GetKey() string {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return ""
-}
-
-func (m *IndexPosition) GetBefore() bool {
- if m != nil && m.Before != nil {
- return *m.Before
- }
- return Default_IndexPosition_Before
-}
-
-type Snapshot struct {
- Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Snapshot) Reset() { *m = Snapshot{} }
-func (m *Snapshot) String() string { return proto.CompactTextString(m) }
-func (*Snapshot) ProtoMessage() {}
-func (*Snapshot) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12}
-}
-func (m *Snapshot) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Snapshot.Unmarshal(m, b)
-}
-func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
-}
-func (dst *Snapshot) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Snapshot.Merge(dst, src)
-}
-func (m *Snapshot) XXX_Size() int {
- return xxx_messageInfo_Snapshot.Size(m)
-}
-func (m *Snapshot) XXX_DiscardUnknown() {
- xxx_messageInfo_Snapshot.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Snapshot proto.InternalMessageInfo
-
-func (m *Snapshot) GetTs() int64 {
- if m != nil && m.Ts != nil {
- return *m.Ts
- }
- return 0
-}
-
-type InternalHeader struct {
- Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *InternalHeader) Reset() { *m = InternalHeader{} }
-func (m *InternalHeader) String() string { return proto.CompactTextString(m) }
-func (*InternalHeader) ProtoMessage() {}
-func (*InternalHeader) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13}
-}
-func (m *InternalHeader) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_InternalHeader.Unmarshal(m, b)
-}
-func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic)
-}
-func (dst *InternalHeader) XXX_Merge(src proto.Message) {
- xxx_messageInfo_InternalHeader.Merge(dst, src)
-}
-func (m *InternalHeader) XXX_Size() int {
- return xxx_messageInfo_InternalHeader.Size(m)
-}
-func (m *InternalHeader) XXX_DiscardUnknown() {
- xxx_messageInfo_InternalHeader.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_InternalHeader proto.InternalMessageInfo
-
-func (m *InternalHeader) GetQos() string {
- if m != nil && m.Qos != nil {
- return *m.Qos
- }
- return ""
-}
-
-type Transaction struct {
- Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"`
- Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"`
- App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"`
- MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Transaction) Reset() { *m = Transaction{} }
-func (m *Transaction) String() string { return proto.CompactTextString(m) }
-func (*Transaction) ProtoMessage() {}
-func (*Transaction) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14}
-}
-func (m *Transaction) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Transaction.Unmarshal(m, b)
-}
-func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Transaction.Marshal(b, m, deterministic)
-}
-func (dst *Transaction) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Transaction.Merge(dst, src)
-}
-func (m *Transaction) XXX_Size() int {
- return xxx_messageInfo_Transaction.Size(m)
-}
-func (m *Transaction) XXX_DiscardUnknown() {
- xxx_messageInfo_Transaction.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Transaction proto.InternalMessageInfo
-
-const Default_Transaction_MarkChanges bool = false
-
-func (m *Transaction) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *Transaction) GetHandle() uint64 {
- if m != nil && m.Handle != nil {
- return *m.Handle
- }
- return 0
-}
-
-func (m *Transaction) GetApp() string {
- if m != nil && m.App != nil {
- return *m.App
- }
- return ""
-}
-
-func (m *Transaction) GetMarkChanges() bool {
- if m != nil && m.MarkChanges != nil {
- return *m.MarkChanges
- }
- return Default_Transaction_MarkChanges
-}
-
-type Query struct {
- Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"`
- App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"`
- NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"`
- Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"`
- Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"`
- Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"`
- SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"`
- Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"`
- Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"`
- Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"`
- Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"`
- Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"`
- CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"`
- EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"`
- CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"`
- RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"`
- KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"`
- Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"`
- Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"`
- FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"`
- Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"`
- PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"`
- GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"`
- Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"`
- MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"`
- SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"`
- PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Query) Reset() { *m = Query{} }
-func (m *Query) String() string { return proto.CompactTextString(m) }
-func (*Query) ProtoMessage() {}
-func (*Query) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15}
-}
-func (m *Query) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Query.Unmarshal(m, b)
-}
-func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Query.Marshal(b, m, deterministic)
-}
-func (dst *Query) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Query.Merge(dst, src)
-}
-func (m *Query) XXX_Size() int {
- return xxx_messageInfo_Query.Size(m)
-}
-func (m *Query) XXX_DiscardUnknown() {
- xxx_messageInfo_Query.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Query proto.InternalMessageInfo
-
-const Default_Query_Offset int32 = 0
-const Default_Query_RequirePerfectPlan bool = false
-const Default_Query_KeysOnly bool = false
-const Default_Query_Compile bool = false
-const Default_Query_PersistOffset bool = false
-
-func (m *Query) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *Query) GetApp() string {
- if m != nil && m.App != nil {
- return *m.App
- }
- return ""
-}
-
-func (m *Query) GetNameSpace() string {
- if m != nil && m.NameSpace != nil {
- return *m.NameSpace
- }
- return ""
-}
-
-func (m *Query) GetKind() string {
- if m != nil && m.Kind != nil {
- return *m.Kind
- }
- return ""
-}
-
-func (m *Query) GetAncestor() *Reference {
- if m != nil {
- return m.Ancestor
- }
- return nil
-}
-
-func (m *Query) GetFilter() []*Query_Filter {
- if m != nil {
- return m.Filter
- }
- return nil
-}
-
-func (m *Query) GetSearchQuery() string {
- if m != nil && m.SearchQuery != nil {
- return *m.SearchQuery
- }
- return ""
-}
-
-func (m *Query) GetOrder() []*Query_Order {
- if m != nil {
- return m.Order
- }
- return nil
-}
-
-func (m *Query) GetHint() Query_Hint {
- if m != nil && m.Hint != nil {
- return *m.Hint
- }
- return Query_ORDER_FIRST
-}
-
-func (m *Query) GetCount() int32 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-func (m *Query) GetOffset() int32 {
- if m != nil && m.Offset != nil {
- return *m.Offset
- }
- return Default_Query_Offset
-}
-
-func (m *Query) GetLimit() int32 {
- if m != nil && m.Limit != nil {
- return *m.Limit
- }
- return 0
-}
-
-func (m *Query) GetCompiledCursor() *CompiledCursor {
- if m != nil {
- return m.CompiledCursor
- }
- return nil
-}
-
-func (m *Query) GetEndCompiledCursor() *CompiledCursor {
- if m != nil {
- return m.EndCompiledCursor
- }
- return nil
-}
-
-func (m *Query) GetCompositeIndex() []*CompositeIndex {
- if m != nil {
- return m.CompositeIndex
- }
- return nil
-}
-
-func (m *Query) GetRequirePerfectPlan() bool {
- if m != nil && m.RequirePerfectPlan != nil {
- return *m.RequirePerfectPlan
- }
- return Default_Query_RequirePerfectPlan
-}
-
-func (m *Query) GetKeysOnly() bool {
- if m != nil && m.KeysOnly != nil {
- return *m.KeysOnly
- }
- return Default_Query_KeysOnly
-}
-
-func (m *Query) GetTransaction() *Transaction {
- if m != nil {
- return m.Transaction
- }
- return nil
-}
-
-func (m *Query) GetCompile() bool {
- if m != nil && m.Compile != nil {
- return *m.Compile
- }
- return Default_Query_Compile
-}
-
-func (m *Query) GetFailoverMs() int64 {
- if m != nil && m.FailoverMs != nil {
- return *m.FailoverMs
- }
- return 0
-}
-
-func (m *Query) GetStrong() bool {
- if m != nil && m.Strong != nil {
- return *m.Strong
- }
- return false
-}
-
-func (m *Query) GetPropertyName() []string {
- if m != nil {
- return m.PropertyName
- }
- return nil
-}
-
-func (m *Query) GetGroupByPropertyName() []string {
- if m != nil {
- return m.GroupByPropertyName
- }
- return nil
-}
-
-func (m *Query) GetDistinct() bool {
- if m != nil && m.Distinct != nil {
- return *m.Distinct
- }
- return false
-}
-
-func (m *Query) GetMinSafeTimeSeconds() int64 {
- if m != nil && m.MinSafeTimeSeconds != nil {
- return *m.MinSafeTimeSeconds
- }
- return 0
-}
-
-func (m *Query) GetSafeReplicaName() []string {
- if m != nil {
- return m.SafeReplicaName
- }
- return nil
-}
-
-func (m *Query) GetPersistOffset() bool {
- if m != nil && m.PersistOffset != nil {
- return *m.PersistOffset
- }
- return Default_Query_PersistOffset
-}
-
-type Query_Filter struct {
- Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"`
- Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Query_Filter) Reset() { *m = Query_Filter{} }
-func (m *Query_Filter) String() string { return proto.CompactTextString(m) }
-func (*Query_Filter) ProtoMessage() {}
-func (*Query_Filter) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0}
-}
-func (m *Query_Filter) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Query_Filter.Unmarshal(m, b)
-}
-func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic)
-}
-func (dst *Query_Filter) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Query_Filter.Merge(dst, src)
-}
-func (m *Query_Filter) XXX_Size() int {
- return xxx_messageInfo_Query_Filter.Size(m)
-}
-func (m *Query_Filter) XXX_DiscardUnknown() {
- xxx_messageInfo_Query_Filter.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Query_Filter proto.InternalMessageInfo
-
-func (m *Query_Filter) GetOp() Query_Filter_Operator {
- if m != nil && m.Op != nil {
- return *m.Op
- }
- return Query_Filter_LESS_THAN
-}
-
-func (m *Query_Filter) GetProperty() []*Property {
- if m != nil {
- return m.Property
- }
- return nil
-}
-
-type Query_Order struct {
- Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"`
- Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Query_Order) Reset() { *m = Query_Order{} }
-func (m *Query_Order) String() string { return proto.CompactTextString(m) }
-func (*Query_Order) ProtoMessage() {}
-func (*Query_Order) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1}
-}
-func (m *Query_Order) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Query_Order.Unmarshal(m, b)
-}
-func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic)
-}
-func (dst *Query_Order) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Query_Order.Merge(dst, src)
-}
-func (m *Query_Order) XXX_Size() int {
- return xxx_messageInfo_Query_Order.Size(m)
-}
-func (m *Query_Order) XXX_DiscardUnknown() {
- xxx_messageInfo_Query_Order.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Query_Order proto.InternalMessageInfo
-
-const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING
-
-func (m *Query_Order) GetProperty() string {
- if m != nil && m.Property != nil {
- return *m.Property
- }
- return ""
-}
-
-func (m *Query_Order) GetDirection() Query_Order_Direction {
- if m != nil && m.Direction != nil {
- return *m.Direction
- }
- return Default_Query_Order_Direction
-}
-
-type CompiledQuery struct {
- Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"`
- Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"`
- IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"`
- Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"`
- Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"`
- KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"`
- PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"`
- DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"`
- Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledQuery) Reset() { *m = CompiledQuery{} }
-func (m *CompiledQuery) String() string { return proto.CompactTextString(m) }
-func (*CompiledQuery) ProtoMessage() {}
-func (*CompiledQuery) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16}
-}
-func (m *CompiledQuery) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledQuery.Unmarshal(m, b)
-}
-func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic)
-}
-func (dst *CompiledQuery) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledQuery.Merge(dst, src)
-}
-func (m *CompiledQuery) XXX_Size() int {
- return xxx_messageInfo_CompiledQuery.Size(m)
-}
-func (m *CompiledQuery) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledQuery.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo
-
-const Default_CompiledQuery_Offset int32 = 0
-
-func (m *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan {
- if m != nil {
- return m.Primaryscan
- }
- return nil
-}
-
-func (m *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan {
- if m != nil {
- return m.Mergejoinscan
- }
- return nil
-}
-
-func (m *CompiledQuery) GetIndexDef() *Index {
- if m != nil {
- return m.IndexDef
- }
- return nil
-}
-
-func (m *CompiledQuery) GetOffset() int32 {
- if m != nil && m.Offset != nil {
- return *m.Offset
- }
- return Default_CompiledQuery_Offset
-}
-
-func (m *CompiledQuery) GetLimit() int32 {
- if m != nil && m.Limit != nil {
- return *m.Limit
- }
- return 0
-}
-
-func (m *CompiledQuery) GetKeysOnly() bool {
- if m != nil && m.KeysOnly != nil {
- return *m.KeysOnly
- }
- return false
-}
-
-func (m *CompiledQuery) GetPropertyName() []string {
- if m != nil {
- return m.PropertyName
- }
- return nil
-}
-
-func (m *CompiledQuery) GetDistinctInfixSize() int32 {
- if m != nil && m.DistinctInfixSize != nil {
- return *m.DistinctInfixSize
- }
- return 0
-}
-
-func (m *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter {
- if m != nil {
- return m.Entityfilter
- }
- return nil
-}
-
-type CompiledQuery_PrimaryScan struct {
- IndexName *string `protobuf:"bytes,2,opt,name=index_name,json=indexName" json:"index_name,omitempty"`
- StartKey *string `protobuf:"bytes,3,opt,name=start_key,json=startKey" json:"start_key,omitempty"`
- StartInclusive *bool `protobuf:"varint,4,opt,name=start_inclusive,json=startInclusive" json:"start_inclusive,omitempty"`
- EndKey *string `protobuf:"bytes,5,opt,name=end_key,json=endKey" json:"end_key,omitempty"`
- EndInclusive *bool `protobuf:"varint,6,opt,name=end_inclusive,json=endInclusive" json:"end_inclusive,omitempty"`
- StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"`
- EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"`
- EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} }
-func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) }
-func (*CompiledQuery_PrimaryScan) ProtoMessage() {}
-func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0}
-}
-func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b)
-}
-func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic)
-}
-func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src)
-}
-func (m *CompiledQuery_PrimaryScan) XXX_Size() int {
- return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m)
-}
-func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo
-
-func (m *CompiledQuery_PrimaryScan) GetIndexName() string {
- if m != nil && m.IndexName != nil {
- return *m.IndexName
- }
- return ""
-}
-
-func (m *CompiledQuery_PrimaryScan) GetStartKey() string {
- if m != nil && m.StartKey != nil {
- return *m.StartKey
- }
- return ""
-}
-
-func (m *CompiledQuery_PrimaryScan) GetStartInclusive() bool {
- if m != nil && m.StartInclusive != nil {
- return *m.StartInclusive
- }
- return false
-}
-
-func (m *CompiledQuery_PrimaryScan) GetEndKey() string {
- if m != nil && m.EndKey != nil {
- return *m.EndKey
- }
- return ""
-}
-
-func (m *CompiledQuery_PrimaryScan) GetEndInclusive() bool {
- if m != nil && m.EndInclusive != nil {
- return *m.EndInclusive
- }
- return false
-}
-
-func (m *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string {
- if m != nil {
- return m.StartPostfixValue
- }
- return nil
-}
-
-func (m *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string {
- if m != nil {
- return m.EndPostfixValue
- }
- return nil
-}
-
-func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 {
- if m != nil && m.EndUnappliedLogTimestampUs != nil {
- return *m.EndUnappliedLogTimestampUs
- }
- return 0
-}
-
-type CompiledQuery_MergeJoinScan struct {
- IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"`
- PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"`
- ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} }
-func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) }
-func (*CompiledQuery_MergeJoinScan) ProtoMessage() {}
-func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1}
-}
-func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b)
-}
-func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic)
-}
-func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src)
-}
-func (m *CompiledQuery_MergeJoinScan) XXX_Size() int {
- return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m)
-}
-func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo
-
-const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false
-
-func (m *CompiledQuery_MergeJoinScan) GetIndexName() string {
- if m != nil && m.IndexName != nil {
- return *m.IndexName
- }
- return ""
-}
-
-func (m *CompiledQuery_MergeJoinScan) GetPrefixValue() []string {
- if m != nil {
- return m.PrefixValue
- }
- return nil
-}
-
-func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool {
- if m != nil && m.ValuePrefix != nil {
- return *m.ValuePrefix
- }
- return Default_CompiledQuery_MergeJoinScan_ValuePrefix
-}
-
-type CompiledQuery_EntityFilter struct {
- Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"`
- Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"`
- Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} }
-func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) }
-func (*CompiledQuery_EntityFilter) ProtoMessage() {}
-func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2}
-}
-func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b)
-}
-func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic)
-}
-func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src)
-}
-func (m *CompiledQuery_EntityFilter) XXX_Size() int {
- return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m)
-}
-func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo
-
-const Default_CompiledQuery_EntityFilter_Distinct bool = false
-
-func (m *CompiledQuery_EntityFilter) GetDistinct() bool {
- if m != nil && m.Distinct != nil {
- return *m.Distinct
- }
- return Default_CompiledQuery_EntityFilter_Distinct
-}
-
-func (m *CompiledQuery_EntityFilter) GetKind() string {
- if m != nil && m.Kind != nil {
- return *m.Kind
- }
- return ""
-}
-
-func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference {
- if m != nil {
- return m.Ancestor
- }
- return nil
-}
-
-type CompiledCursor struct {
- Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledCursor) Reset() { *m = CompiledCursor{} }
-func (m *CompiledCursor) String() string { return proto.CompactTextString(m) }
-func (*CompiledCursor) ProtoMessage() {}
-func (*CompiledCursor) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17}
-}
-func (m *CompiledCursor) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledCursor.Unmarshal(m, b)
-}
-func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic)
-}
-func (dst *CompiledCursor) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledCursor.Merge(dst, src)
-}
-func (m *CompiledCursor) XXX_Size() int {
- return xxx_messageInfo_CompiledCursor.Size(m)
-}
-func (m *CompiledCursor) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledCursor.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo
-
-func (m *CompiledCursor) GetPosition() *CompiledCursor_Position {
- if m != nil {
- return m.Position
- }
- return nil
-}
-
-type CompiledCursor_Position struct {
- StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"`
- Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"`
- Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"`
- StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} }
-func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) }
-func (*CompiledCursor_Position) ProtoMessage() {}
-func (*CompiledCursor_Position) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0}
-}
-func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b)
-}
-func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic)
-}
-func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledCursor_Position.Merge(dst, src)
-}
-func (m *CompiledCursor_Position) XXX_Size() int {
- return xxx_messageInfo_CompiledCursor_Position.Size(m)
-}
-func (m *CompiledCursor_Position) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo
-
-const Default_CompiledCursor_Position_StartInclusive bool = true
-
-func (m *CompiledCursor_Position) GetStartKey() string {
- if m != nil && m.StartKey != nil {
- return *m.StartKey
- }
- return ""
-}
-
-func (m *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue {
- if m != nil {
- return m.Indexvalue
- }
- return nil
-}
-
-func (m *CompiledCursor_Position) GetKey() *Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *CompiledCursor_Position) GetStartInclusive() bool {
- if m != nil && m.StartInclusive != nil {
- return *m.StartInclusive
- }
- return Default_CompiledCursor_Position_StartInclusive
-}
-
-type CompiledCursor_Position_IndexValue struct {
- Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"`
- Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} }
-func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) }
-func (*CompiledCursor_Position_IndexValue) ProtoMessage() {}
-func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0}
-}
-func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b)
-}
-func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic)
-}
-func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src)
-}
-func (m *CompiledCursor_Position_IndexValue) XXX_Size() int {
- return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m)
-}
-func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() {
- xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo
-
-func (m *CompiledCursor_Position_IndexValue) GetProperty() string {
- if m != nil && m.Property != nil {
- return *m.Property
- }
- return ""
-}
-
-func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type Cursor struct {
- Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"`
- App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Cursor) Reset() { *m = Cursor{} }
-func (m *Cursor) String() string { return proto.CompactTextString(m) }
-func (*Cursor) ProtoMessage() {}
-func (*Cursor) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18}
-}
-func (m *Cursor) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Cursor.Unmarshal(m, b)
-}
-func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Cursor.Marshal(b, m, deterministic)
-}
-func (dst *Cursor) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Cursor.Merge(dst, src)
-}
-func (m *Cursor) XXX_Size() int {
- return xxx_messageInfo_Cursor.Size(m)
-}
-func (m *Cursor) XXX_DiscardUnknown() {
- xxx_messageInfo_Cursor.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Cursor proto.InternalMessageInfo
-
-func (m *Cursor) GetCursor() uint64 {
- if m != nil && m.Cursor != nil {
- return *m.Cursor
- }
- return 0
-}
-
-func (m *Cursor) GetApp() string {
- if m != nil && m.App != nil {
- return *m.App
- }
- return ""
-}
-
-type Error struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Error) Reset() { *m = Error{} }
-func (m *Error) String() string { return proto.CompactTextString(m) }
-func (*Error) ProtoMessage() {}
-func (*Error) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19}
-}
-func (m *Error) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Error.Unmarshal(m, b)
-}
-func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Error.Marshal(b, m, deterministic)
-}
-func (dst *Error) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Error.Merge(dst, src)
-}
-func (m *Error) XXX_Size() int {
- return xxx_messageInfo_Error.Size(m)
-}
-func (m *Error) XXX_DiscardUnknown() {
- xxx_messageInfo_Error.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Error proto.InternalMessageInfo
-
-type Cost struct {
- IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"`
- IndexWriteBytes *int32 `protobuf:"varint,2,opt,name=index_write_bytes,json=indexWriteBytes" json:"index_write_bytes,omitempty"`
- EntityWrites *int32 `protobuf:"varint,3,opt,name=entity_writes,json=entityWrites" json:"entity_writes,omitempty"`
- EntityWriteBytes *int32 `protobuf:"varint,4,opt,name=entity_write_bytes,json=entityWriteBytes" json:"entity_write_bytes,omitempty"`
- Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"`
- ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"`
- IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Cost) Reset() { *m = Cost{} }
-func (m *Cost) String() string { return proto.CompactTextString(m) }
-func (*Cost) ProtoMessage() {}
-func (*Cost) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20}
-}
-func (m *Cost) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Cost.Unmarshal(m, b)
-}
-func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Cost.Marshal(b, m, deterministic)
-}
-func (dst *Cost) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Cost.Merge(dst, src)
-}
-func (m *Cost) XXX_Size() int {
- return xxx_messageInfo_Cost.Size(m)
-}
-func (m *Cost) XXX_DiscardUnknown() {
- xxx_messageInfo_Cost.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Cost proto.InternalMessageInfo
-
-func (m *Cost) GetIndexWrites() int32 {
- if m != nil && m.IndexWrites != nil {
- return *m.IndexWrites
- }
- return 0
-}
-
-func (m *Cost) GetIndexWriteBytes() int32 {
- if m != nil && m.IndexWriteBytes != nil {
- return *m.IndexWriteBytes
- }
- return 0
-}
-
-func (m *Cost) GetEntityWrites() int32 {
- if m != nil && m.EntityWrites != nil {
- return *m.EntityWrites
- }
- return 0
-}
-
-func (m *Cost) GetEntityWriteBytes() int32 {
- if m != nil && m.EntityWriteBytes != nil {
- return *m.EntityWriteBytes
- }
- return 0
-}
-
-func (m *Cost) GetCommitcost() *Cost_CommitCost {
- if m != nil {
- return m.Commitcost
- }
- return nil
-}
-
-func (m *Cost) GetApproximateStorageDelta() int32 {
- if m != nil && m.ApproximateStorageDelta != nil {
- return *m.ApproximateStorageDelta
- }
- return 0
-}
-
-func (m *Cost) GetIdSequenceUpdates() int32 {
- if m != nil && m.IdSequenceUpdates != nil {
- return *m.IdSequenceUpdates
- }
- return 0
-}
-
-type Cost_CommitCost struct {
- RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"`
- RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} }
-func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) }
-func (*Cost_CommitCost) ProtoMessage() {}
-func (*Cost_CommitCost) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0}
-}
-func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b)
-}
-func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic)
-}
-func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Cost_CommitCost.Merge(dst, src)
-}
-func (m *Cost_CommitCost) XXX_Size() int {
- return xxx_messageInfo_Cost_CommitCost.Size(m)
-}
-func (m *Cost_CommitCost) XXX_DiscardUnknown() {
- xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo
-
-func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 {
- if m != nil && m.RequestedEntityPuts != nil {
- return *m.RequestedEntityPuts
- }
- return 0
-}
-
-func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 {
- if m != nil && m.RequestedEntityDeletes != nil {
- return *m.RequestedEntityDeletes
- }
- return 0
-}
-
-type GetRequest struct {
- Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"`
- Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
- Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
- FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"`
- Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"`
- AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetRequest) Reset() { *m = GetRequest{} }
-func (m *GetRequest) String() string { return proto.CompactTextString(m) }
-func (*GetRequest) ProtoMessage() {}
-func (*GetRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21}
-}
-func (m *GetRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetRequest.Unmarshal(m, b)
-}
-func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
-}
-func (dst *GetRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetRequest.Merge(dst, src)
-}
-func (m *GetRequest) XXX_Size() int {
- return xxx_messageInfo_GetRequest.Size(m)
-}
-func (m *GetRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_GetRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetRequest proto.InternalMessageInfo
-
-const Default_GetRequest_AllowDeferred bool = false
-
-func (m *GetRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *GetRequest) GetKey() []*Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *GetRequest) GetTransaction() *Transaction {
- if m != nil {
- return m.Transaction
- }
- return nil
-}
-
-func (m *GetRequest) GetFailoverMs() int64 {
- if m != nil && m.FailoverMs != nil {
- return *m.FailoverMs
- }
- return 0
-}
-
-func (m *GetRequest) GetStrong() bool {
- if m != nil && m.Strong != nil {
- return *m.Strong
- }
- return false
-}
-
-func (m *GetRequest) GetAllowDeferred() bool {
- if m != nil && m.AllowDeferred != nil {
- return *m.AllowDeferred
- }
- return Default_GetRequest_AllowDeferred
-}
-
-type GetResponse struct {
- Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"`
- Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"`
- InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetResponse) Reset() { *m = GetResponse{} }
-func (m *GetResponse) String() string { return proto.CompactTextString(m) }
-func (*GetResponse) ProtoMessage() {}
-func (*GetResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22}
-}
-func (m *GetResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetResponse.Unmarshal(m, b)
-}
-func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic)
-}
-func (dst *GetResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetResponse.Merge(dst, src)
-}
-func (m *GetResponse) XXX_Size() int {
- return xxx_messageInfo_GetResponse.Size(m)
-}
-func (m *GetResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_GetResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetResponse proto.InternalMessageInfo
-
-const Default_GetResponse_InOrder bool = true
-
-func (m *GetResponse) GetEntity() []*GetResponse_Entity {
- if m != nil {
- return m.Entity
- }
- return nil
-}
-
-func (m *GetResponse) GetDeferred() []*Reference {
- if m != nil {
- return m.Deferred
- }
- return nil
-}
-
-func (m *GetResponse) GetInOrder() bool {
- if m != nil && m.InOrder != nil {
- return *m.InOrder
- }
- return Default_GetResponse_InOrder
-}
-
-type GetResponse_Entity struct {
- Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"`
- Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"`
- Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} }
-func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) }
-func (*GetResponse_Entity) ProtoMessage() {}
-func (*GetResponse_Entity) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0}
-}
-func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b)
-}
-func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic)
-}
-func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetResponse_Entity.Merge(dst, src)
-}
-func (m *GetResponse_Entity) XXX_Size() int {
- return xxx_messageInfo_GetResponse_Entity.Size(m)
-}
-func (m *GetResponse_Entity) XXX_DiscardUnknown() {
- xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo
-
-func (m *GetResponse_Entity) GetEntity() *EntityProto {
- if m != nil {
- return m.Entity
- }
- return nil
-}
-
-func (m *GetResponse_Entity) GetKey() *Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *GetResponse_Entity) GetVersion() int64 {
- if m != nil && m.Version != nil {
- return *m.Version
- }
- return 0
-}
-
-type PutRequest struct {
- Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"`
- Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"`
- Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
- CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"`
- Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"`
- Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"`
- MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"`
- Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"`
- AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PutRequest) Reset() { *m = PutRequest{} }
-func (m *PutRequest) String() string { return proto.CompactTextString(m) }
-func (*PutRequest) ProtoMessage() {}
-func (*PutRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23}
-}
-func (m *PutRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PutRequest.Unmarshal(m, b)
-}
-func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic)
-}
-func (dst *PutRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PutRequest.Merge(dst, src)
-}
-func (m *PutRequest) XXX_Size() int {
- return xxx_messageInfo_PutRequest.Size(m)
-}
-func (m *PutRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_PutRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PutRequest proto.InternalMessageInfo
-
-const Default_PutRequest_Trusted bool = false
-const Default_PutRequest_Force bool = false
-const Default_PutRequest_MarkChanges bool = false
-const Default_PutRequest_AutoIdPolicy PutRequest_AutoIdPolicy = PutRequest_CURRENT
-
-func (m *PutRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *PutRequest) GetEntity() []*EntityProto {
- if m != nil {
- return m.Entity
- }
- return nil
-}
-
-func (m *PutRequest) GetTransaction() *Transaction {
- if m != nil {
- return m.Transaction
- }
- return nil
-}
-
-func (m *PutRequest) GetCompositeIndex() []*CompositeIndex {
- if m != nil {
- return m.CompositeIndex
- }
- return nil
-}
-
-func (m *PutRequest) GetTrusted() bool {
- if m != nil && m.Trusted != nil {
- return *m.Trusted
- }
- return Default_PutRequest_Trusted
-}
-
-func (m *PutRequest) GetForce() bool {
- if m != nil && m.Force != nil {
- return *m.Force
- }
- return Default_PutRequest_Force
-}
-
-func (m *PutRequest) GetMarkChanges() bool {
- if m != nil && m.MarkChanges != nil {
- return *m.MarkChanges
- }
- return Default_PutRequest_MarkChanges
-}
-
-func (m *PutRequest) GetSnapshot() []*Snapshot {
- if m != nil {
- return m.Snapshot
- }
- return nil
-}
-
-func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy {
- if m != nil && m.AutoIdPolicy != nil {
- return *m.AutoIdPolicy
- }
- return Default_PutRequest_AutoIdPolicy
-}
-
-type PutResponse struct {
- Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
- Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"`
- Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PutResponse) Reset() { *m = PutResponse{} }
-func (m *PutResponse) String() string { return proto.CompactTextString(m) }
-func (*PutResponse) ProtoMessage() {}
-func (*PutResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24}
-}
-func (m *PutResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_PutResponse.Unmarshal(m, b)
-}
-func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic)
-}
-func (dst *PutResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PutResponse.Merge(dst, src)
-}
-func (m *PutResponse) XXX_Size() int {
- return xxx_messageInfo_PutResponse.Size(m)
-}
-func (m *PutResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_PutResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PutResponse proto.InternalMessageInfo
-
-func (m *PutResponse) GetKey() []*Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *PutResponse) GetCost() *Cost {
- if m != nil {
- return m.Cost
- }
- return nil
-}
-
-func (m *PutResponse) GetVersion() []int64 {
- if m != nil {
- return m.Version
- }
- return nil
-}
-
-type TouchRequest struct {
- Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"`
- Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
- CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"`
- Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"`
- Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *TouchRequest) Reset() { *m = TouchRequest{} }
-func (m *TouchRequest) String() string { return proto.CompactTextString(m) }
-func (*TouchRequest) ProtoMessage() {}
-func (*TouchRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25}
-}
-func (m *TouchRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TouchRequest.Unmarshal(m, b)
-}
-func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic)
-}
-func (dst *TouchRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TouchRequest.Merge(dst, src)
-}
-func (m *TouchRequest) XXX_Size() int {
- return xxx_messageInfo_TouchRequest.Size(m)
-}
-func (m *TouchRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_TouchRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TouchRequest proto.InternalMessageInfo
-
-const Default_TouchRequest_Force bool = false
-
-func (m *TouchRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *TouchRequest) GetKey() []*Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *TouchRequest) GetCompositeIndex() []*CompositeIndex {
- if m != nil {
- return m.CompositeIndex
- }
- return nil
-}
-
-func (m *TouchRequest) GetForce() bool {
- if m != nil && m.Force != nil {
- return *m.Force
- }
- return Default_TouchRequest_Force
-}
-
-func (m *TouchRequest) GetSnapshot() []*Snapshot {
- if m != nil {
- return m.Snapshot
- }
- return nil
-}
-
-type TouchResponse struct {
- Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *TouchResponse) Reset() { *m = TouchResponse{} }
-func (m *TouchResponse) String() string { return proto.CompactTextString(m) }
-func (*TouchResponse) ProtoMessage() {}
-func (*TouchResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26}
-}
-func (m *TouchResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TouchResponse.Unmarshal(m, b)
-}
-func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic)
-}
-func (dst *TouchResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TouchResponse.Merge(dst, src)
-}
-func (m *TouchResponse) XXX_Size() int {
- return xxx_messageInfo_TouchResponse.Size(m)
-}
-func (m *TouchResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_TouchResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TouchResponse proto.InternalMessageInfo
-
-func (m *TouchResponse) GetCost() *Cost {
- if m != nil {
- return m.Cost
- }
- return nil
-}
-
-type DeleteRequest struct {
- Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"`
- Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"`
- Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"`
- Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"`
- Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"`
- MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"`
- Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
-func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
-func (*DeleteRequest) ProtoMessage() {}
-func (*DeleteRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27}
-}
-func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteRequest.Unmarshal(m, b)
-}
-func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
-}
-func (dst *DeleteRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteRequest.Merge(dst, src)
-}
-func (m *DeleteRequest) XXX_Size() int {
- return xxx_messageInfo_DeleteRequest.Size(m)
-}
-func (m *DeleteRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
-
-const Default_DeleteRequest_Trusted bool = false
-const Default_DeleteRequest_Force bool = false
-const Default_DeleteRequest_MarkChanges bool = false
-
-func (m *DeleteRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *DeleteRequest) GetKey() []*Reference {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *DeleteRequest) GetTransaction() *Transaction {
- if m != nil {
- return m.Transaction
- }
- return nil
-}
-
-func (m *DeleteRequest) GetTrusted() bool {
- if m != nil && m.Trusted != nil {
- return *m.Trusted
- }
- return Default_DeleteRequest_Trusted
-}
-
-func (m *DeleteRequest) GetForce() bool {
- if m != nil && m.Force != nil {
- return *m.Force
- }
- return Default_DeleteRequest_Force
-}
-
-func (m *DeleteRequest) GetMarkChanges() bool {
- if m != nil && m.MarkChanges != nil {
- return *m.MarkChanges
- }
- return Default_DeleteRequest_MarkChanges
-}
-
-func (m *DeleteRequest) GetSnapshot() []*Snapshot {
- if m != nil {
- return m.Snapshot
- }
- return nil
-}
-
-type DeleteResponse struct {
- Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"`
- Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
-func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
-func (*DeleteResponse) ProtoMessage() {}
-func (*DeleteResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28}
-}
-func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteResponse.Unmarshal(m, b)
-}
-func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic)
-}
-func (dst *DeleteResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteResponse.Merge(dst, src)
-}
-func (m *DeleteResponse) XXX_Size() int {
- return xxx_messageInfo_DeleteResponse.Size(m)
-}
-func (m *DeleteResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
-
-func (m *DeleteResponse) GetCost() *Cost {
- if m != nil {
- return m.Cost
- }
- return nil
-}
-
-func (m *DeleteResponse) GetVersion() []int64 {
- if m != nil {
- return m.Version
- }
- return nil
-}
-
-type NextRequest struct {
- Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"`
- Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"`
- Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
- Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"`
- Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *NextRequest) Reset() { *m = NextRequest{} }
-func (m *NextRequest) String() string { return proto.CompactTextString(m) }
-func (*NextRequest) ProtoMessage() {}
-func (*NextRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29}
-}
-func (m *NextRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_NextRequest.Unmarshal(m, b)
-}
-func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic)
-}
-func (dst *NextRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NextRequest.Merge(dst, src)
-}
-func (m *NextRequest) XXX_Size() int {
- return xxx_messageInfo_NextRequest.Size(m)
-}
-func (m *NextRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_NextRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_NextRequest proto.InternalMessageInfo
-
-const Default_NextRequest_Offset int32 = 0
-const Default_NextRequest_Compile bool = false
-
-func (m *NextRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *NextRequest) GetCursor() *Cursor {
- if m != nil {
- return m.Cursor
- }
- return nil
-}
-
-func (m *NextRequest) GetCount() int32 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-func (m *NextRequest) GetOffset() int32 {
- if m != nil && m.Offset != nil {
- return *m.Offset
- }
- return Default_NextRequest_Offset
-}
-
-func (m *NextRequest) GetCompile() bool {
- if m != nil && m.Compile != nil {
- return *m.Compile
- }
- return Default_NextRequest_Compile
-}
-
-type QueryResult struct {
- Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"`
- Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"`
- SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"`
- MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"`
- KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"`
- IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"`
- SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"`
- CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"`
- CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"`
- Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"`
- Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *QueryResult) Reset() { *m = QueryResult{} }
-func (m *QueryResult) String() string { return proto.CompactTextString(m) }
-func (*QueryResult) ProtoMessage() {}
-func (*QueryResult) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30}
-}
-func (m *QueryResult) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_QueryResult.Unmarshal(m, b)
-}
-func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic)
-}
-func (dst *QueryResult) XXX_Merge(src proto.Message) {
- xxx_messageInfo_QueryResult.Merge(dst, src)
-}
-func (m *QueryResult) XXX_Size() int {
- return xxx_messageInfo_QueryResult.Size(m)
-}
-func (m *QueryResult) XXX_DiscardUnknown() {
- xxx_messageInfo_QueryResult.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_QueryResult proto.InternalMessageInfo
-
-func (m *QueryResult) GetCursor() *Cursor {
- if m != nil {
- return m.Cursor
- }
- return nil
-}
-
-func (m *QueryResult) GetResult() []*EntityProto {
- if m != nil {
- return m.Result
- }
- return nil
-}
-
-func (m *QueryResult) GetSkippedResults() int32 {
- if m != nil && m.SkippedResults != nil {
- return *m.SkippedResults
- }
- return 0
-}
-
-func (m *QueryResult) GetMoreResults() bool {
- if m != nil && m.MoreResults != nil {
- return *m.MoreResults
- }
- return false
-}
-
-func (m *QueryResult) GetKeysOnly() bool {
- if m != nil && m.KeysOnly != nil {
- return *m.KeysOnly
- }
- return false
-}
-
-func (m *QueryResult) GetIndexOnly() bool {
- if m != nil && m.IndexOnly != nil {
- return *m.IndexOnly
- }
- return false
-}
-
-func (m *QueryResult) GetSmallOps() bool {
- if m != nil && m.SmallOps != nil {
- return *m.SmallOps
- }
- return false
-}
-
-func (m *QueryResult) GetCompiledQuery() *CompiledQuery {
- if m != nil {
- return m.CompiledQuery
- }
- return nil
-}
-
-func (m *QueryResult) GetCompiledCursor() *CompiledCursor {
- if m != nil {
- return m.CompiledCursor
- }
- return nil
-}
-
-func (m *QueryResult) GetIndex() []*CompositeIndex {
- if m != nil {
- return m.Index
- }
- return nil
-}
-
-func (m *QueryResult) GetVersion() []int64 {
- if m != nil {
- return m.Version
- }
- return nil
-}
-
-type AllocateIdsRequest struct {
- Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"`
- ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"`
- Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
- Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"`
- Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} }
-func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) }
-func (*AllocateIdsRequest) ProtoMessage() {}
-func (*AllocateIdsRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31}
-}
-func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b)
-}
-func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic)
-}
-func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AllocateIdsRequest.Merge(dst, src)
-}
-func (m *AllocateIdsRequest) XXX_Size() int {
- return xxx_messageInfo_AllocateIdsRequest.Size(m)
-}
-func (m *AllocateIdsRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo
-
-func (m *AllocateIdsRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *AllocateIdsRequest) GetModelKey() *Reference {
- if m != nil {
- return m.ModelKey
- }
- return nil
-}
-
-func (m *AllocateIdsRequest) GetSize() int64 {
- if m != nil && m.Size != nil {
- return *m.Size
- }
- return 0
-}
-
-func (m *AllocateIdsRequest) GetMax() int64 {
- if m != nil && m.Max != nil {
- return *m.Max
- }
- return 0
-}
-
-func (m *AllocateIdsRequest) GetReserve() []*Reference {
- if m != nil {
- return m.Reserve
- }
- return nil
-}
-
-type AllocateIdsResponse struct {
- Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"`
- End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"`
- Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} }
-func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) }
-func (*AllocateIdsResponse) ProtoMessage() {}
-func (*AllocateIdsResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32}
-}
-func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b)
-}
-func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic)
-}
-func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AllocateIdsResponse.Merge(dst, src)
-}
-func (m *AllocateIdsResponse) XXX_Size() int {
- return xxx_messageInfo_AllocateIdsResponse.Size(m)
-}
-func (m *AllocateIdsResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo
-
-func (m *AllocateIdsResponse) GetStart() int64 {
- if m != nil && m.Start != nil {
- return *m.Start
- }
- return 0
-}
-
-func (m *AllocateIdsResponse) GetEnd() int64 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-func (m *AllocateIdsResponse) GetCost() *Cost {
- if m != nil {
- return m.Cost
- }
- return nil
-}
-
-type CompositeIndices struct {
- Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CompositeIndices) Reset() { *m = CompositeIndices{} }
-func (m *CompositeIndices) String() string { return proto.CompactTextString(m) }
-func (*CompositeIndices) ProtoMessage() {}
-func (*CompositeIndices) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33}
-}
-func (m *CompositeIndices) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CompositeIndices.Unmarshal(m, b)
-}
-func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic)
-}
-func (dst *CompositeIndices) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CompositeIndices.Merge(dst, src)
-}
-func (m *CompositeIndices) XXX_Size() int {
- return xxx_messageInfo_CompositeIndices.Size(m)
-}
-func (m *CompositeIndices) XXX_DiscardUnknown() {
- xxx_messageInfo_CompositeIndices.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo
-
-func (m *CompositeIndices) GetIndex() []*CompositeIndex {
- if m != nil {
- return m.Index
- }
- return nil
-}
-
-type AddActionsRequest struct {
- Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"`
- Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"`
- Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} }
-func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) }
-func (*AddActionsRequest) ProtoMessage() {}
-func (*AddActionsRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34}
-}
-func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b)
-}
-func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic)
-}
-func (dst *AddActionsRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AddActionsRequest.Merge(dst, src)
-}
-func (m *AddActionsRequest) XXX_Size() int {
- return xxx_messageInfo_AddActionsRequest.Size(m)
-}
-func (m *AddActionsRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_AddActionsRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo
-
-func (m *AddActionsRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *AddActionsRequest) GetTransaction() *Transaction {
- if m != nil {
- return m.Transaction
- }
- return nil
-}
-
-func (m *AddActionsRequest) GetAction() []*Action {
- if m != nil {
- return m.Action
- }
- return nil
-}
-
-type AddActionsResponse struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} }
-func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) }
-func (*AddActionsResponse) ProtoMessage() {}
-func (*AddActionsResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35}
-}
-func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b)
-}
-func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic)
-}
-func (dst *AddActionsResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AddActionsResponse.Merge(dst, src)
-}
-func (m *AddActionsResponse) XXX_Size() int {
- return xxx_messageInfo_AddActionsResponse.Size(m)
-}
-func (m *AddActionsResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_AddActionsResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo
-
-type BeginTransactionRequest struct {
- Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"`
- App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"`
- AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"`
- DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"`
- Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"`
- PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} }
-func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) }
-func (*BeginTransactionRequest) ProtoMessage() {}
-func (*BeginTransactionRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36}
-}
-func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b)
-}
-func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic)
-}
-func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_BeginTransactionRequest.Merge(dst, src)
-}
-func (m *BeginTransactionRequest) XXX_Size() int {
- return xxx_messageInfo_BeginTransactionRequest.Size(m)
-}
-func (m *BeginTransactionRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo
-
-const Default_BeginTransactionRequest_AllowMultipleEg bool = false
-const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN
-
-func (m *BeginTransactionRequest) GetHeader() *InternalHeader {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *BeginTransactionRequest) GetApp() string {
- if m != nil && m.App != nil {
- return *m.App
- }
- return ""
-}
-
-func (m *BeginTransactionRequest) GetAllowMultipleEg() bool {
- if m != nil && m.AllowMultipleEg != nil {
- return *m.AllowMultipleEg
- }
- return Default_BeginTransactionRequest_AllowMultipleEg
-}
-
-func (m *BeginTransactionRequest) GetDatabaseId() string {
- if m != nil && m.DatabaseId != nil {
- return *m.DatabaseId
- }
- return ""
-}
-
-func (m *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode {
- if m != nil && m.Mode != nil {
- return *m.Mode
- }
- return Default_BeginTransactionRequest_Mode
-}
-
-func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction {
- if m != nil {
- return m.PreviousTransaction
- }
- return nil
-}
-
-type CommitResponse struct {
- Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"`
- Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CommitResponse) Reset() { *m = CommitResponse{} }
-func (m *CommitResponse) String() string { return proto.CompactTextString(m) }
-func (*CommitResponse) ProtoMessage() {}
-func (*CommitResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37}
-}
-func (m *CommitResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CommitResponse.Unmarshal(m, b)
-}
-func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic)
-}
-func (dst *CommitResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CommitResponse.Merge(dst, src)
-}
-func (m *CommitResponse) XXX_Size() int {
- return xxx_messageInfo_CommitResponse.Size(m)
-}
-func (m *CommitResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_CommitResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CommitResponse proto.InternalMessageInfo
-
-func (m *CommitResponse) GetCost() *Cost {
- if m != nil {
- return m.Cost
- }
- return nil
-}
-
-func (m *CommitResponse) GetVersion() []*CommitResponse_Version {
- if m != nil {
- return m.Version
- }
- return nil
-}
-
-type CommitResponse_Version struct {
- RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"`
- Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} }
-func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) }
-func (*CommitResponse_Version) ProtoMessage() {}
-func (*CommitResponse_Version) Descriptor() ([]byte, []int) {
- return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0}
-}
-func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b)
-}
-func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic)
-}
-func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CommitResponse_Version.Merge(dst, src)
-}
-func (m *CommitResponse_Version) XXX_Size() int {
- return xxx_messageInfo_CommitResponse_Version.Size(m)
-}
-func (m *CommitResponse_Version) XXX_DiscardUnknown() {
- xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo
-
-func (m *CommitResponse_Version) GetRootEntityKey() *Reference {
- if m != nil {
- return m.RootEntityKey
- }
- return nil
-}
-
-func (m *CommitResponse_Version) GetVersion() int64 {
- if m != nil && m.Version != nil {
- return *m.Version
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*Action)(nil), "appengine.Action")
- proto.RegisterType((*PropertyValue)(nil), "appengine.PropertyValue")
- proto.RegisterType((*PropertyValue_PointValue)(nil), "appengine.PropertyValue.PointValue")
- proto.RegisterType((*PropertyValue_UserValue)(nil), "appengine.PropertyValue.UserValue")
- proto.RegisterType((*PropertyValue_ReferenceValue)(nil), "appengine.PropertyValue.ReferenceValue")
- proto.RegisterType((*PropertyValue_ReferenceValue_PathElement)(nil), "appengine.PropertyValue.ReferenceValue.PathElement")
- proto.RegisterType((*Property)(nil), "appengine.Property")
- proto.RegisterType((*Path)(nil), "appengine.Path")
- proto.RegisterType((*Path_Element)(nil), "appengine.Path.Element")
- proto.RegisterType((*Reference)(nil), "appengine.Reference")
- proto.RegisterType((*User)(nil), "appengine.User")
- proto.RegisterType((*EntityProto)(nil), "appengine.EntityProto")
- proto.RegisterType((*CompositeProperty)(nil), "appengine.CompositeProperty")
- proto.RegisterType((*Index)(nil), "appengine.Index")
- proto.RegisterType((*Index_Property)(nil), "appengine.Index.Property")
- proto.RegisterType((*CompositeIndex)(nil), "appengine.CompositeIndex")
- proto.RegisterType((*IndexPostfix)(nil), "appengine.IndexPostfix")
- proto.RegisterType((*IndexPostfix_IndexValue)(nil), "appengine.IndexPostfix.IndexValue")
- proto.RegisterType((*IndexPosition)(nil), "appengine.IndexPosition")
- proto.RegisterType((*Snapshot)(nil), "appengine.Snapshot")
- proto.RegisterType((*InternalHeader)(nil), "appengine.InternalHeader")
- proto.RegisterType((*Transaction)(nil), "appengine.Transaction")
- proto.RegisterType((*Query)(nil), "appengine.Query")
- proto.RegisterType((*Query_Filter)(nil), "appengine.Query.Filter")
- proto.RegisterType((*Query_Order)(nil), "appengine.Query.Order")
- proto.RegisterType((*CompiledQuery)(nil), "appengine.CompiledQuery")
- proto.RegisterType((*CompiledQuery_PrimaryScan)(nil), "appengine.CompiledQuery.PrimaryScan")
- proto.RegisterType((*CompiledQuery_MergeJoinScan)(nil), "appengine.CompiledQuery.MergeJoinScan")
- proto.RegisterType((*CompiledQuery_EntityFilter)(nil), "appengine.CompiledQuery.EntityFilter")
- proto.RegisterType((*CompiledCursor)(nil), "appengine.CompiledCursor")
- proto.RegisterType((*CompiledCursor_Position)(nil), "appengine.CompiledCursor.Position")
- proto.RegisterType((*CompiledCursor_Position_IndexValue)(nil), "appengine.CompiledCursor.Position.IndexValue")
- proto.RegisterType((*Cursor)(nil), "appengine.Cursor")
- proto.RegisterType((*Error)(nil), "appengine.Error")
- proto.RegisterType((*Cost)(nil), "appengine.Cost")
- proto.RegisterType((*Cost_CommitCost)(nil), "appengine.Cost.CommitCost")
- proto.RegisterType((*GetRequest)(nil), "appengine.GetRequest")
- proto.RegisterType((*GetResponse)(nil), "appengine.GetResponse")
- proto.RegisterType((*GetResponse_Entity)(nil), "appengine.GetResponse.Entity")
- proto.RegisterType((*PutRequest)(nil), "appengine.PutRequest")
- proto.RegisterType((*PutResponse)(nil), "appengine.PutResponse")
- proto.RegisterType((*TouchRequest)(nil), "appengine.TouchRequest")
- proto.RegisterType((*TouchResponse)(nil), "appengine.TouchResponse")
- proto.RegisterType((*DeleteRequest)(nil), "appengine.DeleteRequest")
- proto.RegisterType((*DeleteResponse)(nil), "appengine.DeleteResponse")
- proto.RegisterType((*NextRequest)(nil), "appengine.NextRequest")
- proto.RegisterType((*QueryResult)(nil), "appengine.QueryResult")
- proto.RegisterType((*AllocateIdsRequest)(nil), "appengine.AllocateIdsRequest")
- proto.RegisterType((*AllocateIdsResponse)(nil), "appengine.AllocateIdsResponse")
- proto.RegisterType((*CompositeIndices)(nil), "appengine.CompositeIndices")
- proto.RegisterType((*AddActionsRequest)(nil), "appengine.AddActionsRequest")
- proto.RegisterType((*AddActionsResponse)(nil), "appengine.AddActionsResponse")
- proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest")
- proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse")
- proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version")
-}
-
-func init() {
- proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179)
-}
-
-var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{
- // 4156 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46,
- 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d,
- 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4a, 0x76, 0x1d, 0x4a, 0xc4, 0x68, 0x90, 0xa1, 0x48,
- 0xb9, 0x09, 0xd9, 0x9e, 0x5c, 0x50, 0x18, 0xa2, 0x29, 0x21, 0x43, 0x02, 0x30, 0x00, 0x6a, 0x46,
- 0x93, 0xe4, 0x90, 0x4b, 0x2a, 0x55, 0x5b, 0xa9, 0x1c, 0x92, 0x4a, 0x25, 0xf9, 0x07, 0x72, 0xc8,
- 0x39, 0x95, 0xaa, 0x54, 0xf6, 0x98, 0x5b, 0x0e, 0x7b, 0xc9, 0x31, 0x95, 0x73, 0xf2, 0x27, 0x24,
- 0x39, 0xa4, 0xfa, 0x75, 0x03, 0x02, 0x28, 0x4a, 0x23, 0x6d, 0xf6, 0x90, 0x13, 0xd1, 0xef, 0xfd,
- 0xba, 0xf1, 0xfa, 0xf5, 0xfb, 0x6c, 0x10, 0xba, 0xc7, 0xbe, 0x7f, 0x3c, 0x65, 0x9d, 0x63, 0x7f,
- 0x6a, 0x7b, 0xc7, 0x1d, 0x3f, 0x3c, 0x7e, 0x68, 0x07, 0x01, 0xf3, 0x8e, 0x5d, 0x8f, 0x3d, 0x74,
- 0xbd, 0x98, 0x85, 0x9e, 0x3d, 0x7d, 0xe8, 0xd8, 0xb1, 0x1d, 0xc5, 0x7e, 0xc8, 0xce, 0x9f, 0xac,
- 0xd3, 0xcf, 0x3b, 0x41, 0xe8, 0xc7, 0x3e, 0xa9, 0xa7, 0x13, 0xb4, 0x1a, 0x54, 0xba, 0xe3, 0xd8,
- 0xf5, 0x3d, 0xed, 0x1f, 0x2b, 0xb0, 0x7a, 0x18, 0xfa, 0x01, 0x0b, 0xe3, 0xb3, 0x6f, 0xed, 0xe9,
- 0x9c, 0x91, 0x77, 0x00, 0x5c, 0x2f, 0xfe, 0xea, 0x0b, 0x1c, 0xb5, 0x0a, 0x9b, 0x85, 0xad, 0x22,
- 0xcd, 0x50, 0x88, 0x06, 0x2b, 0xcf, 0x7c, 0x7f, 0xca, 0x6c, 0x4f, 0x20, 0x94, 0xcd, 0xc2, 0x56,
- 0x8d, 0xe6, 0x68, 0x64, 0x13, 0x1a, 0x51, 0x1c, 0xba, 0xde, 0xb1, 0x80, 0x14, 0x37, 0x0b, 0x5b,
- 0x75, 0x9a, 0x25, 0x71, 0x84, 0xe3, 0xcf, 0x9f, 0x4d, 0x99, 0x40, 0x94, 0x36, 0x0b, 0x5b, 0x05,
- 0x9a, 0x25, 0x91, 0x3d, 0x80, 0xc0, 0x77, 0xbd, 0xf8, 0x14, 0x01, 0xe5, 0xcd, 0xc2, 0x16, 0x6c,
- 0x3f, 0xe8, 0xa4, 0x7b, 0xe8, 0xe4, 0xa4, 0xee, 0x1c, 0x72, 0x28, 0x3e, 0xd2, 0xcc, 0x34, 0xf2,
- 0xdb, 0x50, 0x9f, 0x47, 0x2c, 0x14, 0x6b, 0xd4, 0x70, 0x0d, 0xed, 0xd2, 0x35, 0x8e, 0x22, 0x16,
- 0x8a, 0x25, 0xce, 0x27, 0x91, 0x21, 0x34, 0x43, 0x36, 0x61, 0x21, 0xf3, 0xc6, 0x4c, 0x2c, 0xb3,
- 0x82, 0xcb, 0x7c, 0x70, 0xe9, 0x32, 0x34, 0x81, 0x8b, 0xb5, 0x16, 0xa6, 0xb7, 0xb7, 0x00, 0xce,
- 0x85, 0x25, 0x2b, 0x50, 0x78, 0xd9, 0xaa, 0x6c, 0x2a, 0x5b, 0x05, 0x5a, 0x78, 0xc9, 0x47, 0x67,
- 0xad, 0xaa, 0x18, 0x9d, 0xb5, 0xff, 0xa9, 0x00, 0xf5, 0x54, 0x26, 0x72, 0x0b, 0xca, 0x6c, 0x66,
- 0xbb, 0xd3, 0x56, 0x7d, 0x53, 0xd9, 0xaa, 0x53, 0x31, 0x20, 0xf7, 0xa1, 0x61, 0xcf, 0xe3, 0x13,
- 0xcb, 0xf1, 0x67, 0xb6, 0xeb, 0xb5, 0x00, 0x79, 0xc0, 0x49, 0x3d, 0xa4, 0x90, 0x36, 0xd4, 0x3c,
- 0x77, 0xfc, 0xdc, 0xb3, 0x67, 0xac, 0xd5, 0xc0, 0x73, 0x48, 0xc7, 0xe4, 0x13, 0x20, 0x13, 0xe6,
- 0xb0, 0xd0, 0x8e, 0x99, 0x63, 0xb9, 0x0e, 0xf3, 0x62, 0x37, 0x3e, 0x6b, 0xdd, 0x46, 0xd4, 0x7a,
- 0xca, 0x31, 0x24, 0x23, 0x0f, 0x0f, 0x42, 0xff, 0xd4, 0x75, 0x58, 0xd8, 0xba, 0xb3, 0x00, 0x3f,
- 0x94, 0x8c, 0xf6, 0xbf, 0x17, 0xa0, 0x99, 0xd7, 0x05, 0x51, 0xa1, 0x68, 0x07, 0x41, 0x6b, 0x15,
- 0xa5, 0xe4, 0x8f, 0xe4, 0x6d, 0x00, 0x2e, 0x8a, 0x15, 0x05, 0xf6, 0x98, 0xb5, 0x6e, 0xe1, 0x5a,
- 0x75, 0x4e, 0x19, 0x71, 0x02, 0x39, 0x82, 0x46, 0x60, 0xc7, 0x27, 0x6c, 0xca, 0x66, 0xcc, 0x8b,
- 0x5b, 0xcd, 0xcd, 0xe2, 0x16, 0x6c, 0x7f, 0x7e, 0x4d, 0xd5, 0x77, 0x0e, 0xed, 0xf8, 0x44, 0x17,
- 0x53, 0x69, 0x76, 0x9d, 0xb6, 0x0e, 0x8d, 0x0c, 0x8f, 0x10, 0x28, 0xc5, 0x67, 0x01, 0x6b, 0xad,
- 0xa1, 0x5c, 0xf8, 0x4c, 0x9a, 0xa0, 0xb8, 0x4e, 0x4b, 0x45, 0xf3, 0x57, 0x5c, 0x87, 0x63, 0x50,
- 0x87, 0xeb, 0x28, 0x22, 0x3e, 0x6b, 0xff, 0x51, 0x86, 0x5a, 0x22, 0x00, 0xe9, 0x42, 0x75, 0xc6,
- 0x6c, 0xcf, 0xf5, 0x8e, 0xd1, 0x69, 0x9a, 0xdb, 0x6f, 0x2e, 0x11, 0xb3, 0x73, 0x20, 0x20, 0x3b,
- 0x30, 0x18, 0x5a, 0x07, 0x7a, 0x77, 0x60, 0x0c, 0xf6, 0x69, 0x32, 0x8f, 0x1f, 0xa6, 0x7c, 0xb4,
- 0xe6, 0xa1, 0x8b, 0x9e, 0x55, 0xa7, 0x20, 0x49, 0x47, 0xa1, 0x9b, 0x0a, 0x51, 0x14, 0x82, 0xe2,
- 0x21, 0x76, 0xa0, 0x9c, 0xb8, 0x88, 0xb2, 0xd5, 0xd8, 0x6e, 0x5d, 0xa6, 0x1c, 0x2a, 0x60, 0xdc,
- 0x20, 0x66, 0xf3, 0x69, 0xec, 0x06, 0x53, 0xee, 0x76, 0xca, 0x56, 0x8d, 0xa6, 0x63, 0xf2, 0x1e,
- 0x40, 0xc4, 0xec, 0x70, 0x7c, 0x62, 0x3f, 0x9b, 0xb2, 0x56, 0x85, 0x7b, 0xf6, 0x4e, 0x79, 0x62,
- 0x4f, 0x23, 0x46, 0x33, 0x0c, 0x62, 0xc3, 0xdd, 0x49, 0x1c, 0x59, 0xb1, 0xff, 0x9c, 0x79, 0xee,
- 0x2b, 0x9b, 0x07, 0x12, 0xcb, 0x0f, 0xf8, 0x0f, 0xfa, 0x58, 0x73, 0xfb, 0xc3, 0x65, 0x5b, 0x7f,
- 0x14, 0x47, 0x66, 0x66, 0xc6, 0x10, 0x27, 0xd0, 0xdb, 0x93, 0x65, 0x64, 0xd2, 0x86, 0xca, 0xd4,
- 0x1f, 0xdb, 0x53, 0xd6, 0xaa, 0x73, 0x2d, 0xec, 0x28, 0xcc, 0xa3, 0x92, 0xa2, 0xfd, 0xb3, 0x02,
- 0x55, 0xa9, 0x47, 0xd2, 0x84, 0x8c, 0x26, 0xd5, 0x37, 0x48, 0x0d, 0x4a, 0xbb, 0xfd, 0xe1, 0xae,
- 0xda, 0xe4, 0x4f, 0xa6, 0xfe, 0xbd, 0xa9, 0xae, 0x71, 0xcc, 0xee, 0x53, 0x53, 0x1f, 0x99, 0x94,
- 0x63, 0x54, 0xb2, 0x0e, 0xab, 0x5d, 0x73, 0x78, 0x60, 0xed, 0x75, 0x4d, 0x7d, 0x7f, 0x48, 0x9f,
- 0xaa, 0x05, 0xb2, 0x0a, 0x75, 0x24, 0xf5, 0x8d, 0xc1, 0x13, 0x55, 0xe1, 0x33, 0x70, 0x68, 0x1a,
- 0x66, 0x5f, 0x57, 0x8b, 0x44, 0x85, 0x15, 0x31, 0x63, 0x38, 0x30, 0xf5, 0x81, 0xa9, 0x96, 0x52,
- 0xca, 0xe8, 0xe8, 0xe0, 0xa0, 0x4b, 0x9f, 0xaa, 0x65, 0xb2, 0x06, 0x0d, 0xa4, 0x74, 0x8f, 0xcc,
- 0xc7, 0x43, 0xaa, 0x56, 0x48, 0x03, 0xaa, 0xfb, 0x3d, 0xeb, 0xbb, 0xc7, 0xfa, 0x40, 0xad, 0x92,
- 0x15, 0xa8, 0xed, 0xf7, 0x2c, 0xfd, 0xa0, 0x6b, 0xf4, 0xd5, 0x1a, 0x9f, 0xbd, 0xaf, 0x0f, 0xe9,
- 0x68, 0x64, 0x1d, 0x0e, 0x8d, 0x81, 0xa9, 0xd6, 0x49, 0x1d, 0xca, 0xfb, 0x3d, 0xcb, 0x38, 0x50,
- 0x81, 0x10, 0x68, 0xee, 0xf7, 0xac, 0xc3, 0xc7, 0xc3, 0x81, 0x3e, 0x38, 0x3a, 0xd8, 0xd5, 0xa9,
- 0xda, 0x20, 0xb7, 0x40, 0xe5, 0xb4, 0xe1, 0xc8, 0xec, 0xf6, 0xbb, 0xbd, 0x1e, 0xd5, 0x47, 0x23,
- 0x75, 0x85, 0x4b, 0xbd, 0xdf, 0xb3, 0x68, 0xd7, 0xe4, 0xfb, 0x5a, 0xe5, 0x2f, 0xe4, 0x7b, 0x7f,
- 0xa2, 0x3f, 0x55, 0xd7, 0xf9, 0x2b, 0xf4, 0x81, 0x69, 0x98, 0x4f, 0xad, 0x43, 0x3a, 0x34, 0x87,
- 0xea, 0x06, 0x17, 0xd0, 0x18, 0xf4, 0xf4, 0xef, 0xad, 0x6f, 0xbb, 0xfd, 0x23, 0x5d, 0x25, 0xda,
- 0x8f, 0xe1, 0xf6, 0xd2, 0x33, 0xe1, 0xaa, 0x7b, 0x6c, 0x1e, 0xf4, 0xd5, 0x02, 0x7f, 0xe2, 0x9b,
- 0x52, 0x15, 0xed, 0x0f, 0xa0, 0xc4, 0x5d, 0x86, 0x7c, 0x06, 0xd5, 0xc4, 0x1b, 0x0b, 0xe8, 0x8d,
- 0x77, 0xb3, 0x67, 0x6d, 0xc7, 0x27, 0x9d, 0xc4, 0xe3, 0x12, 0x5c, 0xbb, 0x0b, 0xd5, 0x45, 0x4f,
- 0x53, 0x2e, 0x78, 0x5a, 0xf1, 0x82, 0xa7, 0x95, 0x32, 0x9e, 0x66, 0x43, 0x3d, 0xf5, 0xed, 0x9b,
- 0x47, 0x91, 0x07, 0x50, 0xe2, 0xde, 0xdf, 0x6a, 0xa2, 0x87, 0xac, 0x2d, 0x08, 0x4c, 0x91, 0xa9,
- 0xfd, 0x43, 0x01, 0x4a, 0x3c, 0xda, 0x9e, 0x07, 0xda, 0xc2, 0x15, 0x81, 0x56, 0xb9, 0x32, 0xd0,
- 0x16, 0xaf, 0x15, 0x68, 0x2b, 0x37, 0x0b, 0xb4, 0xd5, 0x4b, 0x02, 0xad, 0xf6, 0x67, 0x45, 0x68,
- 0xe8, 0x38, 0xf3, 0x10, 0x13, 0xfd, 0xfb, 0x50, 0x7c, 0xce, 0xce, 0x50, 0x3f, 0x8d, 0xed, 0x5b,
- 0x99, 0xdd, 0xa6, 0x2a, 0xa4, 0x1c, 0x40, 0xb6, 0x61, 0x45, 0xbc, 0xd0, 0x3a, 0x0e, 0xfd, 0x79,
- 0xd0, 0x52, 0x97, 0xab, 0xa7, 0x21, 0x40, 0xfb, 0x1c, 0x43, 0xde, 0x83, 0xb2, 0xff, 0xc2, 0x63,
- 0x21, 0xc6, 0xc1, 0x3c, 0x98, 0x2b, 0x8f, 0x0a, 0x2e, 0x79, 0x08, 0xa5, 0xe7, 0xae, 0xe7, 0xe0,
- 0x19, 0xe6, 0x23, 0x61, 0x46, 0xd0, 0xce, 0x13, 0xd7, 0x73, 0x28, 0x02, 0xc9, 0x3d, 0xa8, 0xf1,
- 0x5f, 0x8c, 0x7b, 0x65, 0xdc, 0x68, 0x95, 0x8f, 0x79, 0xd0, 0x7b, 0x08, 0xb5, 0x40, 0xc6, 0x10,
- 0x4c, 0x00, 0x8d, 0xed, 0x8d, 0x25, 0xe1, 0x85, 0xa6, 0x20, 0xf2, 0x15, 0xac, 0x84, 0xf6, 0x0b,
- 0x2b, 0x9d, 0xb4, 0x76, 0xf9, 0xa4, 0x46, 0x68, 0xbf, 0x48, 0x23, 0x38, 0x81, 0x52, 0x68, 0x7b,
- 0xcf, 0x5b, 0x64, 0xb3, 0xb0, 0x55, 0xa6, 0xf8, 0xac, 0x7d, 0x01, 0x25, 0x2e, 0x25, 0x8f, 0x08,
- 0xfb, 0x3d, 0xf4, 0xff, 0xee, 0x9e, 0xa9, 0x16, 0x12, 0x7f, 0xfe, 0x96, 0x47, 0x03, 0x45, 0x72,
- 0x0f, 0xf4, 0xd1, 0xa8, 0xbb, 0xaf, 0xab, 0x45, 0xad, 0x07, 0xeb, 0x7b, 0xfe, 0x2c, 0xf0, 0x23,
- 0x37, 0x66, 0xe9, 0xf2, 0xf7, 0xa0, 0xe6, 0x7a, 0x0e, 0x7b, 0x69, 0xb9, 0x0e, 0x9a, 0x56, 0x91,
- 0x56, 0x71, 0x6c, 0x38, 0xdc, 0xe4, 0x4e, 0x65, 0x31, 0x55, 0xe4, 0x26, 0x87, 0x03, 0xed, 0x2f,
- 0x15, 0x28, 0x1b, 0x1c, 0xc1, 0x8d, 0x4f, 0x9e, 0x14, 0x7a, 0x8f, 0x30, 0x4c, 0x10, 0x24, 0x93,
- 0xfb, 0x50, 0x1b, 0x6a, 0xb6, 0x37, 0x66, 0xbc, 0xe2, 0xc3, 0x3c, 0x50, 0xa3, 0xe9, 0x98, 0x7c,
- 0x99, 0xd1, 0x9f, 0x82, 0x2e, 0x7b, 0x2f, 0xa3, 0x0a, 0x7c, 0xc1, 0x12, 0x2d, 0xb6, 0xff, 0xaa,
- 0x90, 0x49, 0x6e, 0xcb, 0x12, 0x4f, 0x1f, 0xea, 0x8e, 0x1b, 0x32, 0xac, 0x23, 0xe5, 0x41, 0x3f,
- 0xb8, 0x74, 0xe1, 0x4e, 0x2f, 0x81, 0xee, 0xd4, 0xbb, 0xa3, 0x3d, 0x7d, 0xd0, 0xe3, 0x99, 0xef,
- 0x7c, 0x01, 0xed, 0x23, 0xa8, 0xa7, 0x10, 0x0c, 0xc7, 0x09, 0x48, 0x2d, 0x70, 0xf5, 0xf6, 0xf4,
- 0x74, 0xac, 0x68, 0x7f, 0xad, 0x40, 0x33, 0xd5, 0xaf, 0xd0, 0xd0, 0x6d, 0xa8, 0xd8, 0x41, 0x90,
- 0xa8, 0xb6, 0x4e, 0xcb, 0x76, 0x10, 0x18, 0x8e, 0x8c, 0x2d, 0x0a, 0x6a, 0x9b, 0xc7, 0x96, 0x4f,
- 0x01, 0x1c, 0x36, 0x71, 0x3d, 0x17, 0x85, 0x2e, 0xa2, 0xc1, 0xab, 0x8b, 0x42, 0xd3, 0x0c, 0x86,
- 0x7c, 0x09, 0xe5, 0x28, 0xb6, 0x63, 0x91, 0x2b, 0x9b, 0xdb, 0xf7, 0x33, 0xe0, 0xbc, 0x08, 0x9d,
- 0x11, 0x87, 0x51, 0x81, 0x26, 0x5f, 0xc1, 0x2d, 0xdf, 0x9b, 0x9e, 0x59, 0xf3, 0x88, 0x59, 0xee,
- 0xc4, 0x0a, 0xd9, 0x0f, 0x73, 0x37, 0x64, 0x4e, 0x3e, 0xa7, 0xae, 0x73, 0xc8, 0x51, 0xc4, 0x8c,
- 0x09, 0x95, 0x7c, 0xed, 0x6b, 0x28, 0xe3, 0x3a, 0x7c, 0xcf, 0xdf, 0x51, 0xc3, 0xd4, 0xad, 0xe1,
- 0xa0, 0xff, 0x54, 0xe8, 0x80, 0xea, 0xdd, 0x9e, 0x85, 0x44, 0x55, 0xe1, 0xc1, 0xbe, 0xa7, 0xf7,
- 0x75, 0x53, 0xef, 0xa9, 0x45, 0x9e, 0x3d, 0x74, 0x4a, 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80,
- 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c,
- 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21,
- 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6,
- 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26,
- 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba,
- 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c,
- 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2,
- 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8,
- 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90,
- 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91,
- 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58,
- 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c,
- 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b,
- 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f,
- 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02,
- 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22,
- 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b,
- 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0,
- 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18,
- 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8,
- 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b,
- 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e,
- 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 0xa7, 0x54, 0x12, 0xf8, 0x84,
- 0xa9, 0x3b, 0x73, 0x63, 0xec, 0x43, 0xca, 0x54, 0x0c, 0xc8, 0x2e, 0xac, 0x8d, 0xfd, 0x59, 0xe0,
- 0x4e, 0x99, 0x63, 0x8d, 0xe7, 0x61, 0xe4, 0x87, 0xad, 0x77, 0x2e, 0x1c, 0xd3, 0x9e, 0x44, 0xec,
- 0x21, 0x80, 0x36, 0xc7, 0xb9, 0x31, 0x31, 0x60, 0x83, 0x79, 0x8e, 0xb5, 0xb8, 0xce, 0xfd, 0xd7,
- 0xad, 0xb3, 0xce, 0x3c, 0x27, 0x4f, 0x4a, 0xc4, 0xc1, 0x48, 0x68, 0x61, 0xcc, 0x68, 0x6d, 0x60,
- 0x90, 0xb9, 0x77, 0x69, 0xac, 0x14, 0xe2, 0x64, 0xc2, 0xf7, 0x6f, 0xc0, 0x2d, 0x19, 0x22, 0xad,
- 0x80, 0x85, 0x13, 0x36, 0x8e, 0xad, 0x60, 0x6a, 0x7b, 0x58, 0xca, 0xa5, 0xc6, 0x4a, 0x24, 0xe4,
- 0x50, 0x20, 0x0e, 0xa7, 0xb6, 0x47, 0x34, 0xa8, 0x3f, 0x67, 0x67, 0x91, 0xc5, 0x23, 0x29, 0x76,
- 0xae, 0x29, 0xba, 0xc6, 0xe9, 0x43, 0x6f, 0x7a, 0x46, 0x7e, 0x02, 0x8d, 0xf8, 0xdc, 0xdb, 0xb0,
- 0x61, 0x6d, 0xe4, 0x4e, 0x35, 0xe3, 0x8b, 0x34, 0x0b, 0x25, 0xf7, 0xa1, 0x2a, 0x35, 0xd4, 0xba,
- 0x97, 0x5d, 0x3b, 0xa1, 0xf2, 0xc4, 0x3c, 0xb1, 0xdd, 0xa9, 0x7f, 0xca, 0x42, 0x6b, 0x16, 0xb5,
- 0xda, 0xe2, 0xb6, 0x24, 0x21, 0x1d, 0x44, 0xdc, 0x4f, 0xa3, 0x38, 0xf4, 0xbd, 0xe3, 0xd6, 0x26,
- 0xde, 0x93, 0xc8, 0xd1, 0xc5, 0xe0, 0xf7, 0x2e, 0x66, 0xfe, 0x7c, 0xf0, 0xfb, 0x1c, 0xee, 0x60,
- 0x65, 0x66, 0x3d, 0x3b, 0xb3, 0xf2, 0x68, 0x0d, 0xd1, 0x1b, 0xc8, 0xdd, 0x3d, 0x3b, 0xcc, 0x4e,
- 0x6a, 0x43, 0xcd, 0x71, 0xa3, 0xd8, 0xf5, 0xc6, 0x71, 0xab, 0x85, 0xef, 0x4c, 0xc7, 0xe4, 0x33,
- 0xb8, 0x3d, 0x73, 0x3d, 0x2b, 0xb2, 0x27, 0xcc, 0x8a, 0x5d, 0xee, 0x9b, 0x6c, 0xec, 0x7b, 0x4e,
- 0xd4, 0x7a, 0x80, 0x82, 0x93, 0x99, 0xeb, 0x8d, 0xec, 0x09, 0x33, 0xdd, 0x19, 0x1b, 0x09, 0x0e,
- 0xf9, 0x08, 0xd6, 0x11, 0x1e, 0xb2, 0x60, 0xea, 0x8e, 0x6d, 0xf1, 0xfa, 0x1f, 0xe1, 0xeb, 0xd7,
- 0x38, 0x83, 0x0a, 0x3a, 0xbe, 0xfa, 0x63, 0x68, 0x06, 0x2c, 0x8c, 0xdc, 0x28, 0xb6, 0xa4, 0x45,
- 0xbf, 0x97, 0xd5, 0xda, 0xaa, 0x64, 0x0e, 0x91, 0xd7, 0xfe, 0xcf, 0x02, 0x54, 0x84, 0x73, 0x92,
- 0x4f, 0x41, 0xf1, 0x03, 0xbc, 0x06, 0x69, 0x6e, 0x6f, 0x5e, 0xe2, 0xc1, 0x9d, 0x61, 0xc0, 0xeb,
- 0x5e, 0x3f, 0xa4, 0x8a, 0x1f, 0xdc, 0xb8, 0x28, 0xd4, 0xfe, 0x10, 0x6a, 0xc9, 0x02, 0xbc, 0xbc,
- 0xe8, 0xeb, 0xa3, 0x91, 0x65, 0x3e, 0xee, 0x0e, 0xd4, 0x02, 0xb9, 0x03, 0x24, 0x1d, 0x5a, 0x43,
- 0x6a, 0xe9, 0xdf, 0x1c, 0x75, 0xfb, 0xaa, 0x82, 0x5d, 0x1a, 0xd5, 0xbb, 0xa6, 0x4e, 0x05, 0xb2,
- 0x48, 0xee, 0xc1, 0xed, 0x2c, 0xe5, 0x1c, 0x5c, 0xc2, 0x14, 0x8c, 0x8f, 0x65, 0x52, 0x01, 0xc5,
- 0x18, 0xa8, 0x15, 0x9e, 0x16, 0xf4, 0xef, 0x8d, 0x91, 0x39, 0x52, 0xab, 0xed, 0xbf, 0x29, 0x40,
- 0x19, 0xc3, 0x06, 0x3f, 0x9f, 0x54, 0x72, 0x71, 0x5d, 0x73, 0x5e, 0xb9, 0x1a, 0xd9, 0x92, 0xaa,
- 0x81, 0x01, 0x65, 0x73, 0x79, 0xf4, 0xf9, 0xb5, 0xd6, 0x53, 0x3f, 0x85, 0x12, 0x8f, 0x52, 0xbc,
- 0x43, 0x1c, 0xd2, 0x9e, 0x4e, 0xad, 0x47, 0x06, 0x1d, 0xf1, 0x2a, 0x97, 0x40, 0xb3, 0x3b, 0xd8,
- 0xd3, 0x47, 0xe6, 0x30, 0xa1, 0xa1, 0x56, 0x1e, 0x19, 0x7d, 0x33, 0x45, 0x15, 0xb5, 0x9f, 0xd7,
- 0x60, 0x35, 0x89, 0x09, 0x22, 0x82, 0x3e, 0x82, 0x46, 0x10, 0xba, 0x33, 0x3b, 0x3c, 0x8b, 0xc6,
- 0xb6, 0x87, 0x49, 0x01, 0xb6, 0x7f, 0xb4, 0x24, 0xaa, 0x88, 0x1d, 0x1d, 0x0a, 0xec, 0x68, 0x6c,
- 0x7b, 0x34, 0x3b, 0x91, 0xf4, 0x61, 0x75, 0xc6, 0xc2, 0x63, 0xf6, 0x7b, 0xbe, 0xeb, 0xe1, 0x4a,
- 0x55, 0x8c, 0xc8, 0xef, 0x5f, 0xba, 0xd2, 0x01, 0x47, 0xff, 0x8e, 0xef, 0x7a, 0xb8, 0x56, 0x7e,
- 0x32, 0xf9, 0x04, 0xea, 0xa2, 0x12, 0x72, 0xd8, 0x04, 0x63, 0xc5, 0xb2, 0xda, 0x4f, 0xd4, 0xe8,
- 0x3d, 0x36, 0xc9, 0xc4, 0x65, 0xb8, 0x34, 0x2e, 0x37, 0xb2, 0x71, 0xf9, 0xcd, 0x6c, 0x2c, 0x5a,
- 0x11, 0x55, 0x78, 0x1a, 0x84, 0x2e, 0x38, 0x7c, 0x6b, 0x89, 0xc3, 0x77, 0x60, 0x23, 0xf1, 0x55,
- 0xcb, 0xf5, 0x26, 0xee, 0x4b, 0x2b, 0x72, 0x5f, 0x89, 0xd8, 0x53, 0xa6, 0xeb, 0x09, 0xcb, 0xe0,
- 0x9c, 0x91, 0xfb, 0x8a, 0x11, 0x23, 0xe9, 0xe0, 0x64, 0x0e, 0x5c, 0xc5, 0xab, 0xc9, 0xf7, 0x2e,
- 0x55, 0x8f, 0x68, 0xbe, 0x64, 0x46, 0xcc, 0x4d, 0x6d, 0xff, 0x52, 0x81, 0x46, 0xe6, 0x1c, 0x78,
- 0xf6, 0x16, 0xca, 0x42, 0x61, 0xc5, 0x55, 0x94, 0x50, 0x1f, 0x4a, 0xfa, 0x26, 0xd4, 0xa3, 0xd8,
- 0x0e, 0x63, 0x8b, 0x17, 0x57, 0xb2, 0xdd, 0x45, 0xc2, 0x13, 0x76, 0x46, 0x3e, 0x80, 0x35, 0xc1,
- 0x74, 0xbd, 0xf1, 0x74, 0x1e, 0xb9, 0xa7, 0xa2, 0x99, 0xaf, 0xd1, 0x26, 0x92, 0x8d, 0x84, 0x4a,
- 0xee, 0x42, 0x95, 0x67, 0x21, 0xbe, 0x86, 0x68, 0xfa, 0x2a, 0xcc, 0x73, 0xf8, 0x0a, 0x0f, 0x60,
- 0x95, 0x33, 0xce, 0xe7, 0x57, 0xc4, 0x2d, 0x33, 0xf3, 0x9c, 0xf3, 0xd9, 0x1d, 0xd8, 0x10, 0xaf,
- 0x09, 0x44, 0xf1, 0x2a, 0x2b, 0xdc, 0x3b, 0xa8, 0xd8, 0x75, 0x64, 0xc9, 0xb2, 0x56, 0x14, 0x9c,
- 0x1f, 0x01, 0xcf, 0x5e, 0x0b, 0xe8, 0xbb, 0x22, 0x94, 0x31, 0xcf, 0xc9, 0x61, 0x77, 0xe1, 0x1d,
- 0x8e, 0x9d, 0x7b, 0x76, 0x10, 0x4c, 0x5d, 0xe6, 0x58, 0x53, 0xff, 0x18, 0x43, 0x66, 0x14, 0xdb,
- 0xb3, 0xc0, 0x9a, 0x47, 0xad, 0x0d, 0x0c, 0x99, 0x6d, 0xe6, 0x39, 0x47, 0x09, 0xa8, 0xef, 0x1f,
- 0x9b, 0x09, 0xe4, 0x28, 0x6a, 0xff, 0x3e, 0xac, 0xe6, 0xec, 0x71, 0x41, 0xa7, 0x35, 0x74, 0xfe,
- 0x8c, 0x4e, 0xdf, 0x85, 0x95, 0x20, 0x64, 0xe7, 0xa2, 0xd5, 0x51, 0xb4, 0x86, 0xa0, 0x09, 0xb1,
- 0xb6, 0x60, 0x05, 0x79, 0x96, 0x20, 0xe6, 0xf3, 0x63, 0x03, 0x59, 0x87, 0xc8, 0x69, 0xbf, 0x80,
- 0x95, 0xec, 0x69, 0x93, 0x77, 0x33, 0x69, 0xa1, 0x99, 0xcb, 0x93, 0x69, 0x76, 0x48, 0x2a, 0xb2,
- 0xf5, 0x4b, 0x2a, 0x32, 0x72, 0x9d, 0x8a, 0x4c, 0xfb, 0x2f, 0xd9, 0x9c, 0x65, 0x2a, 0x84, 0x9f,
- 0x41, 0x2d, 0x90, 0xf5, 0x38, 0x5a, 0x52, 0xfe, 0x12, 0x3e, 0x0f, 0xee, 0x24, 0x95, 0x3b, 0x4d,
- 0xe7, 0xb4, 0xff, 0x56, 0x81, 0x5a, 0x5a, 0xd0, 0xe7, 0x2c, 0xef, 0xcd, 0x05, 0xcb, 0x3b, 0x90,
- 0x1a, 0x16, 0x0a, 0x7c, 0x1b, 0xa3, 0xc5, 0x27, 0xaf, 0x7f, 0xd7, 0xc5, 0xb6, 0xe7, 0x34, 0xdb,
- 0xf6, 0x6c, 0xbe, 0xae, 0xed, 0xf9, 0xe4, 0xa2, 0xc1, 0xbf, 0x95, 0xe9, 0x2d, 0x16, 0xcc, 0xbe,
- 0xfd, 0x7d, 0xae, 0x0f, 0xca, 0x26, 0x84, 0x77, 0xc4, 0x7e, 0xd2, 0x84, 0x90, 0xb6, 0x3f, 0xf7,
- 0xaf, 0xd7, 0xfe, 0x6c, 0x43, 0x45, 0xea, 0xfc, 0x0e, 0x54, 0x64, 0x4d, 0x27, 0x1b, 0x04, 0x31,
- 0x3a, 0x6f, 0x10, 0x0a, 0xb2, 0x4e, 0xd7, 0x7e, 0xae, 0x40, 0x59, 0x0f, 0x43, 0x3f, 0xd4, 0xfe,
- 0x48, 0x81, 0x3a, 0x3e, 0xed, 0xf9, 0x0e, 0xe3, 0xd9, 0x60, 0xb7, 0xdb, 0xb3, 0xa8, 0xfe, 0xcd,
- 0x91, 0x8e, 0xd9, 0xa0, 0x0d, 0x77, 0xf6, 0x86, 0x83, 0xbd, 0x23, 0x4a, 0xf5, 0x81, 0x69, 0x99,
- 0xb4, 0x3b, 0x18, 0xf1, 0xb6, 0x67, 0x38, 0x50, 0x15, 0x9e, 0x29, 0x8c, 0x81, 0xa9, 0xd3, 0x41,
- 0xb7, 0x6f, 0x89, 0x56, 0xb4, 0x88, 0x77, 0xb3, 0xba, 0xde, 0xb3, 0xf0, 0xd6, 0x51, 0x2d, 0xf1,
- 0x96, 0xd5, 0x34, 0x0e, 0xf4, 0xe1, 0x91, 0xa9, 0x96, 0xc9, 0x6d, 0x58, 0x3f, 0xd4, 0xe9, 0x81,
- 0x31, 0x1a, 0x19, 0xc3, 0x81, 0xd5, 0xd3, 0x07, 0x86, 0xde, 0x53, 0x2b, 0x7c, 0x9d, 0x5d, 0x63,
- 0xdf, 0xec, 0xee, 0xf6, 0x75, 0xb9, 0x4e, 0x95, 0x6c, 0xc2, 0x5b, 0x7b, 0xc3, 0x83, 0x03, 0xc3,
- 0x34, 0xf5, 0x9e, 0xb5, 0x7b, 0x64, 0x5a, 0x23, 0xd3, 0xe8, 0xf7, 0xad, 0xee, 0xe1, 0x61, 0xff,
- 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f,
- 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14,
- 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2,
- 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4,
- 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1,
- 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b,
- 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9,
- 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18,
- 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e,
- 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9,
- 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95,
- 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0xce, 0xe6, 0x71, 0xd7, 0x75, 0xac, 0x88, 0xfd, 0x30,
- 0xe7, 0x1e, 0x60, 0xcd, 0x03, 0xc7, 0xe6, 0x62, 0xd6, 0x45, 0x96, 0x72, 0x9d, 0x91, 0xe4, 0x1c,
- 0x09, 0x46, 0xfb, 0x15, 0xc0, 0xb9, 0x14, 0x64, 0x1b, 0x6e, 0xf3, 0x3a, 0x9e, 0x45, 0x31, 0x73,
- 0x2c, 0xb9, 0xdb, 0x60, 0x1e, 0x47, 0x18, 0xe2, 0xcb, 0x74, 0x23, 0x65, 0xca, 0x9b, 0xc2, 0x79,
- 0x1c, 0x91, 0x9f, 0x40, 0xeb, 0xc2, 0x1c, 0x87, 0x4d, 0x19, 0x7f, 0x6d, 0x15, 0xa7, 0xdd, 0x59,
- 0x98, 0xd6, 0x13, 0x5c, 0xed, 0x4f, 0x14, 0x80, 0x7d, 0x16, 0x53, 0xc1, 0xcd, 0x34, 0xb6, 0x95,
- 0xeb, 0x36, 0xb6, 0xef, 0x27, 0x17, 0x08, 0xc5, 0xab, 0x63, 0xc0, 0x42, 0x97, 0xa1, 0xdc, 0xa4,
- 0xcb, 0xc8, 0x35, 0x11, 0xc5, 0x2b, 0x9a, 0x88, 0x52, 0xae, 0x89, 0xf8, 0x18, 0x9a, 0xf6, 0x74,
- 0xea, 0xbf, 0xe0, 0x05, 0x0d, 0x0b, 0x43, 0xe6, 0xa0, 0x11, 0x9c, 0xd7, 0xdb, 0xc8, 0xec, 0x49,
- 0x9e, 0xf6, 0xe7, 0x0a, 0x34, 0x50, 0x15, 0x51, 0xe0, 0x7b, 0x11, 0x23, 0x5f, 0x42, 0x45, 0x5e,
- 0x44, 0x8b, 0x8b, 0xfc, 0xb7, 0x33, 0xb2, 0x66, 0x70, 0xb2, 0x68, 0xa0, 0x12, 0xcc, 0x33, 0x42,
- 0xe6, 0x75, 0x97, 0x2b, 0x25, 0x45, 0x91, 0xfb, 0x50, 0x73, 0x3d, 0x4b, 0xb4, 0xd4, 0x95, 0x4c,
- 0x58, 0xac, 0xba, 0x1e, 0xd6, 0xb2, 0xed, 0x57, 0x50, 0x11, 0x2f, 0x21, 0x9d, 0x54, 0xa6, 0x8b,
- 0xfa, 0xcb, 0xdc, 0x1c, 0xa7, 0xc2, 0xc8, 0xc3, 0x29, 0xbd, 0x2e, 0x40, 0xb7, 0xa0, 0x7a, 0xca,
- 0x9b, 0x0f, 0xbc, 0xf4, 0xe3, 0xea, 0x4d, 0x86, 0xda, 0x1f, 0x97, 0x00, 0x0e, 0xe7, 0x4b, 0x0c,
- 0xa4, 0x71, 0x5d, 0x03, 0xe9, 0xe4, 0xf4, 0xf8, 0x7a, 0x99, 0x7f, 0x75, 0x43, 0x59, 0xd2, 0x69,
- 0x17, 0x6f, 0xda, 0x69, 0xdf, 0x87, 0x6a, 0x1c, 0xce, 0xb9, 0xa3, 0x08, 0x63, 0x4a, 0x5b, 0x5a,
- 0x49, 0x25, 0x6f, 0x42, 0x79, 0xe2, 0x87, 0x63, 0x86, 0x8e, 0x95, 0xb2, 0x05, 0xed, 0xc2, 0x65,
- 0x52, 0xed, 0xb2, 0xcb, 0x24, 0xde, 0xa0, 0x45, 0xf2, 0x1e, 0x0d, 0x0b, 0x99, 0x7c, 0x83, 0x96,
- 0x5c, 0xb1, 0xd1, 0x14, 0x44, 0xbe, 0x81, 0xa6, 0x3d, 0x8f, 0x7d, 0xcb, 0xe5, 0x15, 0xda, 0xd4,
- 0x1d, 0x9f, 0x61, 0xd9, 0xdd, 0xcc, 0x7f, 0xaf, 0x4f, 0x0f, 0xaa, 0xd3, 0x9d, 0xc7, 0xbe, 0xe1,
- 0x1c, 0x22, 0x72, 0xa7, 0x2a, 0x93, 0x12, 0x5d, 0xb1, 0x33, 0x64, 0xed, 0xc7, 0xb0, 0x92, 0x85,
- 0xf1, 0x04, 0x24, 0x81, 0xea, 0x1b, 0x3c, 0x3b, 0x8d, 0x78, 0x6a, 0x1b, 0x98, 0x46, 0xb7, 0xaf,
- 0x16, 0xb4, 0x18, 0x1a, 0xb8, 0xbc, 0xf4, 0x8e, 0xeb, 0xba, 0xfd, 0x03, 0x28, 0x61, 0xf8, 0x55,
- 0x2e, 0x7c, 0x0f, 0xc1, 0x98, 0x8b, 0xcc, 0xbc, 0xf9, 0x15, 0xb3, 0xe6, 0xf7, 0xdf, 0x05, 0x58,
- 0x31, 0xfd, 0xf9, 0xf8, 0xe4, 0xa2, 0x01, 0xc2, 0xaf, 0x3b, 0x42, 0x2d, 0x31, 0x1f, 0xe5, 0xa6,
- 0xe6, 0x93, 0x5a, 0x47, 0x71, 0x89, 0x75, 0xdc, 0xf4, 0xcc, 0xb5, 0x2f, 0x60, 0x55, 0x6e, 0x5e,
- 0x6a, 0x3d, 0xd1, 0x66, 0xe1, 0x0a, 0x6d, 0x6a, 0xbf, 0x50, 0x60, 0x55, 0xc4, 0xf7, 0xff, 0xbb,
- 0xd2, 0x2a, 0x37, 0x0c, 0xeb, 0xe5, 0x1b, 0x5d, 0x1e, 0xfd, 0xbf, 0xf4, 0x34, 0x6d, 0x08, 0xcd,
- 0x44, 0x7d, 0x37, 0x50, 0xfb, 0x15, 0x46, 0xfc, 0x8b, 0x02, 0x34, 0x06, 0xec, 0xe5, 0x92, 0x20,
- 0x5a, 0xbe, 0xee, 0x71, 0x7c, 0x98, 0x2b, 0x57, 0x1b, 0xdb, 0xeb, 0x59, 0x19, 0xc4, 0xd5, 0x63,
- 0x52, 0xc1, 0xa6, 0xb7, 0xa8, 0xca, 0xf2, 0x5b, 0xd4, 0xd2, 0x62, 0xb7, 0x9e, 0xb9, 0xc5, 0x2b,
- 0x2e, 0xbb, 0xc5, 0xd3, 0xfe, 0xad, 0x08, 0x0d, 0x6c, 0x90, 0x29, 0x8b, 0xe6, 0xd3, 0x38, 0x27,
- 0x4c, 0xe1, 0x6a, 0x61, 0x3a, 0x50, 0x09, 0x71, 0x92, 0x74, 0xa5, 0x4b, 0x83, 0xbf, 0x40, 0x61,
- 0x6b, 0xfc, 0xdc, 0x0d, 0x02, 0xe6, 0x58, 0x82, 0x92, 0x14, 0x30, 0x4d, 0x49, 0x16, 0x22, 0x44,
- 0xbc, 0xfc, 0x9c, 0xf9, 0x21, 0x4b, 0x51, 0x45, 0xbc, 0x4f, 0x68, 0x70, 0x5a, 0x02, 0xc9, 0xdd,
- 0x37, 0x88, 0xca, 0xe0, 0xfc, 0xbe, 0x21, 0xed, 0x35, 0x91, 0x5b, 0x47, 0xae, 0xe8, 0x35, 0x91,
- 0xcd, 0xbb, 0xa8, 0x99, 0x3d, 0x9d, 0x5a, 0x7e, 0x10, 0xa1, 0xd3, 0xd4, 0x68, 0x0d, 0x09, 0xc3,
- 0x20, 0x22, 0x5f, 0x43, 0x7a, 0x5d, 0x2c, 0x6f, 0xc9, 0xc5, 0x39, 0xb6, 0x2e, 0xbb, 0x58, 0xa0,
- 0xab, 0xe3, 0xdc, 0xfd, 0xcf, 0x92, 0x1b, 0xea, 0xca, 0x4d, 0x6f, 0xa8, 0x1f, 0x42, 0x59, 0xc4,
- 0xa8, 0xda, 0xeb, 0x62, 0x94, 0xc0, 0x65, 0xed, 0xb3, 0x91, 0xb7, 0xcf, 0x5f, 0x16, 0x80, 0x74,
- 0xa7, 0x53, 0x7f, 0x6c, 0xc7, 0xcc, 0x70, 0xa2, 0x8b, 0x66, 0x7a, 0xed, 0xcf, 0x2e, 0x9f, 0x41,
- 0x7d, 0xe6, 0x3b, 0x6c, 0x6a, 0x25, 0xdf, 0x94, 0x2e, 0xad, 0x7e, 0x10, 0xc6, 0x5b, 0x52, 0x02,
- 0x25, 0xbc, 0xc4, 0x51, 0xb0, 0xee, 0xc0, 0x67, 0xde, 0x84, 0xcd, 0xec, 0x97, 0xb2, 0x14, 0xe1,
- 0x8f, 0xa4, 0x03, 0xd5, 0x90, 0x45, 0x2c, 0x3c, 0x65, 0x57, 0x16, 0x55, 0x09, 0x48, 0x7b, 0x06,
- 0x1b, 0xb9, 0x1d, 0x49, 0x47, 0xbe, 0x85, 0x5f, 0x2b, 0xc3, 0x58, 0x7e, 0xb4, 0x12, 0x03, 0xfe,
- 0x3a, 0xe6, 0x25, 0x9f, 0x41, 0xf9, 0x63, 0xea, 0xf0, 0xc5, 0xab, 0xe2, 0xec, 0x1e, 0xa8, 0x59,
- 0x4d, 0xbb, 0x63, 0x0c, 0x36, 0xf2, 0x54, 0x0a, 0xd7, 0x3b, 0x15, 0xed, 0xef, 0x0a, 0xb0, 0xde,
- 0x75, 0x1c, 0xf1, 0x77, 0xc3, 0x25, 0xaa, 0x2f, 0x5e, 0x57, 0xf5, 0x0b, 0x81, 0x58, 0x84, 0x89,
- 0x6b, 0x05, 0xe2, 0x0f, 0xa1, 0x92, 0xd6, 0x5a, 0xc5, 0x05, 0x77, 0x16, 0x72, 0x51, 0x09, 0xd0,
- 0x6e, 0x01, 0xc9, 0x0a, 0x2b, 0xb4, 0xaa, 0xfd, 0x69, 0x11, 0xee, 0xee, 0xb2, 0x63, 0xd7, 0xcb,
- 0xbe, 0xe2, 0x57, 0xdf, 0xc9, 0xc5, 0x4f, 0x65, 0x9f, 0xc1, 0xba, 0x28, 0xe4, 0x93, 0x7f, 0x62,
- 0x59, 0xec, 0x58, 0x7e, 0x9d, 0x94, 0xb1, 0x6a, 0x0d, 0xf9, 0x07, 0x92, 0xad, 0xe3, 0x7f, 0xc5,
- 0x1c, 0x3b, 0xb6, 0x9f, 0xd9, 0x11, 0xb3, 0x5c, 0x47, 0xfe, 0x59, 0x06, 0x12, 0x92, 0xe1, 0x90,
- 0x21, 0x94, 0xb8, 0x0d, 0xa2, 0xeb, 0x36, 0xb7, 0xb7, 0x33, 0x62, 0x5d, 0xb2, 0x95, 0xac, 0x02,
- 0x0f, 0x7c, 0x87, 0xed, 0x54, 0x8f, 0x06, 0x4f, 0x06, 0xc3, 0xef, 0x06, 0x14, 0x17, 0x22, 0x06,
- 0xdc, 0x0a, 0x42, 0x76, 0xea, 0xfa, 0xf3, 0xc8, 0xca, 0x9e, 0x44, 0xf5, 0xca, 0x94, 0xb8, 0x91,
- 0xcc, 0xc9, 0x10, 0xb5, 0x9f, 0xc2, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41,
- 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37,
- 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3,
- 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71,
- 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd,
- 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01,
- 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00,
-}
diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
deleted file mode 100644
index 497b4d9a..00000000
--- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
+++ /dev/null
@@ -1,551 +0,0 @@
-syntax = "proto2";
-option go_package = "datastore";
-
-package appengine;
-
-message Action{}
-
-message PropertyValue {
- optional int64 int64Value = 1;
- optional bool booleanValue = 2;
- optional string stringValue = 3;
- optional double doubleValue = 4;
-
- optional group PointValue = 5 {
- required double x = 6;
- required double y = 7;
- }
-
- optional group UserValue = 8 {
- required string email = 9;
- required string auth_domain = 10;
- optional string nickname = 11;
- optional string federated_identity = 21;
- optional string federated_provider = 22;
- }
-
- optional group ReferenceValue = 12 {
- required string app = 13;
- optional string name_space = 20;
- repeated group PathElement = 14 {
- required string type = 15;
- optional int64 id = 16;
- optional string name = 17;
- }
- }
-}
-
-message Property {
- enum Meaning {
- NO_MEANING = 0;
- BLOB = 14;
- TEXT = 15;
- BYTESTRING = 16;
-
- ATOM_CATEGORY = 1;
- ATOM_LINK = 2;
- ATOM_TITLE = 3;
- ATOM_CONTENT = 4;
- ATOM_SUMMARY = 5;
- ATOM_AUTHOR = 6;
-
- GD_WHEN = 7;
- GD_EMAIL = 8;
- GEORSS_POINT = 9;
- GD_IM = 10;
-
- GD_PHONENUMBER = 11;
- GD_POSTALADDRESS = 12;
-
- GD_RATING = 13;
-
- BLOBKEY = 17;
- ENTITY_PROTO = 19;
-
- INDEX_VALUE = 18;
- };
-
- optional Meaning meaning = 1 [default = NO_MEANING];
- optional string meaning_uri = 2;
-
- required string name = 3;
-
- required PropertyValue value = 5;
-
- required bool multiple = 4;
-
- optional bool searchable = 6 [default=false];
-
- enum FtsTokenizationOption {
- HTML = 1;
- ATOM = 2;
- }
-
- optional FtsTokenizationOption fts_tokenization_option = 8;
-
- optional string locale = 9 [default = "en"];
-}
-
-message Path {
- repeated group Element = 1 {
- required string type = 2;
- optional int64 id = 3;
- optional string name = 4;
- }
-}
-
-message Reference {
- required string app = 13;
- optional string name_space = 20;
- required Path path = 14;
-}
-
-message User {
- required string email = 1;
- required string auth_domain = 2;
- optional string nickname = 3;
- optional string federated_identity = 6;
- optional string federated_provider = 7;
-}
-
-message EntityProto {
- required Reference key = 13;
- required Path entity_group = 16;
- optional User owner = 17;
-
- enum Kind {
- GD_CONTACT = 1;
- GD_EVENT = 2;
- GD_MESSAGE = 3;
- }
- optional Kind kind = 4;
- optional string kind_uri = 5;
-
- repeated Property property = 14;
- repeated Property raw_property = 15;
-
- optional int32 rank = 18;
-}
-
-message CompositeProperty {
- required int64 index_id = 1;
- repeated string value = 2;
-}
-
-message Index {
- required string entity_type = 1;
- required bool ancestor = 5;
- repeated group Property = 2 {
- required string name = 3;
- enum Direction {
- ASCENDING = 1;
- DESCENDING = 2;
- }
- optional Direction direction = 4 [default = ASCENDING];
- }
-}
-
-message CompositeIndex {
- required string app_id = 1;
- required int64 id = 2;
- required Index definition = 3;
-
- enum State {
- WRITE_ONLY = 1;
- READ_WRITE = 2;
- DELETED = 3;
- ERROR = 4;
- }
- required State state = 4;
-
- optional bool only_use_if_required = 6 [default = false];
-}
-
-message IndexPostfix {
- message IndexValue {
- required string property_name = 1;
- required PropertyValue value = 2;
- }
-
- repeated IndexValue index_value = 1;
-
- optional Reference key = 2;
-
- optional bool before = 3 [default=true];
-}
-
-message IndexPosition {
- optional string key = 1;
-
- optional bool before = 2 [default=true];
-}
-
-message Snapshot {
- enum Status {
- INACTIVE = 0;
- ACTIVE = 1;
- }
-
- required int64 ts = 1;
-}
-
-message InternalHeader {
- optional string qos = 1;
-}
-
-message Transaction {
- optional InternalHeader header = 4;
- required fixed64 handle = 1;
- required string app = 2;
- optional bool mark_changes = 3 [default = false];
-}
-
-message Query {
- optional InternalHeader header = 39;
-
- required string app = 1;
- optional string name_space = 29;
-
- optional string kind = 3;
- optional Reference ancestor = 17;
-
- repeated group Filter = 4 {
- enum Operator {
- LESS_THAN = 1;
- LESS_THAN_OR_EQUAL = 2;
- GREATER_THAN = 3;
- GREATER_THAN_OR_EQUAL = 4;
- EQUAL = 5;
- IN = 6;
- EXISTS = 7;
- }
-
- required Operator op = 6;
- repeated Property property = 14;
- }
-
- optional string search_query = 8;
-
- repeated group Order = 9 {
- enum Direction {
- ASCENDING = 1;
- DESCENDING = 2;
- }
-
- required string property = 10;
- optional Direction direction = 11 [default = ASCENDING];
- }
-
- enum Hint {
- ORDER_FIRST = 1;
- ANCESTOR_FIRST = 2;
- FILTER_FIRST = 3;
- }
- optional Hint hint = 18;
-
- optional int32 count = 23;
-
- optional int32 offset = 12 [default = 0];
-
- optional int32 limit = 16;
-
- optional CompiledCursor compiled_cursor = 30;
- optional CompiledCursor end_compiled_cursor = 31;
-
- repeated CompositeIndex composite_index = 19;
-
- optional bool require_perfect_plan = 20 [default = false];
-
- optional bool keys_only = 21 [default = false];
-
- optional Transaction transaction = 22;
-
- optional bool compile = 25 [default = false];
-
- optional int64 failover_ms = 26;
-
- optional bool strong = 32;
-
- repeated string property_name = 33;
-
- repeated string group_by_property_name = 34;
-
- optional bool distinct = 24;
-
- optional int64 min_safe_time_seconds = 35;
-
- repeated string safe_replica_name = 36;
-
- optional bool persist_offset = 37 [default=false];
-}
-
-message CompiledQuery {
- required group PrimaryScan = 1 {
- optional string index_name = 2;
-
- optional string start_key = 3;
- optional bool start_inclusive = 4;
- optional string end_key = 5;
- optional bool end_inclusive = 6;
-
- repeated string start_postfix_value = 22;
- repeated string end_postfix_value = 23;
-
- optional int64 end_unapplied_log_timestamp_us = 19;
- }
-
- repeated group MergeJoinScan = 7 {
- required string index_name = 8;
-
- repeated string prefix_value = 9;
-
- optional bool value_prefix = 20 [default=false];
- }
-
- optional Index index_def = 21;
-
- optional int32 offset = 10 [default = 0];
-
- optional int32 limit = 11;
-
- required bool keys_only = 12;
-
- repeated string property_name = 24;
-
- optional int32 distinct_infix_size = 25;
-
- optional group EntityFilter = 13 {
- optional bool distinct = 14 [default=false];
-
- optional string kind = 17;
- optional Reference ancestor = 18;
- }
-}
-
-message CompiledCursor {
- optional group Position = 2 {
- optional string start_key = 27;
-
- repeated group IndexValue = 29 {
- optional string property = 30;
- required PropertyValue value = 31;
- }
-
- optional Reference key = 32;
-
- optional bool start_inclusive = 28 [default=true];
- }
-}
-
-message Cursor {
- required fixed64 cursor = 1;
-
- optional string app = 2;
-}
-
-message Error {
- enum ErrorCode {
- BAD_REQUEST = 1;
- CONCURRENT_TRANSACTION = 2;
- INTERNAL_ERROR = 3;
- NEED_INDEX = 4;
- TIMEOUT = 5;
- PERMISSION_DENIED = 6;
- BIGTABLE_ERROR = 7;
- COMMITTED_BUT_STILL_APPLYING = 8;
- CAPABILITY_DISABLED = 9;
- TRY_ALTERNATE_BACKEND = 10;
- SAFE_TIME_TOO_OLD = 11;
- }
-}
-
-message Cost {
- optional int32 index_writes = 1;
- optional int32 index_write_bytes = 2;
- optional int32 entity_writes = 3;
- optional int32 entity_write_bytes = 4;
- optional group CommitCost = 5 {
- optional int32 requested_entity_puts = 6;
- optional int32 requested_entity_deletes = 7;
- };
- optional int32 approximate_storage_delta = 8;
- optional int32 id_sequence_updates = 9;
-}
-
-message GetRequest {
- optional InternalHeader header = 6;
-
- repeated Reference key = 1;
- optional Transaction transaction = 2;
-
- optional int64 failover_ms = 3;
-
- optional bool strong = 4;
-
- optional bool allow_deferred = 5 [default=false];
-}
-
-message GetResponse {
- repeated group Entity = 1 {
- optional EntityProto entity = 2;
- optional Reference key = 4;
-
- optional int64 version = 3;
- }
-
- repeated Reference deferred = 5;
-
- optional bool in_order = 6 [default=true];
-}
-
-message PutRequest {
- optional InternalHeader header = 11;
-
- repeated EntityProto entity = 1;
- optional Transaction transaction = 2;
- repeated CompositeIndex composite_index = 3;
-
- optional bool trusted = 4 [default = false];
-
- optional bool force = 7 [default = false];
-
- optional bool mark_changes = 8 [default = false];
- repeated Snapshot snapshot = 9;
-
- enum AutoIdPolicy {
- CURRENT = 0;
- SEQUENTIAL = 1;
- }
- optional AutoIdPolicy auto_id_policy = 10 [default = CURRENT];
-}
-
-message PutResponse {
- repeated Reference key = 1;
- optional Cost cost = 2;
- repeated int64 version = 3;
-}
-
-message TouchRequest {
- optional InternalHeader header = 10;
-
- repeated Reference key = 1;
- repeated CompositeIndex composite_index = 2;
- optional bool force = 3 [default = false];
- repeated Snapshot snapshot = 9;
-}
-
-message TouchResponse {
- optional Cost cost = 1;
-}
-
-message DeleteRequest {
- optional InternalHeader header = 10;
-
- repeated Reference key = 6;
- optional Transaction transaction = 5;
-
- optional bool trusted = 4 [default = false];
-
- optional bool force = 7 [default = false];
-
- optional bool mark_changes = 8 [default = false];
- repeated Snapshot snapshot = 9;
-}
-
-message DeleteResponse {
- optional Cost cost = 1;
- repeated int64 version = 3;
-}
-
-message NextRequest {
- optional InternalHeader header = 5;
-
- required Cursor cursor = 1;
- optional int32 count = 2;
-
- optional int32 offset = 4 [default = 0];
-
- optional bool compile = 3 [default = false];
-}
-
-message QueryResult {
- optional Cursor cursor = 1;
-
- repeated EntityProto result = 2;
-
- optional int32 skipped_results = 7;
-
- required bool more_results = 3;
-
- optional bool keys_only = 4;
-
- optional bool index_only = 9;
-
- optional bool small_ops = 10;
-
- optional CompiledQuery compiled_query = 5;
-
- optional CompiledCursor compiled_cursor = 6;
-
- repeated CompositeIndex index = 8;
-
- repeated int64 version = 11;
-}
-
-message AllocateIdsRequest {
- optional InternalHeader header = 4;
-
- optional Reference model_key = 1;
-
- optional int64 size = 2;
-
- optional int64 max = 3;
-
- repeated Reference reserve = 5;
-}
-
-message AllocateIdsResponse {
- required int64 start = 1;
- required int64 end = 2;
- optional Cost cost = 3;
-}
-
-message CompositeIndices {
- repeated CompositeIndex index = 1;
-}
-
-message AddActionsRequest {
- optional InternalHeader header = 3;
-
- required Transaction transaction = 1;
- repeated Action action = 2;
-}
-
-message AddActionsResponse {
-}
-
-message BeginTransactionRequest {
- optional InternalHeader header = 3;
-
- required string app = 1;
- optional bool allow_multiple_eg = 2 [default = false];
- optional string database_id = 4;
-
- enum TransactionMode {
- UNKNOWN = 0;
- READ_ONLY = 1;
- READ_WRITE = 2;
- }
- optional TransactionMode mode = 5 [default = UNKNOWN];
-
- optional Transaction previous_transaction = 7;
-}
-
-message CommitResponse {
- optional Cost cost = 1;
-
- repeated group Version = 3 {
- required Reference root_entity_key = 4;
- required int64 version = 5;
- }
-}
diff --git a/vendor/google.golang.org/appengine/internal/identity.go b/vendor/google.golang.org/appengine/internal/identity.go
deleted file mode 100644
index 9b4134e4..00000000
--- a/vendor/google.golang.org/appengine/internal/identity.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package internal
-
-import (
- "os"
-
- netcontext "golang.org/x/net/context"
-)
-
-var (
- // This is set to true in identity_classic.go, which is behind the appengine build tag.
- // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not
- // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a
- // first-gen runtime. See IsStandard below for the second-gen check.
- appengineStandard bool
-
- // This is set to true in identity_flex.go, which is behind the appenginevm build tag.
- appengineFlex bool
-)
-
-// AppID is the implementation of the wrapper function of the same name in
-// ../identity.go. See that file for commentary.
-func AppID(c netcontext.Context) string {
- return appID(FullyQualifiedAppID(c))
-}
-
-// IsStandard is the implementation of the wrapper function of the same name in
-// ../appengine.go. See that file for commentary.
-func IsStandard() bool {
- // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not
- // second-gen (>= Go 1.11).
- return appengineStandard || IsSecondGen()
-}
-
-// IsStandard is the implementation of the wrapper function of the same name in
-// ../appengine.go. See that file for commentary.
-func IsSecondGen() bool {
- // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime.
- return os.Getenv("GAE_ENV") == "standard"
-}
-
-// IsFlex is the implementation of the wrapper function of the same name in
-// ../appengine.go. See that file for commentary.
-func IsFlex() bool {
- return appengineFlex
-}
-
-// IsAppEngine is the implementation of the wrapper function of the same name in
-// ../appengine.go. See that file for commentary.
-func IsAppEngine() bool {
- return IsStandard() || IsFlex()
-}
diff --git a/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/google.golang.org/appengine/internal/identity_classic.go
deleted file mode 100644
index 4e979f45..00000000
--- a/vendor/google.golang.org/appengine/internal/identity_classic.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build appengine
-
-package internal
-
-import (
- "appengine"
-
- netcontext "golang.org/x/net/context"
-)
-
-func init() {
- appengineStandard = true
-}
-
-func DefaultVersionHostname(ctx netcontext.Context) string {
- c := fromContext(ctx)
- if c == nil {
- panic(errNotAppEngineContext)
- }
- return appengine.DefaultVersionHostname(c)
-}
-
-func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() }
-func ServerSoftware() string { return appengine.ServerSoftware() }
-func InstanceID() string { return appengine.InstanceID() }
-func IsDevAppServer() bool { return appengine.IsDevAppServer() }
-
-func RequestID(ctx netcontext.Context) string {
- c := fromContext(ctx)
- if c == nil {
- panic(errNotAppEngineContext)
- }
- return appengine.RequestID(c)
-}
-
-func ModuleName(ctx netcontext.Context) string {
- c := fromContext(ctx)
- if c == nil {
- panic(errNotAppEngineContext)
- }
- return appengine.ModuleName(c)
-}
-func VersionID(ctx netcontext.Context) string {
- c := fromContext(ctx)
- if c == nil {
- panic(errNotAppEngineContext)
- }
- return appengine.VersionID(c)
-}
-
-func fullyQualifiedAppID(ctx netcontext.Context) string {
- c := fromContext(ctx)
- if c == nil {
- panic(errNotAppEngineContext)
- }
- return c.FullyQualifiedAppID()
-}
diff --git a/vendor/google.golang.org/appengine/internal/identity_flex.go b/vendor/google.golang.org/appengine/internal/identity_flex.go
deleted file mode 100644
index d5e2e7b5..00000000
--- a/vendor/google.golang.org/appengine/internal/identity_flex.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2018 Google LLC. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build appenginevm
-
-package internal
-
-func init() {
- appengineFlex = true
-}
diff --git a/vendor/google.golang.org/appengine/internal/identity_vm.go b/vendor/google.golang.org/appengine/internal/identity_vm.go
deleted file mode 100644
index 5d806726..00000000
--- a/vendor/google.golang.org/appengine/internal/identity_vm.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build !appengine
-
-package internal
-
-import (
- "log"
- "net/http"
- "os"
- "strings"
-
- netcontext "golang.org/x/net/context"
-)
-
-// These functions are implementations of the wrapper functions
-// in ../appengine/identity.go. See that file for commentary.
-
-const (
- hDefaultVersionHostname = "X-AppEngine-Default-Version-Hostname"
- hRequestLogId = "X-AppEngine-Request-Log-Id"
- hDatacenter = "X-AppEngine-Datacenter"
-)
-
-func ctxHeaders(ctx netcontext.Context) http.Header {
- c := fromContext(ctx)
- if c == nil {
- return nil
- }
- return c.Request().Header
-}
-
-func DefaultVersionHostname(ctx netcontext.Context) string {
- return ctxHeaders(ctx).Get(hDefaultVersionHostname)
-}
-
-func RequestID(ctx netcontext.Context) string {
- return ctxHeaders(ctx).Get(hRequestLogId)
-}
-
-func Datacenter(ctx netcontext.Context) string {
- if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" {
- return dc
- }
- // If the header isn't set, read zone from the metadata service.
- // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE]
- zone, err := getMetadata("instance/zone")
- if err != nil {
- log.Printf("Datacenter: %v", err)
- return ""
- }
- parts := strings.Split(string(zone), "/")
- if len(parts) == 0 {
- return ""
- }
- return parts[len(parts)-1]
-}
-
-func ServerSoftware() string {
- // TODO(dsymonds): Remove fallback when we've verified this.
- if s := os.Getenv("SERVER_SOFTWARE"); s != "" {
- return s
- }
- if s := os.Getenv("GAE_ENV"); s != "" {
- return s
- }
- return "Google App Engine/1.x.x"
-}
-
-// TODO(dsymonds): Remove the metadata fetches.
-
-func ModuleName(_ netcontext.Context) string {
- if s := os.Getenv("GAE_MODULE_NAME"); s != "" {
- return s
- }
- if s := os.Getenv("GAE_SERVICE"); s != "" {
- return s
- }
- return string(mustGetMetadata("instance/attributes/gae_backend_name"))
-}
-
-func VersionID(_ netcontext.Context) string {
- if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" {
- return s1 + "." + s2
- }
- if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" {
- return s1 + "." + s2
- }
- return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version"))
-}
-
-func InstanceID() string {
- if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" {
- return s
- }
- if s := os.Getenv("GAE_INSTANCE"); s != "" {
- return s
- }
- return string(mustGetMetadata("instance/attributes/gae_backend_instance"))
-}
-
-func partitionlessAppID() string {
- // gae_project has everything except the partition prefix.
- if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" {
- return appID
- }
- if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" {
- return project
- }
- return string(mustGetMetadata("instance/attributes/gae_project"))
-}
-
-func fullyQualifiedAppID(_ netcontext.Context) string {
- if s := os.Getenv("GAE_APPLICATION"); s != "" {
- return s
- }
- appID := partitionlessAppID()
-
- part := os.Getenv("GAE_PARTITION")
- if part == "" {
- part = string(mustGetMetadata("instance/attributes/gae_partition"))
- }
-
- if part != "" {
- appID = part + "~" + appID
- }
- return appID
-}
-
-func IsDevAppServer() bool {
- return os.Getenv("RUN_WITH_DEVAPPSERVER") != ""
-}
diff --git a/vendor/google.golang.org/appengine/internal/internal.go b/vendor/google.golang.org/appengine/internal/internal.go
deleted file mode 100644
index 051ea398..00000000
--- a/vendor/google.golang.org/appengine/internal/internal.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// Package internal provides support for package appengine.
-//
-// Programs should not use this package directly. Its API is not stable.
-// Use packages appengine and appengine/* instead.
-package internal
-
-import (
- "fmt"
-
- "github.com/golang/protobuf/proto"
-
- remotepb "google.golang.org/appengine/internal/remote_api"
-)
-
-// errorCodeMaps is a map of service name to the error code map for the service.
-var errorCodeMaps = make(map[string]map[int32]string)
-
-// RegisterErrorCodeMap is called from API implementations to register their
-// error code map. This should only be called from init functions.
-func RegisterErrorCodeMap(service string, m map[int32]string) {
- errorCodeMaps[service] = m
-}
-
-type timeoutCodeKey struct {
- service string
- code int32
-}
-
-// timeoutCodes is the set of service+code pairs that represent timeouts.
-var timeoutCodes = make(map[timeoutCodeKey]bool)
-
-func RegisterTimeoutErrorCode(service string, code int32) {
- timeoutCodes[timeoutCodeKey{service, code}] = true
-}
-
-// APIError is the type returned by appengine.Context's Call method
-// when an API call fails in an API-specific way. This may be, for instance,
-// a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE.
-type APIError struct {
- Service string
- Detail string
- Code int32 // API-specific error code
-}
-
-func (e *APIError) Error() string {
- if e.Code == 0 {
- if e.Detail == "" {
- return "APIError "
- }
- return e.Detail
- }
- s := fmt.Sprintf("API error %d", e.Code)
- if m, ok := errorCodeMaps[e.Service]; ok {
- s += " (" + e.Service + ": " + m[e.Code] + ")"
- } else {
- // Shouldn't happen, but provide a bit more detail if it does.
- s = e.Service + " " + s
- }
- if e.Detail != "" {
- s += ": " + e.Detail
- }
- return s
-}
-
-func (e *APIError) IsTimeout() bool {
- return timeoutCodes[timeoutCodeKey{e.Service, e.Code}]
-}
-
-// CallError is the type returned by appengine.Context's Call method when an
-// API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED.
-type CallError struct {
- Detail string
- Code int32
- // TODO: Remove this if we get a distinguishable error code.
- Timeout bool
-}
-
-func (e *CallError) Error() string {
- var msg string
- switch remotepb.RpcError_ErrorCode(e.Code) {
- case remotepb.RpcError_UNKNOWN:
- return e.Detail
- case remotepb.RpcError_OVER_QUOTA:
- msg = "Over quota"
- case remotepb.RpcError_CAPABILITY_DISABLED:
- msg = "Capability disabled"
- case remotepb.RpcError_CANCELLED:
- msg = "Canceled"
- default:
- msg = fmt.Sprintf("Call error %d", e.Code)
- }
- s := msg + ": " + e.Detail
- if e.Timeout {
- s += " (timeout)"
- }
- return s
-}
-
-func (e *CallError) IsTimeout() bool {
- return e.Timeout
-}
-
-// NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace.
-// The function should be prepared to be called on the same message more than once; it should only modify the
-// RPC request the first time.
-var NamespaceMods = make(map[string]func(m proto.Message, namespace string))
diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go
deleted file mode 100644
index 8545ac4a..00000000
--- a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go
+++ /dev/null
@@ -1,1313 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google.golang.org/appengine/internal/log/log_service.proto
-
-package log
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type LogServiceError_ErrorCode int32
-
-const (
- LogServiceError_OK LogServiceError_ErrorCode = 0
- LogServiceError_INVALID_REQUEST LogServiceError_ErrorCode = 1
- LogServiceError_STORAGE_ERROR LogServiceError_ErrorCode = 2
-)
-
-var LogServiceError_ErrorCode_name = map[int32]string{
- 0: "OK",
- 1: "INVALID_REQUEST",
- 2: "STORAGE_ERROR",
-}
-var LogServiceError_ErrorCode_value = map[string]int32{
- "OK": 0,
- "INVALID_REQUEST": 1,
- "STORAGE_ERROR": 2,
-}
-
-func (x LogServiceError_ErrorCode) Enum() *LogServiceError_ErrorCode {
- p := new(LogServiceError_ErrorCode)
- *p = x
- return p
-}
-func (x LogServiceError_ErrorCode) String() string {
- return proto.EnumName(LogServiceError_ErrorCode_name, int32(x))
-}
-func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(LogServiceError_ErrorCode_value, data, "LogServiceError_ErrorCode")
- if err != nil {
- return err
- }
- *x = LogServiceError_ErrorCode(value)
- return nil
-}
-func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0}
-}
-
-type LogServiceError struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogServiceError) Reset() { *m = LogServiceError{} }
-func (m *LogServiceError) String() string { return proto.CompactTextString(m) }
-func (*LogServiceError) ProtoMessage() {}
-func (*LogServiceError) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{0}
-}
-func (m *LogServiceError) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogServiceError.Unmarshal(m, b)
-}
-func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic)
-}
-func (dst *LogServiceError) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogServiceError.Merge(dst, src)
-}
-func (m *LogServiceError) XXX_Size() int {
- return xxx_messageInfo_LogServiceError.Size(m)
-}
-func (m *LogServiceError) XXX_DiscardUnknown() {
- xxx_messageInfo_LogServiceError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogServiceError proto.InternalMessageInfo
-
-type UserAppLogLine struct {
- TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"`
- Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"`
- Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} }
-func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) }
-func (*UserAppLogLine) ProtoMessage() {}
-func (*UserAppLogLine) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{1}
-}
-func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b)
-}
-func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic)
-}
-func (dst *UserAppLogLine) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserAppLogLine.Merge(dst, src)
-}
-func (m *UserAppLogLine) XXX_Size() int {
- return xxx_messageInfo_UserAppLogLine.Size(m)
-}
-func (m *UserAppLogLine) XXX_DiscardUnknown() {
- xxx_messageInfo_UserAppLogLine.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo
-
-func (m *UserAppLogLine) GetTimestampUsec() int64 {
- if m != nil && m.TimestampUsec != nil {
- return *m.TimestampUsec
- }
- return 0
-}
-
-func (m *UserAppLogLine) GetLevel() int64 {
- if m != nil && m.Level != nil {
- return *m.Level
- }
- return 0
-}
-
-func (m *UserAppLogLine) GetMessage() string {
- if m != nil && m.Message != nil {
- return *m.Message
- }
- return ""
-}
-
-type UserAppLogGroup struct {
- LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} }
-func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) }
-func (*UserAppLogGroup) ProtoMessage() {}
-func (*UserAppLogGroup) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{2}
-}
-func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b)
-}
-func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic)
-}
-func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserAppLogGroup.Merge(dst, src)
-}
-func (m *UserAppLogGroup) XXX_Size() int {
- return xxx_messageInfo_UserAppLogGroup.Size(m)
-}
-func (m *UserAppLogGroup) XXX_DiscardUnknown() {
- xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo
-
-func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine {
- if m != nil {
- return m.LogLine
- }
- return nil
-}
-
-type FlushRequest struct {
- Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *FlushRequest) Reset() { *m = FlushRequest{} }
-func (m *FlushRequest) String() string { return proto.CompactTextString(m) }
-func (*FlushRequest) ProtoMessage() {}
-func (*FlushRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{3}
-}
-func (m *FlushRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_FlushRequest.Unmarshal(m, b)
-}
-func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic)
-}
-func (dst *FlushRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_FlushRequest.Merge(dst, src)
-}
-func (m *FlushRequest) XXX_Size() int {
- return xxx_messageInfo_FlushRequest.Size(m)
-}
-func (m *FlushRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_FlushRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_FlushRequest proto.InternalMessageInfo
-
-func (m *FlushRequest) GetLogs() []byte {
- if m != nil {
- return m.Logs
- }
- return nil
-}
-
-type SetStatusRequest struct {
- Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} }
-func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) }
-func (*SetStatusRequest) ProtoMessage() {}
-func (*SetStatusRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{4}
-}
-func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b)
-}
-func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic)
-}
-func (dst *SetStatusRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SetStatusRequest.Merge(dst, src)
-}
-func (m *SetStatusRequest) XXX_Size() int {
- return xxx_messageInfo_SetStatusRequest.Size(m)
-}
-func (m *SetStatusRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_SetStatusRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo
-
-func (m *SetStatusRequest) GetStatus() string {
- if m != nil && m.Status != nil {
- return *m.Status
- }
- return ""
-}
-
-type LogOffset struct {
- RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogOffset) Reset() { *m = LogOffset{} }
-func (m *LogOffset) String() string { return proto.CompactTextString(m) }
-func (*LogOffset) ProtoMessage() {}
-func (*LogOffset) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{5}
-}
-func (m *LogOffset) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogOffset.Unmarshal(m, b)
-}
-func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic)
-}
-func (dst *LogOffset) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogOffset.Merge(dst, src)
-}
-func (m *LogOffset) XXX_Size() int {
- return xxx_messageInfo_LogOffset.Size(m)
-}
-func (m *LogOffset) XXX_DiscardUnknown() {
- xxx_messageInfo_LogOffset.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogOffset proto.InternalMessageInfo
-
-func (m *LogOffset) GetRequestId() []byte {
- if m != nil {
- return m.RequestId
- }
- return nil
-}
-
-type LogLine struct {
- Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"`
- Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"`
- LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogLine) Reset() { *m = LogLine{} }
-func (m *LogLine) String() string { return proto.CompactTextString(m) }
-func (*LogLine) ProtoMessage() {}
-func (*LogLine) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{6}
-}
-func (m *LogLine) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogLine.Unmarshal(m, b)
-}
-func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogLine.Marshal(b, m, deterministic)
-}
-func (dst *LogLine) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogLine.Merge(dst, src)
-}
-func (m *LogLine) XXX_Size() int {
- return xxx_messageInfo_LogLine.Size(m)
-}
-func (m *LogLine) XXX_DiscardUnknown() {
- xxx_messageInfo_LogLine.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogLine proto.InternalMessageInfo
-
-func (m *LogLine) GetTime() int64 {
- if m != nil && m.Time != nil {
- return *m.Time
- }
- return 0
-}
-
-func (m *LogLine) GetLevel() int32 {
- if m != nil && m.Level != nil {
- return *m.Level
- }
- return 0
-}
-
-func (m *LogLine) GetLogMessage() string {
- if m != nil && m.LogMessage != nil {
- return *m.LogMessage
- }
- return ""
-}
-
-type RequestLog struct {
- AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
- ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"`
- VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"`
- RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"`
- Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"`
- Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"`
- Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"`
- StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"`
- EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"`
- Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"`
- Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"`
- Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"`
- Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"`
- HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"`
- Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"`
- ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"`
- Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"`
- UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"`
- UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"`
- Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"`
- ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"`
- Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"`
- Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"`
- TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"`
- TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"`
- WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"`
- PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"`
- ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"`
- Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"`
- CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"`
- Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"`
- LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"`
- AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"`
- ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"`
- WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"`
- WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"`
- ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"`
- ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *RequestLog) Reset() { *m = RequestLog{} }
-func (m *RequestLog) String() string { return proto.CompactTextString(m) }
-func (*RequestLog) ProtoMessage() {}
-func (*RequestLog) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{7}
-}
-func (m *RequestLog) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_RequestLog.Unmarshal(m, b)
-}
-func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic)
-}
-func (dst *RequestLog) XXX_Merge(src proto.Message) {
- xxx_messageInfo_RequestLog.Merge(dst, src)
-}
-func (m *RequestLog) XXX_Size() int {
- return xxx_messageInfo_RequestLog.Size(m)
-}
-func (m *RequestLog) XXX_DiscardUnknown() {
- xxx_messageInfo_RequestLog.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_RequestLog proto.InternalMessageInfo
-
-const Default_RequestLog_ModuleId string = "default"
-const Default_RequestLog_ReplicaIndex int32 = -1
-const Default_RequestLog_Finished bool = true
-
-func (m *RequestLog) GetAppId() string {
- if m != nil && m.AppId != nil {
- return *m.AppId
- }
- return ""
-}
-
-func (m *RequestLog) GetModuleId() string {
- if m != nil && m.ModuleId != nil {
- return *m.ModuleId
- }
- return Default_RequestLog_ModuleId
-}
-
-func (m *RequestLog) GetVersionId() string {
- if m != nil && m.VersionId != nil {
- return *m.VersionId
- }
- return ""
-}
-
-func (m *RequestLog) GetRequestId() []byte {
- if m != nil {
- return m.RequestId
- }
- return nil
-}
-
-func (m *RequestLog) GetOffset() *LogOffset {
- if m != nil {
- return m.Offset
- }
- return nil
-}
-
-func (m *RequestLog) GetIp() string {
- if m != nil && m.Ip != nil {
- return *m.Ip
- }
- return ""
-}
-
-func (m *RequestLog) GetNickname() string {
- if m != nil && m.Nickname != nil {
- return *m.Nickname
- }
- return ""
-}
-
-func (m *RequestLog) GetStartTime() int64 {
- if m != nil && m.StartTime != nil {
- return *m.StartTime
- }
- return 0
-}
-
-func (m *RequestLog) GetEndTime() int64 {
- if m != nil && m.EndTime != nil {
- return *m.EndTime
- }
- return 0
-}
-
-func (m *RequestLog) GetLatency() int64 {
- if m != nil && m.Latency != nil {
- return *m.Latency
- }
- return 0
-}
-
-func (m *RequestLog) GetMcycles() int64 {
- if m != nil && m.Mcycles != nil {
- return *m.Mcycles
- }
- return 0
-}
-
-func (m *RequestLog) GetMethod() string {
- if m != nil && m.Method != nil {
- return *m.Method
- }
- return ""
-}
-
-func (m *RequestLog) GetResource() string {
- if m != nil && m.Resource != nil {
- return *m.Resource
- }
- return ""
-}
-
-func (m *RequestLog) GetHttpVersion() string {
- if m != nil && m.HttpVersion != nil {
- return *m.HttpVersion
- }
- return ""
-}
-
-func (m *RequestLog) GetStatus() int32 {
- if m != nil && m.Status != nil {
- return *m.Status
- }
- return 0
-}
-
-func (m *RequestLog) GetResponseSize() int64 {
- if m != nil && m.ResponseSize != nil {
- return *m.ResponseSize
- }
- return 0
-}
-
-func (m *RequestLog) GetReferrer() string {
- if m != nil && m.Referrer != nil {
- return *m.Referrer
- }
- return ""
-}
-
-func (m *RequestLog) GetUserAgent() string {
- if m != nil && m.UserAgent != nil {
- return *m.UserAgent
- }
- return ""
-}
-
-func (m *RequestLog) GetUrlMapEntry() string {
- if m != nil && m.UrlMapEntry != nil {
- return *m.UrlMapEntry
- }
- return ""
-}
-
-func (m *RequestLog) GetCombined() string {
- if m != nil && m.Combined != nil {
- return *m.Combined
- }
- return ""
-}
-
-func (m *RequestLog) GetApiMcycles() int64 {
- if m != nil && m.ApiMcycles != nil {
- return *m.ApiMcycles
- }
- return 0
-}
-
-func (m *RequestLog) GetHost() string {
- if m != nil && m.Host != nil {
- return *m.Host
- }
- return ""
-}
-
-func (m *RequestLog) GetCost() float64 {
- if m != nil && m.Cost != nil {
- return *m.Cost
- }
- return 0
-}
-
-func (m *RequestLog) GetTaskQueueName() string {
- if m != nil && m.TaskQueueName != nil {
- return *m.TaskQueueName
- }
- return ""
-}
-
-func (m *RequestLog) GetTaskName() string {
- if m != nil && m.TaskName != nil {
- return *m.TaskName
- }
- return ""
-}
-
-func (m *RequestLog) GetWasLoadingRequest() bool {
- if m != nil && m.WasLoadingRequest != nil {
- return *m.WasLoadingRequest
- }
- return false
-}
-
-func (m *RequestLog) GetPendingTime() int64 {
- if m != nil && m.PendingTime != nil {
- return *m.PendingTime
- }
- return 0
-}
-
-func (m *RequestLog) GetReplicaIndex() int32 {
- if m != nil && m.ReplicaIndex != nil {
- return *m.ReplicaIndex
- }
- return Default_RequestLog_ReplicaIndex
-}
-
-func (m *RequestLog) GetFinished() bool {
- if m != nil && m.Finished != nil {
- return *m.Finished
- }
- return Default_RequestLog_Finished
-}
-
-func (m *RequestLog) GetCloneKey() []byte {
- if m != nil {
- return m.CloneKey
- }
- return nil
-}
-
-func (m *RequestLog) GetLine() []*LogLine {
- if m != nil {
- return m.Line
- }
- return nil
-}
-
-func (m *RequestLog) GetLinesIncomplete() bool {
- if m != nil && m.LinesIncomplete != nil {
- return *m.LinesIncomplete
- }
- return false
-}
-
-func (m *RequestLog) GetAppEngineRelease() []byte {
- if m != nil {
- return m.AppEngineRelease
- }
- return nil
-}
-
-func (m *RequestLog) GetExitReason() int32 {
- if m != nil && m.ExitReason != nil {
- return *m.ExitReason
- }
- return 0
-}
-
-func (m *RequestLog) GetWasThrottledForTime() bool {
- if m != nil && m.WasThrottledForTime != nil {
- return *m.WasThrottledForTime
- }
- return false
-}
-
-func (m *RequestLog) GetWasThrottledForRequests() bool {
- if m != nil && m.WasThrottledForRequests != nil {
- return *m.WasThrottledForRequests
- }
- return false
-}
-
-func (m *RequestLog) GetThrottledTime() int64 {
- if m != nil && m.ThrottledTime != nil {
- return *m.ThrottledTime
- }
- return 0
-}
-
-func (m *RequestLog) GetServerName() []byte {
- if m != nil {
- return m.ServerName
- }
- return nil
-}
-
-type LogModuleVersion struct {
- ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"`
- VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} }
-func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) }
-func (*LogModuleVersion) ProtoMessage() {}
-func (*LogModuleVersion) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{8}
-}
-func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b)
-}
-func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic)
-}
-func (dst *LogModuleVersion) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogModuleVersion.Merge(dst, src)
-}
-func (m *LogModuleVersion) XXX_Size() int {
- return xxx_messageInfo_LogModuleVersion.Size(m)
-}
-func (m *LogModuleVersion) XXX_DiscardUnknown() {
- xxx_messageInfo_LogModuleVersion.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo
-
-const Default_LogModuleVersion_ModuleId string = "default"
-
-func (m *LogModuleVersion) GetModuleId() string {
- if m != nil && m.ModuleId != nil {
- return *m.ModuleId
- }
- return Default_LogModuleVersion_ModuleId
-}
-
-func (m *LogModuleVersion) GetVersionId() string {
- if m != nil && m.VersionId != nil {
- return *m.VersionId
- }
- return ""
-}
-
-type LogReadRequest struct {
- AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
- VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"`
- ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"`
- StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
- EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
- Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"`
- RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"`
- MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"`
- IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"`
- Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"`
- CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"`
- HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"`
- ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"`
- IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"`
- AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"`
- IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"`
- IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"`
- CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"`
- NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogReadRequest) Reset() { *m = LogReadRequest{} }
-func (m *LogReadRequest) String() string { return proto.CompactTextString(m) }
-func (*LogReadRequest) ProtoMessage() {}
-func (*LogReadRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{9}
-}
-func (m *LogReadRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogReadRequest.Unmarshal(m, b)
-}
-func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic)
-}
-func (dst *LogReadRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogReadRequest.Merge(dst, src)
-}
-func (m *LogReadRequest) XXX_Size() int {
- return xxx_messageInfo_LogReadRequest.Size(m)
-}
-func (m *LogReadRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_LogReadRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo
-
-func (m *LogReadRequest) GetAppId() string {
- if m != nil && m.AppId != nil {
- return *m.AppId
- }
- return ""
-}
-
-func (m *LogReadRequest) GetVersionId() []string {
- if m != nil {
- return m.VersionId
- }
- return nil
-}
-
-func (m *LogReadRequest) GetModuleVersion() []*LogModuleVersion {
- if m != nil {
- return m.ModuleVersion
- }
- return nil
-}
-
-func (m *LogReadRequest) GetStartTime() int64 {
- if m != nil && m.StartTime != nil {
- return *m.StartTime
- }
- return 0
-}
-
-func (m *LogReadRequest) GetEndTime() int64 {
- if m != nil && m.EndTime != nil {
- return *m.EndTime
- }
- return 0
-}
-
-func (m *LogReadRequest) GetOffset() *LogOffset {
- if m != nil {
- return m.Offset
- }
- return nil
-}
-
-func (m *LogReadRequest) GetRequestId() [][]byte {
- if m != nil {
- return m.RequestId
- }
- return nil
-}
-
-func (m *LogReadRequest) GetMinimumLogLevel() int32 {
- if m != nil && m.MinimumLogLevel != nil {
- return *m.MinimumLogLevel
- }
- return 0
-}
-
-func (m *LogReadRequest) GetIncludeIncomplete() bool {
- if m != nil && m.IncludeIncomplete != nil {
- return *m.IncludeIncomplete
- }
- return false
-}
-
-func (m *LogReadRequest) GetCount() int64 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-func (m *LogReadRequest) GetCombinedLogRegex() string {
- if m != nil && m.CombinedLogRegex != nil {
- return *m.CombinedLogRegex
- }
- return ""
-}
-
-func (m *LogReadRequest) GetHostRegex() string {
- if m != nil && m.HostRegex != nil {
- return *m.HostRegex
- }
- return ""
-}
-
-func (m *LogReadRequest) GetReplicaIndex() int32 {
- if m != nil && m.ReplicaIndex != nil {
- return *m.ReplicaIndex
- }
- return 0
-}
-
-func (m *LogReadRequest) GetIncludeAppLogs() bool {
- if m != nil && m.IncludeAppLogs != nil {
- return *m.IncludeAppLogs
- }
- return false
-}
-
-func (m *LogReadRequest) GetAppLogsPerRequest() int32 {
- if m != nil && m.AppLogsPerRequest != nil {
- return *m.AppLogsPerRequest
- }
- return 0
-}
-
-func (m *LogReadRequest) GetIncludeHost() bool {
- if m != nil && m.IncludeHost != nil {
- return *m.IncludeHost
- }
- return false
-}
-
-func (m *LogReadRequest) GetIncludeAll() bool {
- if m != nil && m.IncludeAll != nil {
- return *m.IncludeAll
- }
- return false
-}
-
-func (m *LogReadRequest) GetCacheIterator() bool {
- if m != nil && m.CacheIterator != nil {
- return *m.CacheIterator
- }
- return false
-}
-
-func (m *LogReadRequest) GetNumShards() int32 {
- if m != nil && m.NumShards != nil {
- return *m.NumShards
- }
- return 0
-}
-
-type LogReadResponse struct {
- Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"`
- Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"`
- LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogReadResponse) Reset() { *m = LogReadResponse{} }
-func (m *LogReadResponse) String() string { return proto.CompactTextString(m) }
-func (*LogReadResponse) ProtoMessage() {}
-func (*LogReadResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{10}
-}
-func (m *LogReadResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogReadResponse.Unmarshal(m, b)
-}
-func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic)
-}
-func (dst *LogReadResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogReadResponse.Merge(dst, src)
-}
-func (m *LogReadResponse) XXX_Size() int {
- return xxx_messageInfo_LogReadResponse.Size(m)
-}
-func (m *LogReadResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_LogReadResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo
-
-func (m *LogReadResponse) GetLog() []*RequestLog {
- if m != nil {
- return m.Log
- }
- return nil
-}
-
-func (m *LogReadResponse) GetOffset() *LogOffset {
- if m != nil {
- return m.Offset
- }
- return nil
-}
-
-func (m *LogReadResponse) GetLastEndTime() int64 {
- if m != nil && m.LastEndTime != nil {
- return *m.LastEndTime
- }
- return 0
-}
-
-type LogUsageRecord struct {
- VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"`
- StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
- EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
- Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
- TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"`
- Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} }
-func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) }
-func (*LogUsageRecord) ProtoMessage() {}
-func (*LogUsageRecord) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{11}
-}
-func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b)
-}
-func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic)
-}
-func (dst *LogUsageRecord) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogUsageRecord.Merge(dst, src)
-}
-func (m *LogUsageRecord) XXX_Size() int {
- return xxx_messageInfo_LogUsageRecord.Size(m)
-}
-func (m *LogUsageRecord) XXX_DiscardUnknown() {
- xxx_messageInfo_LogUsageRecord.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo
-
-func (m *LogUsageRecord) GetVersionId() string {
- if m != nil && m.VersionId != nil {
- return *m.VersionId
- }
- return ""
-}
-
-func (m *LogUsageRecord) GetStartTime() int32 {
- if m != nil && m.StartTime != nil {
- return *m.StartTime
- }
- return 0
-}
-
-func (m *LogUsageRecord) GetEndTime() int32 {
- if m != nil && m.EndTime != nil {
- return *m.EndTime
- }
- return 0
-}
-
-func (m *LogUsageRecord) GetCount() int64 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-func (m *LogUsageRecord) GetTotalSize() int64 {
- if m != nil && m.TotalSize != nil {
- return *m.TotalSize
- }
- return 0
-}
-
-func (m *LogUsageRecord) GetRecords() int32 {
- if m != nil && m.Records != nil {
- return *m.Records
- }
- return 0
-}
-
-type LogUsageRequest struct {
- AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
- VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"`
- StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
- EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
- ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"`
- CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"`
- UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"`
- VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} }
-func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) }
-func (*LogUsageRequest) ProtoMessage() {}
-func (*LogUsageRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{12}
-}
-func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b)
-}
-func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic)
-}
-func (dst *LogUsageRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogUsageRequest.Merge(dst, src)
-}
-func (m *LogUsageRequest) XXX_Size() int {
- return xxx_messageInfo_LogUsageRequest.Size(m)
-}
-func (m *LogUsageRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_LogUsageRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo
-
-const Default_LogUsageRequest_ResolutionHours uint32 = 1
-
-func (m *LogUsageRequest) GetAppId() string {
- if m != nil && m.AppId != nil {
- return *m.AppId
- }
- return ""
-}
-
-func (m *LogUsageRequest) GetVersionId() []string {
- if m != nil {
- return m.VersionId
- }
- return nil
-}
-
-func (m *LogUsageRequest) GetStartTime() int32 {
- if m != nil && m.StartTime != nil {
- return *m.StartTime
- }
- return 0
-}
-
-func (m *LogUsageRequest) GetEndTime() int32 {
- if m != nil && m.EndTime != nil {
- return *m.EndTime
- }
- return 0
-}
-
-func (m *LogUsageRequest) GetResolutionHours() uint32 {
- if m != nil && m.ResolutionHours != nil {
- return *m.ResolutionHours
- }
- return Default_LogUsageRequest_ResolutionHours
-}
-
-func (m *LogUsageRequest) GetCombineVersions() bool {
- if m != nil && m.CombineVersions != nil {
- return *m.CombineVersions
- }
- return false
-}
-
-func (m *LogUsageRequest) GetUsageVersion() int32 {
- if m != nil && m.UsageVersion != nil {
- return *m.UsageVersion
- }
- return 0
-}
-
-func (m *LogUsageRequest) GetVersionsOnly() bool {
- if m != nil && m.VersionsOnly != nil {
- return *m.VersionsOnly
- }
- return false
-}
-
-type LogUsageResponse struct {
- Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"`
- Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} }
-func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) }
-func (*LogUsageResponse) ProtoMessage() {}
-func (*LogUsageResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_log_service_f054fd4b5012319d, []int{13}
-}
-func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b)
-}
-func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic)
-}
-func (dst *LogUsageResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LogUsageResponse.Merge(dst, src)
-}
-func (m *LogUsageResponse) XXX_Size() int {
- return xxx_messageInfo_LogUsageResponse.Size(m)
-}
-func (m *LogUsageResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_LogUsageResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo
-
-func (m *LogUsageResponse) GetUsage() []*LogUsageRecord {
- if m != nil {
- return m.Usage
- }
- return nil
-}
-
-func (m *LogUsageResponse) GetSummary() *LogUsageRecord {
- if m != nil {
- return m.Summary
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError")
- proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine")
- proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup")
- proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest")
- proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest")
- proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset")
- proto.RegisterType((*LogLine)(nil), "appengine.LogLine")
- proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog")
- proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion")
- proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest")
- proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse")
- proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord")
- proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest")
- proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse")
-}
-
-func init() {
- proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d)
-}
-
-var fileDescriptor_log_service_f054fd4b5012319d = []byte{
- // 1553 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6,
- 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e,
- 0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40,
- 0x72, 0x3a, 0xd3, 0x1b, 0x0c, 0x0a, 0x1c, 0x81, 0x18, 0x2f, 0xb1, 0xc8, 0xee, 0xc2, 0x91, 0x72,
- 0xdb, 0xdb, 0x3e, 0x46, 0x1f, 0xa2, 0xaf, 0xd2, 0xb7, 0xe9, 0xec, 0xd9, 0x05, 0x44, 0x2a, 0x4d,
- 0xc6, 0x33, 0xb9, 0xe0, 0x10, 0xfb, 0x9d, 0x83, 0xdd, 0xf3, 0xf3, 0x9d, 0x6f, 0x01, 0xc7, 0xb9,
- 0x94, 0xb9, 0xc0, 0xc3, 0x5c, 0x8a, 0xa4, 0xcc, 0x0f, 0xa5, 0xca, 0x8f, 0x92, 0xaa, 0xc2, 0x32,
- 0x2f, 0x4a, 0x3c, 0x2a, 0x4a, 0x83, 0xaa, 0x4c, 0xc4, 0x91, 0x90, 0xb9, 0xfd, 0xc5, 0x1a, 0xd5,
- 0xbb, 0x22, 0xc5, 0xc3, 0x4a, 0x49, 0x23, 0xd9, 0xb0, 0xf5, 0x0c, 0x5f, 0xc3, 0x74, 0x29, 0xf3,
- 0x73, 0x67, 0x3e, 0x51, 0x4a, 0xaa, 0xf0, 0x4b, 0x18, 0xd2, 0xc3, 0x9f, 0x65, 0x86, 0x6c, 0x17,
- 0x3a, 0x67, 0xdf, 0xce, 0x7e, 0xc7, 0xee, 0xc0, 0xf4, 0xf4, 0xf5, 0xf7, 0x2f, 0x96, 0xa7, 0x7f,
- 0x89, 0xa3, 0x93, 0xef, 0xde, 0x9c, 0x9c, 0x5f, 0xcc, 0x02, 0xb6, 0x0f, 0x93, 0xf3, 0x8b, 0xb3,
- 0xe8, 0xc5, 0xcb, 0x93, 0xf8, 0x24, 0x8a, 0xce, 0xa2, 0x59, 0x27, 0xcc, 0x61, 0xef, 0x8d, 0x46,
- 0xf5, 0xa2, 0xaa, 0x96, 0x32, 0x5f, 0x16, 0x25, 0xb2, 0x8f, 0x60, 0xcf, 0x14, 0x6b, 0xd4, 0x26,
- 0x59, 0x57, 0x71, 0xad, 0x31, 0xe5, 0xc1, 0xbc, 0xb3, 0xe8, 0x46, 0x93, 0x16, 0x7d, 0xa3, 0x31,
- 0x65, 0x07, 0xd0, 0x13, 0xf8, 0x0e, 0x05, 0xef, 0x90, 0xd5, 0x2d, 0x18, 0x87, 0xfe, 0x1a, 0xb5,
- 0x4e, 0x72, 0xe4, 0xdd, 0x79, 0x67, 0x31, 0x8c, 0x9a, 0x65, 0xf8, 0x12, 0xa6, 0x37, 0x07, 0xbd,
- 0x54, 0xb2, 0xae, 0xd8, 0x9f, 0x60, 0x60, 0x73, 0x15, 0x45, 0x89, 0xbc, 0x33, 0xef, 0x2e, 0x46,
- 0x9f, 0xdf, 0x3f, 0x6c, 0x33, 0x3d, 0xdc, 0x0e, 0x2b, 0xea, 0x0b, 0xf7, 0x10, 0x86, 0x30, 0xfe,
- 0x5a, 0xd4, 0x7a, 0x15, 0xe1, 0x0f, 0x35, 0x6a, 0xc3, 0x18, 0xec, 0x08, 0x99, 0x6b, 0x1e, 0xcc,
- 0x83, 0xc5, 0x38, 0xa2, 0xe7, 0xf0, 0x39, 0xcc, 0xce, 0xd1, 0x9c, 0x9b, 0xc4, 0xd4, 0xba, 0xf1,
- 0xbb, 0x07, 0xbb, 0x9a, 0x00, 0xca, 0x67, 0x18, 0xf9, 0x55, 0xf8, 0x1c, 0x86, 0x4b, 0x99, 0x9f,
- 0x5d, 0x5e, 0x6a, 0x34, 0xec, 0x11, 0x80, 0x72, 0xfe, 0x71, 0x91, 0xf9, 0x2d, 0x87, 0x1e, 0x39,
- 0xcd, 0xc2, 0x0b, 0xe8, 0x37, 0x65, 0x62, 0xb0, 0x63, 0x0b, 0xe2, 0x8b, 0x43, 0xcf, 0xdb, 0x35,
- 0xe9, 0x35, 0x35, 0x79, 0x0c, 0x23, 0x9b, 0xe6, 0x76, 0x5d, 0x40, 0xc8, 0xfc, 0x95, 0x2f, 0xcd,
- 0x3f, 0x01, 0xc0, 0x47, 0xb9, 0x94, 0x39, 0xbb, 0x0b, 0xbb, 0x49, 0x55, 0xb9, 0xf3, 0xad, 0x6b,
- 0x2f, 0xa9, 0xaa, 0xd3, 0x8c, 0x7d, 0x08, 0xc3, 0xb5, 0xcc, 0x6a, 0x81, 0xd6, 0xf2, 0xd1, 0x3c,
- 0x58, 0x0c, 0x8f, 0xfb, 0x19, 0x5e, 0x26, 0xb5, 0x30, 0xd1, 0xc0, 0x59, 0x4e, 0x33, 0x9b, 0xc0,
- 0x3b, 0x54, 0xba, 0x90, 0xa5, 0x75, 0xeb, 0xd0, 0x06, 0x43, 0x8f, 0x38, 0xf3, 0x46, 0x7e, 0x36,
- 0x94, 0xcd, 0xfc, 0xd8, 0x27, 0xb0, 0x2b, 0xa9, 0x10, 0xfc, 0xe9, 0x3c, 0x58, 0x8c, 0x3e, 0x3f,
- 0xd8, 0xe8, 0x47, 0x5b, 0xa4, 0xc8, 0xfb, 0xb0, 0x3d, 0xe8, 0x14, 0x15, 0xdf, 0xa1, 0x33, 0x3a,
- 0x45, 0xc5, 0x1e, 0xc0, 0xa0, 0x2c, 0xd2, 0xb7, 0x65, 0xb2, 0x46, 0xde, 0xb3, 0x01, 0x46, 0xed,
- 0xda, 0x1e, 0xac, 0x4d, 0xa2, 0x4c, 0x4c, 0x45, 0xdb, 0xa5, 0xa2, 0x0d, 0x09, 0xb9, 0xb0, 0x95,
- 0xbb, 0x0f, 0x03, 0x2c, 0x33, 0x67, 0xec, 0x93, 0xb1, 0x8f, 0x65, 0x46, 0x26, 0x0e, 0x7d, 0x91,
- 0x18, 0x2c, 0xd3, 0x6b, 0x3e, 0x70, 0x16, 0xbf, 0x24, 0xb2, 0xa5, 0xd7, 0xa9, 0x40, 0xcd, 0x87,
- 0xce, 0xe2, 0x97, 0xb6, 0xd7, 0x6b, 0x34, 0x2b, 0x99, 0x71, 0x70, 0xbd, 0x76, 0x2b, 0x1b, 0xa1,
- 0x42, 0x2d, 0x6b, 0x95, 0x22, 0x1f, 0x91, 0xa5, 0x5d, 0xb3, 0x27, 0x30, 0x5e, 0x19, 0x53, 0xc5,
- 0xbe, 0x58, 0x7c, 0x4c, 0xf6, 0x91, 0xc5, 0xbe, 0x77, 0xd0, 0x06, 0x85, 0x26, 0xd4, 0x60, 0xbf,
- 0x62, 0x4f, 0x61, 0xa2, 0x50, 0x57, 0xb2, 0xd4, 0x18, 0xeb, 0xe2, 0x27, 0xe4, 0x7b, 0x14, 0xce,
- 0xb8, 0x01, 0xcf, 0x8b, 0x9f, 0xd0, 0x9d, 0x7d, 0x89, 0x4a, 0xa1, 0xe2, 0x53, 0x57, 0x9d, 0x66,
- 0x6d, 0xab, 0x53, 0x6b, 0x54, 0x71, 0x92, 0x63, 0x69, 0xf8, 0x8c, 0xac, 0x43, 0x8b, 0xbc, 0xb0,
- 0x00, 0x0b, 0x61, 0x52, 0x2b, 0x11, 0xaf, 0x93, 0x2a, 0xc6, 0xd2, 0xa8, 0x6b, 0xbe, 0xef, 0x62,
- 0xab, 0x95, 0x78, 0x95, 0x54, 0x27, 0x16, 0xb2, 0xdb, 0xa7, 0x72, 0xfd, 0x8f, 0xa2, 0xc4, 0x8c,
- 0x33, 0x97, 0x5a, 0xb3, 0xb6, 0x0c, 0x4c, 0xaa, 0x22, 0x6e, 0x8a, 0x75, 0x67, 0x1e, 0x2c, 0xba,
- 0x11, 0x24, 0x55, 0xf1, 0xca, 0xd7, 0x8b, 0xc1, 0xce, 0x4a, 0x6a, 0xc3, 0x0f, 0xe8, 0x64, 0x7a,
- 0xb6, 0x58, 0x6a, 0xb1, 0xbb, 0xf3, 0x60, 0x11, 0x44, 0xf4, 0xcc, 0x9e, 0xc1, 0xd4, 0x24, 0xfa,
- 0x6d, 0xfc, 0x43, 0x8d, 0x35, 0xc6, 0xd4, 0xe8, 0x7b, 0xf4, 0xca, 0xc4, 0xc2, 0xdf, 0x59, 0xf4,
- 0xb5, 0xed, 0xf6, 0x43, 0x18, 0x92, 0x1f, 0x79, 0x7c, 0xe0, 0x92, 0xb5, 0x00, 0x19, 0x0f, 0xe1,
- 0xce, 0x8f, 0x89, 0x8e, 0x85, 0x4c, 0xb2, 0xa2, 0xcc, 0x63, 0xcf, 0x3e, 0xce, 0xe7, 0xc1, 0x62,
- 0x10, 0xed, 0xff, 0x98, 0xe8, 0xa5, 0xb3, 0x34, 0x83, 0xfb, 0x04, 0xc6, 0x15, 0x96, 0xe4, 0x4b,
- 0xfc, 0xb8, 0x4f, 0xe1, 0x8f, 0x3c, 0x46, 0x1c, 0xf9, 0xd8, 0x36, 0xa0, 0x12, 0x45, 0x9a, 0xc4,
- 0x45, 0x99, 0xe1, 0x15, 0x7f, 0x30, 0x0f, 0x16, 0xbd, 0xe3, 0xce, 0xa7, 0x9f, 0xd9, 0x26, 0x90,
- 0xe1, 0xd4, 0xe2, 0x6c, 0x0e, 0x83, 0xcb, 0xa2, 0x2c, 0xf4, 0x0a, 0x33, 0xfe, 0xd0, 0x1e, 0x78,
- 0xbc, 0x63, 0x54, 0x8d, 0x51, 0x8b, 0xda, 0xd0, 0x53, 0x21, 0x4b, 0x8c, 0xdf, 0xe2, 0x35, 0xff,
- 0x3d, 0x09, 0xc0, 0x80, 0x80, 0x6f, 0xf1, 0x9a, 0x3d, 0x83, 0x1d, 0x52, 0xab, 0x47, 0xa4, 0x56,
- 0x6c, 0x7b, 0x3a, 0x48, 0xa6, 0xc8, 0xce, 0xfe, 0x08, 0x33, 0xfb, 0xaf, 0xe3, 0xa2, 0x4c, 0xe5,
- 0xba, 0x12, 0x68, 0x90, 0x7f, 0x48, 0xf9, 0x4d, 0x09, 0x3f, 0x6d, 0x61, 0xf6, 0x09, 0x30, 0x3b,
- 0xed, 0x6e, 0x9b, 0x58, 0xa1, 0xc0, 0x44, 0x23, 0x7f, 0x46, 0x07, 0xcf, 0x92, 0xaa, 0x3a, 0x21,
- 0x43, 0xe4, 0x70, 0xdb, 0x49, 0xbc, 0x2a, 0x4c, 0xac, 0x30, 0xd1, 0xb2, 0xe4, 0x7f, 0xb0, 0x69,
- 0x46, 0x60, 0xa1, 0x88, 0x10, 0xf6, 0x05, 0xdc, 0xb3, 0xc5, 0x35, 0x2b, 0x25, 0x8d, 0x11, 0x98,
- 0xc5, 0x97, 0x52, 0xb9, 0xb2, 0x3d, 0xa6, 0xf3, 0x6d, 0xe9, 0x2f, 0x1a, 0xe3, 0xd7, 0x52, 0x51,
- 0xf9, 0xbe, 0x84, 0x07, 0x3f, 0x7f, 0xc9, 0xf7, 0x45, 0xf3, 0x39, 0xbd, 0xf8, 0xc1, 0xad, 0x17,
- 0x7d, 0x77, 0x34, 0xdd, 0x17, 0xed, 0x8b, 0x74, 0xd2, 0x13, 0x6a, 0xd0, 0xa4, 0x45, 0xe9, 0x8c,
- 0xc7, 0x30, 0xb2, 0x97, 0x1a, 0x2a, 0x47, 0x8a, 0x90, 0x12, 0x04, 0x07, 0x59, 0x5a, 0x84, 0x7f,
- 0x83, 0xd9, 0x52, 0xe6, 0xaf, 0x48, 0xc8, 0x9a, 0x81, 0xdb, 0xd2, 0xbc, 0xe0, 0x7d, 0x35, 0x2f,
- 0xd8, 0xd2, 0xbc, 0xf0, 0xbf, 0x3d, 0xd8, 0x5b, 0xca, 0x3c, 0xc2, 0x24, 0x6b, 0x28, 0xf5, 0x0b,
- 0x12, 0x7b, 0x7b, 0xa3, 0xee, 0xb6, 0x78, 0x7e, 0x05, 0x7b, 0x3e, 0x9a, 0x46, 0x23, 0xee, 0x10,
- 0x0f, 0x1e, 0x6e, 0xf3, 0x60, 0x2b, 0x85, 0x68, 0xb2, 0xde, 0xca, 0x68, 0x5b, 0x07, 0xbb, 0x54,
- 0xa9, 0x5f, 0xd0, 0xc1, 0x1d, 0x32, 0xb6, 0x3a, 0x78, 0xa3, 0xcd, 0xbd, 0xf7, 0xd0, 0xe6, 0x6d,
- 0xa1, 0xdf, 0x9d, 0x77, 0xb7, 0x85, 0xfe, 0x39, 0xec, 0xaf, 0x8b, 0xb2, 0x58, 0xd7, 0xeb, 0x98,
- 0xae, 0x60, 0xba, 0xb5, 0xfa, 0xc4, 0xa6, 0xa9, 0x37, 0x58, 0x46, 0xd3, 0xfd, 0xf5, 0x29, 0xb0,
- 0xa2, 0x4c, 0x45, 0x9d, 0xe1, 0x26, 0x9d, 0x07, 0x6e, 0x5c, 0xbd, 0x65, 0x83, 0xd0, 0x07, 0xd0,
- 0x4b, 0x65, 0x5d, 0x1a, 0x3e, 0xa4, 0xf8, 0xdd, 0xc2, 0xd2, 0xbc, 0x91, 0x23, 0x3a, 0x51, 0x61,
- 0x8e, 0x57, 0x7c, 0x8f, 0x7a, 0x35, 0x6b, 0x2c, 0xd4, 0xa5, 0x1c, 0xaf, 0x6c, 0xf4, 0x56, 0x83,
- 0xbc, 0x97, 0x53, 0xcb, 0xa1, 0x45, 0x9c, 0xf9, 0xe9, 0xed, 0x71, 0x9f, 0x51, 0xe4, 0xdb, 0xa3,
- 0xbe, 0x80, 0x59, 0x13, 0xb6, 0xed, 0x35, 0x7d, 0x23, 0x00, 0x05, 0xbd, 0xe7, 0x71, 0xf7, 0x75,
- 0xa1, 0xd9, 0x11, 0x1c, 0x34, 0x1e, 0x71, 0x85, 0x2d, 0xf3, 0xf9, 0x3e, 0xed, 0xba, 0x9f, 0x38,
- 0xb7, 0xbf, 0xa2, 0xda, 0x50, 0xa4, 0x66, 0x6b, 0x92, 0xcd, 0x11, 0x6d, 0x3b, 0xf2, 0xd8, 0x37,
- 0x56, 0x29, 0x1f, 0xc3, 0xa8, 0x3d, 0x5d, 0x08, 0x3e, 0x26, 0x0f, 0x68, 0x0e, 0x16, 0xc2, 0x8e,
- 0x4d, 0x9a, 0xa4, 0x2b, 0x8c, 0x0b, 0x83, 0x2a, 0x31, 0x52, 0xf1, 0x09, 0xf9, 0x4c, 0x08, 0x3d,
- 0xf5, 0xa0, 0xad, 0x44, 0x59, 0xaf, 0x63, 0xbd, 0x4a, 0x54, 0xa6, 0x39, 0xa3, 0x88, 0x86, 0x65,
- 0xbd, 0x3e, 0x27, 0x20, 0xfc, 0x57, 0x40, 0xdf, 0x83, 0x8e, 0xdb, 0xee, 0xb2, 0x61, 0x1f, 0x43,
- 0x57, 0xc8, 0x9c, 0x07, 0xc4, 0xcd, 0xbb, 0x1b, 0x2c, 0xb9, 0xf9, 0xc6, 0x88, 0xac, 0xc7, 0x06,
- 0xa3, 0x3a, 0xef, 0xc1, 0xa8, 0x10, 0x26, 0x22, 0xd1, 0x26, 0x6e, 0xf9, 0xe9, 0xc8, 0x3b, 0xb2,
- 0xe0, 0x89, 0xe3, 0x68, 0xf8, 0x9f, 0x80, 0x46, 0xed, 0x8d, 0xfd, 0xac, 0x89, 0x30, 0x95, 0xea,
- 0xf6, 0x4c, 0x05, 0xb7, 0x86, 0xf3, 0xd6, 0x3c, 0x74, 0x5c, 0x7e, 0xff, 0x7f, 0x1e, 0xba, 0x64,
- 0x6c, 0xe7, 0xa1, 0xe5, 0xd9, 0xce, 0x26, 0xcf, 0x1e, 0x01, 0x18, 0x69, 0x12, 0xe1, 0xee, 0xe1,
- 0x9e, 0x9b, 0x2f, 0x42, 0xe8, 0x12, 0xe6, 0xd0, 0x57, 0x14, 0x97, 0xe6, 0xbb, 0x6e, 0x3b, 0xbf,
- 0x0c, 0xff, 0xdd, 0xa1, 0x4a, 0xfa, 0xd0, 0x7f, 0x8b, 0x4c, 0xfc, 0x7c, 0xc4, 0x7b, 0xbf, 0x36,
- 0xe2, 0xbd, 0xcd, 0x11, 0x9f, 0xd9, 0xcf, 0x11, 0x51, 0x1b, 0xbb, 0xf7, 0x4a, 0xd6, 0x4a, 0x53,
- 0x0a, 0x93, 0xe3, 0xe0, 0xb3, 0x68, 0x7a, 0x63, 0xfa, 0xc6, 0x5a, 0xec, 0x25, 0xe3, 0x07, 0xa7,
- 0xd1, 0x23, 0x97, 0xd4, 0x20, 0x9a, 0x7a, 0xdc, 0x8b, 0x0e, 0x7d, 0xa0, 0xd4, 0x36, 0xb1, 0x56,
- 0xb8, 0xdc, 0xa8, 0x8f, 0x09, 0x6c, 0xa4, 0xe9, 0x29, 0x4c, 0x9a, 0x7d, 0x62, 0x59, 0x8a, 0x6b,
- 0x3f, 0xe2, 0xe3, 0x06, 0x3c, 0x2b, 0xc5, 0x75, 0x78, 0x45, 0x2a, 0xed, 0xab, 0xe4, 0x09, 0x77,
- 0x04, 0x3d, 0xda, 0xc8, 0x53, 0xee, 0xfe, 0x36, 0x8d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05,
- 0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd,
- 0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00,
- 0x00,
-}
diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.proto b/vendor/google.golang.org/appengine/internal/log/log_service.proto
deleted file mode 100644
index 8981dc47..00000000
--- a/vendor/google.golang.org/appengine/internal/log/log_service.proto
+++ /dev/null
@@ -1,150 +0,0 @@
-syntax = "proto2";
-option go_package = "log";
-
-package appengine;
-
-message LogServiceError {
- enum ErrorCode {
- OK = 0;
- INVALID_REQUEST = 1;
- STORAGE_ERROR = 2;
- }
-}
-
-message UserAppLogLine {
- required int64 timestamp_usec = 1;
- required int64 level = 2;
- required string message = 3;
-}
-
-message UserAppLogGroup {
- repeated UserAppLogLine log_line = 2;
-}
-
-message FlushRequest {
- optional bytes logs = 1;
-}
-
-message SetStatusRequest {
- required string status = 1;
-}
-
-
-message LogOffset {
- optional bytes request_id = 1;
-}
-
-message LogLine {
- required int64 time = 1;
- required int32 level = 2;
- required string log_message = 3;
-}
-
-message RequestLog {
- required string app_id = 1;
- optional string module_id = 37 [default="default"];
- required string version_id = 2;
- required bytes request_id = 3;
- optional LogOffset offset = 35;
- required string ip = 4;
- optional string nickname = 5;
- required int64 start_time = 6;
- required int64 end_time = 7;
- required int64 latency = 8;
- required int64 mcycles = 9;
- required string method = 10;
- required string resource = 11;
- required string http_version = 12;
- required int32 status = 13;
- required int64 response_size = 14;
- optional string referrer = 15;
- optional string user_agent = 16;
- required string url_map_entry = 17;
- required string combined = 18;
- optional int64 api_mcycles = 19;
- optional string host = 20;
- optional double cost = 21;
-
- optional string task_queue_name = 22;
- optional string task_name = 23;
-
- optional bool was_loading_request = 24;
- optional int64 pending_time = 25;
- optional int32 replica_index = 26 [default = -1];
- optional bool finished = 27 [default = true];
- optional bytes clone_key = 28;
-
- repeated LogLine line = 29;
-
- optional bool lines_incomplete = 36;
- optional bytes app_engine_release = 38;
-
- optional int32 exit_reason = 30;
- optional bool was_throttled_for_time = 31;
- optional bool was_throttled_for_requests = 32;
- optional int64 throttled_time = 33;
-
- optional bytes server_name = 34;
-}
-
-message LogModuleVersion {
- optional string module_id = 1 [default="default"];
- optional string version_id = 2;
-}
-
-message LogReadRequest {
- required string app_id = 1;
- repeated string version_id = 2;
- repeated LogModuleVersion module_version = 19;
-
- optional int64 start_time = 3;
- optional int64 end_time = 4;
- optional LogOffset offset = 5;
- repeated bytes request_id = 6;
-
- optional int32 minimum_log_level = 7;
- optional bool include_incomplete = 8;
- optional int64 count = 9;
-
- optional string combined_log_regex = 14;
- optional string host_regex = 15;
- optional int32 replica_index = 16;
-
- optional bool include_app_logs = 10;
- optional int32 app_logs_per_request = 17;
- optional bool include_host = 11;
- optional bool include_all = 12;
- optional bool cache_iterator = 13;
- optional int32 num_shards = 18;
-}
-
-message LogReadResponse {
- repeated RequestLog log = 1;
- optional LogOffset offset = 2;
- optional int64 last_end_time = 3;
-}
-
-message LogUsageRecord {
- optional string version_id = 1;
- optional int32 start_time = 2;
- optional int32 end_time = 3;
- optional int64 count = 4;
- optional int64 total_size = 5;
- optional int32 records = 6;
-}
-
-message LogUsageRequest {
- required string app_id = 1;
- repeated string version_id = 2;
- optional int32 start_time = 3;
- optional int32 end_time = 4;
- optional uint32 resolution_hours = 5 [default = 1];
- optional bool combine_versions = 6;
- optional int32 usage_version = 7;
- optional bool versions_only = 8;
-}
-
-message LogUsageResponse {
- repeated LogUsageRecord usage = 1;
- optional LogUsageRecord summary = 2;
-}
diff --git a/vendor/google.golang.org/appengine/internal/main.go b/vendor/google.golang.org/appengine/internal/main.go
deleted file mode 100644
index 1e765312..00000000
--- a/vendor/google.golang.org/appengine/internal/main.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build appengine
-
-package internal
-
-import (
- "appengine_internal"
-)
-
-func Main() {
- MainPath = ""
- appengine_internal.Main()
-}
diff --git a/vendor/google.golang.org/appengine/internal/main_common.go b/vendor/google.golang.org/appengine/internal/main_common.go
deleted file mode 100644
index 357dce4d..00000000
--- a/vendor/google.golang.org/appengine/internal/main_common.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package internal
-
-// MainPath stores the file path of the main package. On App Engine Standard
-// using Go version 1.9 and below, this will be unset. On App Engine Flex and
-// App Engine Standard second-gen (Go 1.11 and above), this will be the
-// filepath to package main.
-var MainPath string
diff --git a/vendor/google.golang.org/appengine/internal/main_vm.go b/vendor/google.golang.org/appengine/internal/main_vm.go
deleted file mode 100644
index ddb79a33..00000000
--- a/vendor/google.golang.org/appengine/internal/main_vm.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// +build !appengine
-
-package internal
-
-import (
- "io"
- "log"
- "net/http"
- "net/url"
- "os"
- "path/filepath"
- "runtime"
-)
-
-func Main() {
- MainPath = filepath.Dir(findMainPath())
- installHealthChecker(http.DefaultServeMux)
-
- port := "8080"
- if s := os.Getenv("PORT"); s != "" {
- port = s
- }
-
- host := ""
- if IsDevAppServer() {
- host = "127.0.0.1"
- }
- if err := http.ListenAndServe(host+":"+port, http.HandlerFunc(handleHTTP)); err != nil {
- log.Fatalf("http.ListenAndServe: %v", err)
- }
-}
-
-// Find the path to package main by looking at the root Caller.
-func findMainPath() string {
- pc := make([]uintptr, 100)
- n := runtime.Callers(2, pc)
- frames := runtime.CallersFrames(pc[:n])
- for {
- frame, more := frames.Next()
- // Tests won't have package main, instead they have testing.tRunner
- if frame.Function == "main.main" || frame.Function == "testing.tRunner" {
- return frame.File
- }
- if !more {
- break
- }
- }
- return ""
-}
-
-func installHealthChecker(mux *http.ServeMux) {
- // If no health check handler has been installed by this point, add a trivial one.
- const healthPath = "/_ah/health"
- hreq := &http.Request{
- Method: "GET",
- URL: &url.URL{
- Path: healthPath,
- },
- }
- if _, pat := mux.Handler(hreq); pat != healthPath {
- mux.HandleFunc(healthPath, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, "ok")
- })
- }
-}
diff --git a/vendor/google.golang.org/appengine/internal/metadata.go b/vendor/google.golang.org/appengine/internal/metadata.go
deleted file mode 100644
index c4ba63bb..00000000
--- a/vendor/google.golang.org/appengine/internal/metadata.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package internal
-
-// This file has code for accessing metadata.
-//
-// References:
-// https://cloud.google.com/compute/docs/metadata
-
-import (
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
-)
-
-const (
- metadataHost = "metadata"
- metadataPath = "/computeMetadata/v1/"
-)
-
-var (
- metadataRequestHeaders = http.Header{
- "Metadata-Flavor": []string{"Google"},
- }
-)
-
-// TODO(dsymonds): Do we need to support default values, like Python?
-func mustGetMetadata(key string) []byte {
- b, err := getMetadata(key)
- if err != nil {
- panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err))
- }
- return b
-}
-
-func getMetadata(key string) ([]byte, error) {
- // TODO(dsymonds): May need to use url.Parse to support keys with query args.
- req := &http.Request{
- Method: "GET",
- URL: &url.URL{
- Scheme: "http",
- Host: metadataHost,
- Path: metadataPath + key,
- },
- Header: metadataRequestHeaders,
- Host: metadataHost,
- }
- resp, err := http.DefaultClient.Do(req)
- if err != nil {
- return nil, err
- }
- defer resp.Body.Close()
- if resp.StatusCode != 200 {
- return nil, fmt.Errorf("metadata server returned HTTP %d", resp.StatusCode)
- }
- return ioutil.ReadAll(resp.Body)
-}
diff --git a/vendor/google.golang.org/appengine/internal/net.go b/vendor/google.golang.org/appengine/internal/net.go
deleted file mode 100644
index 3b94cf0c..00000000
--- a/vendor/google.golang.org/appengine/internal/net.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package internal
-
-// This file implements a network dialer that limits the number of concurrent connections.
-// It is only used for API calls.
-
-import (
- "log"
- "net"
- "runtime"
- "sync"
- "time"
-)
-
-var limitSem = make(chan int, 100) // TODO(dsymonds): Use environment variable.
-
-func limitRelease() {
- // non-blocking
- select {
- case <-limitSem:
- default:
- // This should not normally happen.
- log.Print("appengine: unbalanced limitSem release!")
- }
-}
-
-func limitDial(network, addr string) (net.Conn, error) {
- limitSem <- 1
-
- // Dial with a timeout in case the API host is MIA.
- // The connection should normally be very fast.
- conn, err := net.DialTimeout(network, addr, 500*time.Millisecond)
- if err != nil {
- limitRelease()
- return nil, err
- }
- lc := &limitConn{Conn: conn}
- runtime.SetFinalizer(lc, (*limitConn).Close) // shouldn't usually be required
- return lc, nil
-}
-
-type limitConn struct {
- close sync.Once
- net.Conn
-}
-
-func (lc *limitConn) Close() error {
- defer lc.close.Do(func() {
- limitRelease()
- runtime.SetFinalizer(lc, nil)
- })
- return lc.Conn.Close()
-}
diff --git a/vendor/google.golang.org/appengine/internal/regen.sh b/vendor/google.golang.org/appengine/internal/regen.sh
deleted file mode 100644
index 2fdb546a..00000000
--- a/vendor/google.golang.org/appengine/internal/regen.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash -e
-#
-# This script rebuilds the generated code for the protocol buffers.
-# To run this you will need protoc and goprotobuf installed;
-# see https://github.com/golang/protobuf for instructions.
-
-PKG=google.golang.org/appengine
-
-function die() {
- echo 1>&2 $*
- exit 1
-}
-
-# Sanity check that the right tools are accessible.
-for tool in go protoc protoc-gen-go; do
- q=$(which $tool) || die "didn't find $tool"
- echo 1>&2 "$tool: $q"
-done
-
-echo -n 1>&2 "finding package dir... "
-pkgdir=$(go list -f '{{.Dir}}' $PKG)
-echo 1>&2 $pkgdir
-base=$(echo $pkgdir | sed "s,/$PKG\$,,")
-echo 1>&2 "base: $base"
-cd $base
-
-# Run protoc once per package.
-for dir in $(find $PKG/internal -name '*.proto' | xargs dirname | sort | uniq); do
- echo 1>&2 "* $dir"
- protoc --go_out=. $dir/*.proto
-done
-
-for f in $(find $PKG/internal -name '*.pb.go'); do
- # Remove proto.RegisterEnum calls.
- # These cause duplicate registration panics when these packages
- # are used on classic App Engine. proto.RegisterEnum only affects
- # parsing the text format; we don't care about that.
- # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17
- sed -i '/proto.RegisterEnum/d' $f
-done
diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
deleted file mode 100644
index 8d782a38..00000000
--- a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
+++ /dev/null
@@ -1,361 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google.golang.org/appengine/internal/remote_api/remote_api.proto
-
-package remote_api
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type RpcError_ErrorCode int32
-
-const (
- RpcError_UNKNOWN RpcError_ErrorCode = 0
- RpcError_CALL_NOT_FOUND RpcError_ErrorCode = 1
- RpcError_PARSE_ERROR RpcError_ErrorCode = 2
- RpcError_SECURITY_VIOLATION RpcError_ErrorCode = 3
- RpcError_OVER_QUOTA RpcError_ErrorCode = 4
- RpcError_REQUEST_TOO_LARGE RpcError_ErrorCode = 5
- RpcError_CAPABILITY_DISABLED RpcError_ErrorCode = 6
- RpcError_FEATURE_DISABLED RpcError_ErrorCode = 7
- RpcError_BAD_REQUEST RpcError_ErrorCode = 8
- RpcError_RESPONSE_TOO_LARGE RpcError_ErrorCode = 9
- RpcError_CANCELLED RpcError_ErrorCode = 10
- RpcError_REPLAY_ERROR RpcError_ErrorCode = 11
- RpcError_DEADLINE_EXCEEDED RpcError_ErrorCode = 12
-)
-
-var RpcError_ErrorCode_name = map[int32]string{
- 0: "UNKNOWN",
- 1: "CALL_NOT_FOUND",
- 2: "PARSE_ERROR",
- 3: "SECURITY_VIOLATION",
- 4: "OVER_QUOTA",
- 5: "REQUEST_TOO_LARGE",
- 6: "CAPABILITY_DISABLED",
- 7: "FEATURE_DISABLED",
- 8: "BAD_REQUEST",
- 9: "RESPONSE_TOO_LARGE",
- 10: "CANCELLED",
- 11: "REPLAY_ERROR",
- 12: "DEADLINE_EXCEEDED",
-}
-var RpcError_ErrorCode_value = map[string]int32{
- "UNKNOWN": 0,
- "CALL_NOT_FOUND": 1,
- "PARSE_ERROR": 2,
- "SECURITY_VIOLATION": 3,
- "OVER_QUOTA": 4,
- "REQUEST_TOO_LARGE": 5,
- "CAPABILITY_DISABLED": 6,
- "FEATURE_DISABLED": 7,
- "BAD_REQUEST": 8,
- "RESPONSE_TOO_LARGE": 9,
- "CANCELLED": 10,
- "REPLAY_ERROR": 11,
- "DEADLINE_EXCEEDED": 12,
-}
-
-func (x RpcError_ErrorCode) Enum() *RpcError_ErrorCode {
- p := new(RpcError_ErrorCode)
- *p = x
- return p
-}
-func (x RpcError_ErrorCode) String() string {
- return proto.EnumName(RpcError_ErrorCode_name, int32(x))
-}
-func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode")
- if err != nil {
- return err
- }
- *x = RpcError_ErrorCode(value)
- return nil
-}
-func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0}
-}
-
-type Request struct {
- ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"`
- Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"`
- Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"`
- RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Request) Reset() { *m = Request{} }
-func (m *Request) String() string { return proto.CompactTextString(m) }
-func (*Request) ProtoMessage() {}
-func (*Request) Descriptor() ([]byte, []int) {
- return fileDescriptor_remote_api_1978114ec33a273d, []int{0}
-}
-func (m *Request) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Request.Unmarshal(m, b)
-}
-func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Request.Marshal(b, m, deterministic)
-}
-func (dst *Request) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Request.Merge(dst, src)
-}
-func (m *Request) XXX_Size() int {
- return xxx_messageInfo_Request.Size(m)
-}
-func (m *Request) XXX_DiscardUnknown() {
- xxx_messageInfo_Request.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Request proto.InternalMessageInfo
-
-func (m *Request) GetServiceName() string {
- if m != nil && m.ServiceName != nil {
- return *m.ServiceName
- }
- return ""
-}
-
-func (m *Request) GetMethod() string {
- if m != nil && m.Method != nil {
- return *m.Method
- }
- return ""
-}
-
-func (m *Request) GetRequest() []byte {
- if m != nil {
- return m.Request
- }
- return nil
-}
-
-func (m *Request) GetRequestId() string {
- if m != nil && m.RequestId != nil {
- return *m.RequestId
- }
- return ""
-}
-
-type ApplicationError struct {
- Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"`
- Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ApplicationError) Reset() { *m = ApplicationError{} }
-func (m *ApplicationError) String() string { return proto.CompactTextString(m) }
-func (*ApplicationError) ProtoMessage() {}
-func (*ApplicationError) Descriptor() ([]byte, []int) {
- return fileDescriptor_remote_api_1978114ec33a273d, []int{1}
-}
-func (m *ApplicationError) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ApplicationError.Unmarshal(m, b)
-}
-func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic)
-}
-func (dst *ApplicationError) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ApplicationError.Merge(dst, src)
-}
-func (m *ApplicationError) XXX_Size() int {
- return xxx_messageInfo_ApplicationError.Size(m)
-}
-func (m *ApplicationError) XXX_DiscardUnknown() {
- xxx_messageInfo_ApplicationError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApplicationError proto.InternalMessageInfo
-
-func (m *ApplicationError) GetCode() int32 {
- if m != nil && m.Code != nil {
- return *m.Code
- }
- return 0
-}
-
-func (m *ApplicationError) GetDetail() string {
- if m != nil && m.Detail != nil {
- return *m.Detail
- }
- return ""
-}
-
-type RpcError struct {
- Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"`
- Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *RpcError) Reset() { *m = RpcError{} }
-func (m *RpcError) String() string { return proto.CompactTextString(m) }
-func (*RpcError) ProtoMessage() {}
-func (*RpcError) Descriptor() ([]byte, []int) {
- return fileDescriptor_remote_api_1978114ec33a273d, []int{2}
-}
-func (m *RpcError) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_RpcError.Unmarshal(m, b)
-}
-func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_RpcError.Marshal(b, m, deterministic)
-}
-func (dst *RpcError) XXX_Merge(src proto.Message) {
- xxx_messageInfo_RpcError.Merge(dst, src)
-}
-func (m *RpcError) XXX_Size() int {
- return xxx_messageInfo_RpcError.Size(m)
-}
-func (m *RpcError) XXX_DiscardUnknown() {
- xxx_messageInfo_RpcError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_RpcError proto.InternalMessageInfo
-
-func (m *RpcError) GetCode() int32 {
- if m != nil && m.Code != nil {
- return *m.Code
- }
- return 0
-}
-
-func (m *RpcError) GetDetail() string {
- if m != nil && m.Detail != nil {
- return *m.Detail
- }
- return ""
-}
-
-type Response struct {
- Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"`
- Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"`
- ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"`
- JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"`
- RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Response) Reset() { *m = Response{} }
-func (m *Response) String() string { return proto.CompactTextString(m) }
-func (*Response) ProtoMessage() {}
-func (*Response) Descriptor() ([]byte, []int) {
- return fileDescriptor_remote_api_1978114ec33a273d, []int{3}
-}
-func (m *Response) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Response.Unmarshal(m, b)
-}
-func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Response.Marshal(b, m, deterministic)
-}
-func (dst *Response) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Response.Merge(dst, src)
-}
-func (m *Response) XXX_Size() int {
- return xxx_messageInfo_Response.Size(m)
-}
-func (m *Response) XXX_DiscardUnknown() {
- xxx_messageInfo_Response.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Response proto.InternalMessageInfo
-
-func (m *Response) GetResponse() []byte {
- if m != nil {
- return m.Response
- }
- return nil
-}
-
-func (m *Response) GetException() []byte {
- if m != nil {
- return m.Exception
- }
- return nil
-}
-
-func (m *Response) GetApplicationError() *ApplicationError {
- if m != nil {
- return m.ApplicationError
- }
- return nil
-}
-
-func (m *Response) GetJavaException() []byte {
- if m != nil {
- return m.JavaException
- }
- return nil
-}
-
-func (m *Response) GetRpcError() *RpcError {
- if m != nil {
- return m.RpcError
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*Request)(nil), "remote_api.Request")
- proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError")
- proto.RegisterType((*RpcError)(nil), "remote_api.RpcError")
- proto.RegisterType((*Response)(nil), "remote_api.Response")
-}
-
-func init() {
- proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d)
-}
-
-var fileDescriptor_remote_api_1978114ec33a273d = []byte{
- // 531 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40,
- 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42,
- 0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x6f, 0x91, 0x85, 0x65, 0xa7, 0x6b, 0xbb, 0x50, 0x5e,
- 0x56, 0x2b, 0x67, 0x65, 0x8c, 0x12, 0xaf, 0xd9, 0x98, 0x8a, 0x17, 0x6e, 0xc0, 0xb5, 0x38, 0x0c,
- 0xb7, 0x40, 0x36, 0x6e, 0x63, 0xf5, 0x89, 0xb7, 0x7f, 0x7e, 0x7b, 0xe6, 0x1b, 0xcd, 0xcc, 0xc2,
- 0xbb, 0x5c, 0xa9, 0x7c, 0x23, 0x17, 0xb9, 0xda, 0x88, 0x32, 0x5f, 0x28, 0x9d, 0x5f, 0x88, 0xaa,
- 0x92, 0x65, 0x5e, 0x94, 0xf2, 0xa2, 0x28, 0x6b, 0xa9, 0x4b, 0xb1, 0xb9, 0xd0, 0x72, 0xab, 0x6a,
- 0xc9, 0x45, 0x55, 0xf4, 0xe4, 0xa2, 0xd2, 0xaa, 0x56, 0x18, 0xf6, 0xce, 0xec, 0x27, 0x8c, 0x98,
- 0xfc, 0xf6, 0x5d, 0xee, 0x6a, 0xfc, 0x12, 0xec, 0x9d, 0xd4, 0xb7, 0x45, 0x26, 0x79, 0x29, 0xb6,
- 0xd2, 0x31, 0xa7, 0xe6, 0xdc, 0x62, 0x93, 0xce, 0x0b, 0xc5, 0x56, 0xe2, 0x33, 0x38, 0xdc, 0xca,
- 0xfa, 0x8b, 0x5a, 0x3b, 0x07, 0xed, 0xc7, 0x2e, 0xc2, 0x0e, 0x8c, 0xf4, 0xbf, 0x2a, 0xce, 0x60,
- 0x6a, 0xce, 0x6d, 0x76, 0x17, 0xe2, 0x17, 0x00, 0x9d, 0xe4, 0xc5, 0xda, 0x19, 0x4e, 0x8d, 0xb9,
- 0xc5, 0xac, 0xce, 0xf1, 0xd7, 0xb3, 0xb7, 0x80, 0x48, 0x55, 0x6d, 0x8a, 0x4c, 0xd4, 0x85, 0x2a,
- 0xa9, 0xd6, 0x4a, 0x63, 0x0c, 0x83, 0x4c, 0xad, 0xa5, 0x63, 0x4c, 0xcd, 0xf9, 0x90, 0xb5, 0xba,
- 0x01, 0xaf, 0x65, 0x2d, 0x8a, 0x4d, 0xd7, 0x55, 0x17, 0xcd, 0x7e, 0x9b, 0x30, 0x66, 0x55, 0xf6,
- 0x7f, 0x89, 0x46, 0x2f, 0xf1, 0x97, 0x09, 0x56, 0x9b, 0xe5, 0x36, 0x7f, 0x4d, 0x60, 0x94, 0x86,
- 0x1f, 0xc2, 0xe8, 0x63, 0x88, 0x1e, 0x61, 0x0c, 0xc7, 0x2e, 0x09, 0x02, 0x1e, 0x46, 0x09, 0xbf,
- 0x8c, 0xd2, 0xd0, 0x43, 0x06, 0x7e, 0x0c, 0x93, 0x15, 0x61, 0x31, 0xe5, 0x94, 0xb1, 0x88, 0x21,
- 0x13, 0x9f, 0x01, 0x8e, 0xa9, 0x9b, 0x32, 0x3f, 0xb9, 0xe1, 0xd7, 0x7e, 0x14, 0x90, 0xc4, 0x8f,
- 0x42, 0x74, 0x80, 0x8f, 0x01, 0xa2, 0x6b, 0xca, 0xf8, 0x55, 0x1a, 0x25, 0x04, 0x0d, 0xf0, 0x53,
- 0x38, 0x61, 0xf4, 0x2a, 0xa5, 0x71, 0xc2, 0x93, 0x28, 0xe2, 0x01, 0x61, 0xef, 0x29, 0x1a, 0xe2,
- 0x67, 0xf0, 0xc4, 0x25, 0x2b, 0xb2, 0xf4, 0x83, 0xa6, 0x80, 0xe7, 0xc7, 0x64, 0x19, 0x50, 0x0f,
- 0x1d, 0xe2, 0x53, 0x40, 0x97, 0x94, 0x24, 0x29, 0xa3, 0x7b, 0x77, 0xd4, 0xe0, 0x97, 0xc4, 0xe3,
- 0x5d, 0x25, 0x34, 0x6e, 0xf0, 0x8c, 0xc6, 0xab, 0x28, 0x8c, 0x69, 0xaf, 0xae, 0x85, 0x8f, 0xc0,
- 0x72, 0x49, 0xe8, 0xd2, 0xa0, 0xc9, 0x03, 0x8c, 0xc0, 0x66, 0x74, 0x15, 0x90, 0x9b, 0xae, 0xef,
- 0x49, 0xd3, 0x8f, 0x47, 0x89, 0x17, 0xf8, 0x21, 0xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64,
- 0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b,
- 0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5,
- 0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c,
- 0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf,
- 0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7,
- 0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e,
- 0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f,
- 0x03, 0x00, 0x00,
-}
diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
deleted file mode 100644
index f21763a4..00000000
--- a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
+++ /dev/null
@@ -1,44 +0,0 @@
-syntax = "proto2";
-option go_package = "remote_api";
-
-package remote_api;
-
-message Request {
- required string service_name = 2;
- required string method = 3;
- required bytes request = 4;
- optional string request_id = 5;
-}
-
-message ApplicationError {
- required int32 code = 1;
- required string detail = 2;
-}
-
-message RpcError {
- enum ErrorCode {
- UNKNOWN = 0;
- CALL_NOT_FOUND = 1;
- PARSE_ERROR = 2;
- SECURITY_VIOLATION = 3;
- OVER_QUOTA = 4;
- REQUEST_TOO_LARGE = 5;
- CAPABILITY_DISABLED = 6;
- FEATURE_DISABLED = 7;
- BAD_REQUEST = 8;
- RESPONSE_TOO_LARGE = 9;
- CANCELLED = 10;
- REPLAY_ERROR = 11;
- DEADLINE_EXCEEDED = 12;
- }
- required int32 code = 1;
- optional string detail = 2;
-}
-
-message Response {
- optional bytes response = 1;
- optional bytes exception = 2;
- optional ApplicationError application_error = 3;
- optional bytes java_exception = 4;
- optional RpcError rpc_error = 5;
-}
diff --git a/vendor/google.golang.org/appengine/internal/transaction.go b/vendor/google.golang.org/appengine/internal/transaction.go
deleted file mode 100644
index 9006ae65..00000000
--- a/vendor/google.golang.org/appengine/internal/transaction.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package internal
-
-// This file implements hooks for applying datastore transactions.
-
-import (
- "errors"
- "reflect"
-
- "github.com/golang/protobuf/proto"
- netcontext "golang.org/x/net/context"
-
- basepb "google.golang.org/appengine/internal/base"
- pb "google.golang.org/appengine/internal/datastore"
-)
-
-var transactionSetters = make(map[reflect.Type]reflect.Value)
-
-// RegisterTransactionSetter registers a function that sets transaction information
-// in a protocol buffer message. f should be a function with two arguments,
-// the first being a protocol buffer type, and the second being *datastore.Transaction.
-func RegisterTransactionSetter(f interface{}) {
- v := reflect.ValueOf(f)
- transactionSetters[v.Type().In(0)] = v
-}
-
-// applyTransaction applies the transaction t to message pb
-// by using the relevant setter passed to RegisterTransactionSetter.
-func applyTransaction(pb proto.Message, t *pb.Transaction) {
- v := reflect.ValueOf(pb)
- if f, ok := transactionSetters[v.Type()]; ok {
- f.Call([]reflect.Value{v, reflect.ValueOf(t)})
- }
-}
-
-var transactionKey = "used for *Transaction"
-
-func transactionFromContext(ctx netcontext.Context) *transaction {
- t, _ := ctx.Value(&transactionKey).(*transaction)
- return t
-}
-
-func withTransaction(ctx netcontext.Context, t *transaction) netcontext.Context {
- return netcontext.WithValue(ctx, &transactionKey, t)
-}
-
-type transaction struct {
- transaction pb.Transaction
- finished bool
-}
-
-var ErrConcurrentTransaction = errors.New("internal: concurrent transaction")
-
-func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) {
- if transactionFromContext(c) != nil {
- return nil, errors.New("nested transactions are not supported")
- }
-
- // Begin the transaction.
- t := &transaction{}
- req := &pb.BeginTransactionRequest{
- App: proto.String(FullyQualifiedAppID(c)),
- }
- if xg {
- req.AllowMultipleEg = proto.Bool(true)
- }
- if previousTransaction != nil {
- req.PreviousTransaction = previousTransaction
- }
- if readOnly {
- req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum()
- } else {
- req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum()
- }
- if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil {
- return nil, err
- }
-
- // Call f, rolling back the transaction if f returns a non-nil error, or panics.
- // The panic is not recovered.
- defer func() {
- if t.finished {
- return
- }
- t.finished = true
- // Ignore the error return value, since we are already returning a non-nil
- // error (or we're panicking).
- Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{})
- }()
- if err := f(withTransaction(c, t)); err != nil {
- return &t.transaction, err
- }
- t.finished = true
-
- // Commit the transaction.
- res := &pb.CommitResponse{}
- err := Call(c, "datastore_v3", "Commit", &t.transaction, res)
- if ae, ok := err.(*APIError); ok {
- /* TODO: restore this conditional
- if appengine.IsDevAppServer() {
- */
- // The Python Dev AppServer raises an ApplicationError with error code 2 (which is
- // Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.".
- if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." {
- return &t.transaction, ErrConcurrentTransaction
- }
- if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) {
- return &t.transaction, ErrConcurrentTransaction
- }
- }
- return &t.transaction, err
-}
diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
deleted file mode 100644
index 5f727750..00000000
--- a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
+++ /dev/null
@@ -1,527 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
-
-package urlfetch
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type URLFetchServiceError_ErrorCode int32
-
-const (
- URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0
- URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1
- URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2
- URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3
- URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4
- URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5
- URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6
- URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7
- URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8
- URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9
- URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10
- URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11
- URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12
-)
-
-var URLFetchServiceError_ErrorCode_name = map[int32]string{
- 0: "OK",
- 1: "INVALID_URL",
- 2: "FETCH_ERROR",
- 3: "UNSPECIFIED_ERROR",
- 4: "RESPONSE_TOO_LARGE",
- 5: "DEADLINE_EXCEEDED",
- 6: "SSL_CERTIFICATE_ERROR",
- 7: "DNS_ERROR",
- 8: "CLOSED",
- 9: "INTERNAL_TRANSIENT_ERROR",
- 10: "TOO_MANY_REDIRECTS",
- 11: "MALFORMED_REPLY",
- 12: "CONNECTION_ERROR",
-}
-var URLFetchServiceError_ErrorCode_value = map[string]int32{
- "OK": 0,
- "INVALID_URL": 1,
- "FETCH_ERROR": 2,
- "UNSPECIFIED_ERROR": 3,
- "RESPONSE_TOO_LARGE": 4,
- "DEADLINE_EXCEEDED": 5,
- "SSL_CERTIFICATE_ERROR": 6,
- "DNS_ERROR": 7,
- "CLOSED": 8,
- "INTERNAL_TRANSIENT_ERROR": 9,
- "TOO_MANY_REDIRECTS": 10,
- "MALFORMED_REPLY": 11,
- "CONNECTION_ERROR": 12,
-}
-
-func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode {
- p := new(URLFetchServiceError_ErrorCode)
- *p = x
- return p
-}
-func (x URLFetchServiceError_ErrorCode) String() string {
- return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x))
-}
-func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode")
- if err != nil {
- return err
- }
- *x = URLFetchServiceError_ErrorCode(value)
- return nil
-}
-func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0}
-}
-
-type URLFetchRequest_RequestMethod int32
-
-const (
- URLFetchRequest_GET URLFetchRequest_RequestMethod = 1
- URLFetchRequest_POST URLFetchRequest_RequestMethod = 2
- URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3
- URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4
- URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5
- URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6
-)
-
-var URLFetchRequest_RequestMethod_name = map[int32]string{
- 1: "GET",
- 2: "POST",
- 3: "HEAD",
- 4: "PUT",
- 5: "DELETE",
- 6: "PATCH",
-}
-var URLFetchRequest_RequestMethod_value = map[string]int32{
- "GET": 1,
- "POST": 2,
- "HEAD": 3,
- "PUT": 4,
- "DELETE": 5,
- "PATCH": 6,
-}
-
-func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod {
- p := new(URLFetchRequest_RequestMethod)
- *p = x
- return p
-}
-func (x URLFetchRequest_RequestMethod) String() string {
- return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x))
-}
-func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod")
- if err != nil {
- return err
- }
- *x = URLFetchRequest_RequestMethod(value)
- return nil
-}
-func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0}
-}
-
-type URLFetchServiceError struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} }
-func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) }
-func (*URLFetchServiceError) ProtoMessage() {}
-func (*URLFetchServiceError) Descriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0}
-}
-func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b)
-}
-func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic)
-}
-func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) {
- xxx_messageInfo_URLFetchServiceError.Merge(dst, src)
-}
-func (m *URLFetchServiceError) XXX_Size() int {
- return xxx_messageInfo_URLFetchServiceError.Size(m)
-}
-func (m *URLFetchServiceError) XXX_DiscardUnknown() {
- xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo
-
-type URLFetchRequest struct {
- Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"`
- Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"`
- Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"`
- Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"`
- FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"`
- Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"`
- MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} }
-func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) }
-func (*URLFetchRequest) ProtoMessage() {}
-func (*URLFetchRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1}
-}
-func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b)
-}
-func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic)
-}
-func (dst *URLFetchRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_URLFetchRequest.Merge(dst, src)
-}
-func (m *URLFetchRequest) XXX_Size() int {
- return xxx_messageInfo_URLFetchRequest.Size(m)
-}
-func (m *URLFetchRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_URLFetchRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo
-
-const Default_URLFetchRequest_FollowRedirects bool = true
-const Default_URLFetchRequest_MustValidateServerCertificate bool = true
-
-func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod {
- if m != nil && m.Method != nil {
- return *m.Method
- }
- return URLFetchRequest_GET
-}
-
-func (m *URLFetchRequest) GetUrl() string {
- if m != nil && m.Url != nil {
- return *m.Url
- }
- return ""
-}
-
-func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *URLFetchRequest) GetPayload() []byte {
- if m != nil {
- return m.Payload
- }
- return nil
-}
-
-func (m *URLFetchRequest) GetFollowRedirects() bool {
- if m != nil && m.FollowRedirects != nil {
- return *m.FollowRedirects
- }
- return Default_URLFetchRequest_FollowRedirects
-}
-
-func (m *URLFetchRequest) GetDeadline() float64 {
- if m != nil && m.Deadline != nil {
- return *m.Deadline
- }
- return 0
-}
-
-func (m *URLFetchRequest) GetMustValidateServerCertificate() bool {
- if m != nil && m.MustValidateServerCertificate != nil {
- return *m.MustValidateServerCertificate
- }
- return Default_URLFetchRequest_MustValidateServerCertificate
-}
-
-type URLFetchRequest_Header struct {
- Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"`
- Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} }
-func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) }
-func (*URLFetchRequest_Header) ProtoMessage() {}
-func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0}
-}
-func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b)
-}
-func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic)
-}
-func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) {
- xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src)
-}
-func (m *URLFetchRequest_Header) XXX_Size() int {
- return xxx_messageInfo_URLFetchRequest_Header.Size(m)
-}
-func (m *URLFetchRequest_Header) XXX_DiscardUnknown() {
- xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo
-
-func (m *URLFetchRequest_Header) GetKey() string {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return ""
-}
-
-func (m *URLFetchRequest_Header) GetValue() string {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return ""
-}
-
-type URLFetchResponse struct {
- Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"`
- StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"`
- Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"`
- ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"`
- ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"`
- ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"`
- FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"`
- ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"`
- ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"`
- ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} }
-func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) }
-func (*URLFetchResponse) ProtoMessage() {}
-func (*URLFetchResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2}
-}
-func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b)
-}
-func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic)
-}
-func (dst *URLFetchResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_URLFetchResponse.Merge(dst, src)
-}
-func (m *URLFetchResponse) XXX_Size() int {
- return xxx_messageInfo_URLFetchResponse.Size(m)
-}
-func (m *URLFetchResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_URLFetchResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo
-
-const Default_URLFetchResponse_ContentWasTruncated bool = false
-const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0
-const Default_URLFetchResponse_ApiBytesSent int64 = 0
-const Default_URLFetchResponse_ApiBytesReceived int64 = 0
-
-func (m *URLFetchResponse) GetContent() []byte {
- if m != nil {
- return m.Content
- }
- return nil
-}
-
-func (m *URLFetchResponse) GetStatusCode() int32 {
- if m != nil && m.StatusCode != nil {
- return *m.StatusCode
- }
- return 0
-}
-
-func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header {
- if m != nil {
- return m.Header
- }
- return nil
-}
-
-func (m *URLFetchResponse) GetContentWasTruncated() bool {
- if m != nil && m.ContentWasTruncated != nil {
- return *m.ContentWasTruncated
- }
- return Default_URLFetchResponse_ContentWasTruncated
-}
-
-func (m *URLFetchResponse) GetExternalBytesSent() int64 {
- if m != nil && m.ExternalBytesSent != nil {
- return *m.ExternalBytesSent
- }
- return 0
-}
-
-func (m *URLFetchResponse) GetExternalBytesReceived() int64 {
- if m != nil && m.ExternalBytesReceived != nil {
- return *m.ExternalBytesReceived
- }
- return 0
-}
-
-func (m *URLFetchResponse) GetFinalUrl() string {
- if m != nil && m.FinalUrl != nil {
- return *m.FinalUrl
- }
- return ""
-}
-
-func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 {
- if m != nil && m.ApiCpuMilliseconds != nil {
- return *m.ApiCpuMilliseconds
- }
- return Default_URLFetchResponse_ApiCpuMilliseconds
-}
-
-func (m *URLFetchResponse) GetApiBytesSent() int64 {
- if m != nil && m.ApiBytesSent != nil {
- return *m.ApiBytesSent
- }
- return Default_URLFetchResponse_ApiBytesSent
-}
-
-func (m *URLFetchResponse) GetApiBytesReceived() int64 {
- if m != nil && m.ApiBytesReceived != nil {
- return *m.ApiBytesReceived
- }
- return Default_URLFetchResponse_ApiBytesReceived
-}
-
-type URLFetchResponse_Header struct {
- Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"`
- Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} }
-func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) }
-func (*URLFetchResponse_Header) ProtoMessage() {}
-func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) {
- return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0}
-}
-func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b)
-}
-func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic)
-}
-func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) {
- xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src)
-}
-func (m *URLFetchResponse_Header) XXX_Size() int {
- return xxx_messageInfo_URLFetchResponse_Header.Size(m)
-}
-func (m *URLFetchResponse_Header) XXX_DiscardUnknown() {
- xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo
-
-func (m *URLFetchResponse_Header) GetKey() string {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return ""
-}
-
-func (m *URLFetchResponse_Header) GetValue() string {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return ""
-}
-
-func init() {
- proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError")
- proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest")
- proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header")
- proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse")
- proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header")
-}
-
-func init() {
- proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced)
-}
-
-var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{
- // 770 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54,
- 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29,
- 0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e,
- 0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d,
- 0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b,
- 0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27,
- 0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0xa2, 0x62, 0x99, 0x15, 0x74, 0x9e, 0x15, 0x92,
- 0xaa, 0x22, 0xc9, 0xcf, 0xd7, 0x55, 0x7e, 0x4b, 0x72, 0x71, 0xb7, 0x0f, 0xe2, 0x9a, 0xaa, 0xb7,
- 0xd9, 0x82, 0xc6, 0xab, 0xaa, 0x94, 0x25, 0xf6, 0xf7, 0x67, 0x86, 0x7f, 0xeb, 0x70, 0x3a, 0x17,
- 0xde, 0x44, 0xb1, 0xc2, 0x2d, 0x89, 0x57, 0x55, 0x59, 0x0d, 0xff, 0xd2, 0xa1, 0xbf, 0x89, 0xec,
- 0x32, 0x25, 0xec, 0x80, 0x1e, 0x5c, 0xb3, 0x4f, 0xf0, 0x04, 0x8e, 0x5c, 0xff, 0xc6, 0xf2, 0x5c,
- 0x27, 0x9e, 0x0b, 0x8f, 0x69, 0x0a, 0x98, 0xf0, 0xc8, 0xbe, 0x8a, 0xb9, 0x10, 0x81, 0x60, 0x3a,
- 0x9e, 0xc1, 0xd3, 0xb9, 0x1f, 0xce, 0xb8, 0xed, 0x4e, 0x5c, 0xee, 0x34, 0xb0, 0x81, 0x9f, 0x01,
- 0x0a, 0x1e, 0xce, 0x02, 0x3f, 0xe4, 0x71, 0x14, 0x04, 0xb1, 0x67, 0x89, 0xd7, 0x9c, 0xb5, 0x14,
- 0xdd, 0xe1, 0x96, 0xe3, 0xb9, 0x3e, 0x8f, 0xf9, 0xaf, 0x36, 0xe7, 0x0e, 0x77, 0x58, 0x1b, 0x3f,
- 0x87, 0xb3, 0x30, 0xf4, 0x62, 0x9b, 0x8b, 0xc8, 0x9d, 0xb8, 0xb6, 0x15, 0xf1, 0xa6, 0x53, 0x07,
- 0x9f, 0x40, 0xdf, 0xf1, 0xc3, 0x26, 0xed, 0x22, 0x40, 0xc7, 0xf6, 0x82, 0x90, 0x3b, 0xac, 0x87,
- 0x2f, 0xc0, 0x74, 0xfd, 0x88, 0x0b, 0xdf, 0xf2, 0xe2, 0x48, 0x58, 0x7e, 0xe8, 0x72, 0x3f, 0x6a,
- 0x98, 0x7d, 0x35, 0x82, 0xba, 0x79, 0x6a, 0xf9, 0x6f, 0x62, 0xc1, 0x1d, 0x57, 0x70, 0x3b, 0x0a,
- 0x19, 0xe0, 0x33, 0x38, 0x99, 0x5a, 0xde, 0x24, 0x10, 0x53, 0xee, 0xc4, 0x82, 0xcf, 0xbc, 0x37,
- 0xec, 0x08, 0x4f, 0x81, 0xd9, 0x81, 0xef, 0x73, 0x3b, 0x72, 0x03, 0xbf, 0x69, 0x71, 0x3c, 0xfc,
- 0xc7, 0x80, 0x93, 0x9d, 0x5a, 0x82, 0x7e, 0x5f, 0x53, 0x2d, 0xf1, 0x27, 0xe8, 0x4c, 0x49, 0xde,
- 0x95, 0xa9, 0xa9, 0x0d, 0xf4, 0xd1, 0xa7, 0xaf, 0x46, 0xe3, 0xbd, 0xba, 0xe3, 0x47, 0xdc, 0x71,
- 0xf3, 0xbb, 0xe5, 0x8b, 0xe6, 0x1c, 0x32, 0x30, 0xe6, 0x55, 0x6e, 0xea, 0x03, 0x7d, 0xd4, 0x17,
- 0x2a, 0xc4, 0x1f, 0xa1, 0x73, 0x47, 0x49, 0x4a, 0x95, 0x69, 0x0c, 0x8c, 0x11, 0xbc, 0xfa, 0xea,
- 0x23, 0x3d, 0xaf, 0x36, 0x44, 0xd1, 0x1c, 0xc0, 0x17, 0xd0, 0x9d, 0x25, 0xf7, 0x79, 0x99, 0xa4,
- 0x66, 0x67, 0xa0, 0x8d, 0x8e, 0x2f, 0xf5, 0x9e, 0x26, 0x76, 0x10, 0x8e, 0xe1, 0x64, 0x52, 0xe6,
- 0x79, 0xf9, 0x87, 0xa0, 0x34, 0xab, 0x68, 0x21, 0x6b, 0xb3, 0x3b, 0xd0, 0x46, 0xbd, 0x8b, 0x96,
- 0xac, 0xd6, 0x24, 0x1e, 0x17, 0xf1, 0x39, 0xf4, 0x1c, 0x4a, 0xd2, 0x3c, 0x2b, 0xc8, 0xec, 0x0d,
- 0xb4, 0x91, 0x26, 0xf6, 0x39, 0xfe, 0x0c, 0x5f, 0x4c, 0xd7, 0xb5, 0xbc, 0x49, 0xf2, 0x2c, 0x4d,
- 0x24, 0xa9, 0xed, 0xa1, 0xca, 0xa6, 0x4a, 0x66, 0xb7, 0xd9, 0x22, 0x91, 0x64, 0xf6, 0xdf, 0xeb,
- 0xfc, 0x71, 0xea, 0xf3, 0x97, 0xd0, 0xd9, 0xfe, 0x0f, 0x25, 0xc6, 0x35, 0xdd, 0x9b, 0xad, 0xad,
- 0x18, 0xd7, 0x74, 0x8f, 0xa7, 0xd0, 0xbe, 0x49, 0xf2, 0x35, 0x99, 0xed, 0x0d, 0xb6, 0x4d, 0x86,
- 0x1e, 0x3c, 0x79, 0xa0, 0x26, 0x76, 0xc1, 0x78, 0xcd, 0x23, 0xa6, 0x61, 0x0f, 0x5a, 0xb3, 0x20,
- 0x8c, 0x98, 0xae, 0xa2, 0x2b, 0x6e, 0x39, 0xcc, 0x50, 0xc5, 0xd9, 0x3c, 0x62, 0x2d, 0xb5, 0x2e,
- 0x0e, 0xf7, 0x78, 0xc4, 0x59, 0x1b, 0xfb, 0xd0, 0x9e, 0x59, 0x91, 0x7d, 0xc5, 0x3a, 0xc3, 0x7f,
- 0x0d, 0x60, 0xef, 0x84, 0xad, 0x57, 0x65, 0x51, 0x13, 0x9a, 0xd0, 0xb5, 0xcb, 0x42, 0x52, 0x21,
- 0x4d, 0x4d, 0x49, 0x29, 0x76, 0x29, 0x7e, 0x09, 0x10, 0xca, 0x44, 0xae, 0x6b, 0xf5, 0x71, 0x6c,
- 0x8c, 0x6b, 0x8b, 0xf7, 0x10, 0xbc, 0x78, 0xe4, 0xdf, 0xf0, 0xa0, 0x7f, 0xdb, 0x6b, 0x1e, 0x1b,
- 0xf8, 0x03, 0x3c, 0x6b, 0xae, 0xf9, 0x25, 0xa9, 0xa3, 0x6a, 0x5d, 0x28, 0x81, 0xb6, 0x66, 0xf6,
- 0x2e, 0xda, 0xb7, 0x49, 0x5e, 0x93, 0x38, 0xc4, 0xc0, 0x6f, 0xe0, 0x29, 0xff, 0x73, 0xfb, 0x02,
- 0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b,
- 0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9,
- 0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e,
- 0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97,
- 0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3,
- 0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8,
- 0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05,
- 0x00, 0x00,
-}
diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
deleted file mode 100644
index f695edf6..00000000
--- a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
+++ /dev/null
@@ -1,64 +0,0 @@
-syntax = "proto2";
-option go_package = "urlfetch";
-
-package appengine;
-
-message URLFetchServiceError {
- enum ErrorCode {
- OK = 0;
- INVALID_URL = 1;
- FETCH_ERROR = 2;
- UNSPECIFIED_ERROR = 3;
- RESPONSE_TOO_LARGE = 4;
- DEADLINE_EXCEEDED = 5;
- SSL_CERTIFICATE_ERROR = 6;
- DNS_ERROR = 7;
- CLOSED = 8;
- INTERNAL_TRANSIENT_ERROR = 9;
- TOO_MANY_REDIRECTS = 10;
- MALFORMED_REPLY = 11;
- CONNECTION_ERROR = 12;
- }
-}
-
-message URLFetchRequest {
- enum RequestMethod {
- GET = 1;
- POST = 2;
- HEAD = 3;
- PUT = 4;
- DELETE = 5;
- PATCH = 6;
- }
- required RequestMethod Method = 1;
- required string Url = 2;
- repeated group Header = 3 {
- required string Key = 4;
- required string Value = 5;
- }
- optional bytes Payload = 6 [ctype=CORD];
-
- optional bool FollowRedirects = 7 [default=true];
-
- optional double Deadline = 8;
-
- optional bool MustValidateServerCertificate = 9 [default=true];
-}
-
-message URLFetchResponse {
- optional bytes Content = 1;
- required int32 StatusCode = 2;
- repeated group Header = 3 {
- required string Key = 4;
- required string Value = 5;
- }
- optional bool ContentWasTruncated = 6 [default=false];
- optional int64 ExternalBytesSent = 7;
- optional int64 ExternalBytesReceived = 8;
-
- optional string FinalUrl = 9;
-
- optional int64 ApiCpuMilliseconds = 10 [default=0];
- optional int64 ApiBytesSent = 11 [default=0];
- optional int64 ApiBytesReceived = 12 [default=0];
-}
diff --git a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go b/vendor/google.golang.org/appengine/urlfetch/urlfetch.go
deleted file mode 100644
index 6ffe1e6d..00000000
--- a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// Package urlfetch provides an http.RoundTripper implementation
-// for fetching URLs via App Engine's urlfetch service.
-package urlfetch // import "google.golang.org/appengine/urlfetch"
-
-import (
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "strconv"
- "strings"
- "time"
-
- "github.com/golang/protobuf/proto"
- "golang.org/x/net/context"
-
- "google.golang.org/appengine/internal"
- pb "google.golang.org/appengine/internal/urlfetch"
-)
-
-// Transport is an implementation of http.RoundTripper for
-// App Engine. Users should generally create an http.Client using
-// this transport and use the Client rather than using this transport
-// directly.
-type Transport struct {
- Context context.Context
-
- // Controls whether the application checks the validity of SSL certificates
- // over HTTPS connections. A value of false (the default) instructs the
- // application to send a request to the server only if the certificate is
- // valid and signed by a trusted certificate authority (CA), and also
- // includes a hostname that matches the certificate. A value of true
- // instructs the application to perform no certificate validation.
- AllowInvalidServerCertificate bool
-}
-
-// Verify statically that *Transport implements http.RoundTripper.
-var _ http.RoundTripper = (*Transport)(nil)
-
-// Client returns an *http.Client using a default urlfetch Transport. This
-// client will have the default deadline of 5 seconds, and will check the
-// validity of SSL certificates.
-//
-// Any deadline of the provided context will be used for requests through this client;
-// if the client does not have a deadline then a 5 second default is used.
-func Client(ctx context.Context) *http.Client {
- return &http.Client{
- Transport: &Transport{
- Context: ctx,
- },
- }
-}
-
-type bodyReader struct {
- content []byte
- truncated bool
- closed bool
-}
-
-// ErrTruncatedBody is the error returned after the final Read() from a
-// response's Body if the body has been truncated by App Engine's proxy.
-var ErrTruncatedBody = errors.New("urlfetch: truncated body")
-
-func statusCodeToText(code int) string {
- if t := http.StatusText(code); t != "" {
- return t
- }
- return strconv.Itoa(code)
-}
-
-func (br *bodyReader) Read(p []byte) (n int, err error) {
- if br.closed {
- if br.truncated {
- return 0, ErrTruncatedBody
- }
- return 0, io.EOF
- }
- n = copy(p, br.content)
- if n > 0 {
- br.content = br.content[n:]
- return
- }
- if br.truncated {
- br.closed = true
- return 0, ErrTruncatedBody
- }
- return 0, io.EOF
-}
-
-func (br *bodyReader) Close() error {
- br.closed = true
- br.content = nil
- return nil
-}
-
-// A map of the URL Fetch-accepted methods that take a request body.
-var methodAcceptsRequestBody = map[string]bool{
- "POST": true,
- "PUT": true,
- "PATCH": true,
-}
-
-// urlString returns a valid string given a URL. This function is necessary because
-// the String method of URL doesn't correctly handle URLs with non-empty Opaque values.
-// See http://code.google.com/p/go/issues/detail?id=4860.
-func urlString(u *url.URL) string {
- if u.Opaque == "" || strings.HasPrefix(u.Opaque, "//") {
- return u.String()
- }
- aux := *u
- aux.Opaque = "//" + aux.Host + aux.Opaque
- return aux.String()
-}
-
-// RoundTrip issues a single HTTP request and returns its response. Per the
-// http.RoundTripper interface, RoundTrip only returns an error if there
-// was an unsupported request or the URL Fetch proxy fails.
-// Note that HTTP response codes such as 5xx, 403, 404, etc are not
-// errors as far as the transport is concerned and will be returned
-// with err set to nil.
-func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error) {
- methNum, ok := pb.URLFetchRequest_RequestMethod_value[req.Method]
- if !ok {
- return nil, fmt.Errorf("urlfetch: unsupported HTTP method %q", req.Method)
- }
-
- method := pb.URLFetchRequest_RequestMethod(methNum)
-
- freq := &pb.URLFetchRequest{
- Method: &method,
- Url: proto.String(urlString(req.URL)),
- FollowRedirects: proto.Bool(false), // http.Client's responsibility
- MustValidateServerCertificate: proto.Bool(!t.AllowInvalidServerCertificate),
- }
- if deadline, ok := t.Context.Deadline(); ok {
- freq.Deadline = proto.Float64(deadline.Sub(time.Now()).Seconds())
- }
-
- for k, vals := range req.Header {
- for _, val := range vals {
- freq.Header = append(freq.Header, &pb.URLFetchRequest_Header{
- Key: proto.String(k),
- Value: proto.String(val),
- })
- }
- }
- if methodAcceptsRequestBody[req.Method] && req.Body != nil {
- // Avoid a []byte copy if req.Body has a Bytes method.
- switch b := req.Body.(type) {
- case interface {
- Bytes() []byte
- }:
- freq.Payload = b.Bytes()
- default:
- freq.Payload, err = ioutil.ReadAll(req.Body)
- if err != nil {
- return nil, err
- }
- }
- }
-
- fres := &pb.URLFetchResponse{}
- if err := internal.Call(t.Context, "urlfetch", "Fetch", freq, fres); err != nil {
- return nil, err
- }
-
- res = &http.Response{}
- res.StatusCode = int(*fres.StatusCode)
- res.Status = fmt.Sprintf("%d %s", res.StatusCode, statusCodeToText(res.StatusCode))
- res.Header = make(http.Header)
- res.Request = req
-
- // Faked:
- res.ProtoMajor = 1
- res.ProtoMinor = 1
- res.Proto = "HTTP/1.1"
- res.Close = true
-
- for _, h := range fres.Header {
- hkey := http.CanonicalHeaderKey(*h.Key)
- hval := *h.Value
- if hkey == "Content-Length" {
- // Will get filled in below for all but HEAD requests.
- if req.Method == "HEAD" {
- res.ContentLength, _ = strconv.ParseInt(hval, 10, 64)
- }
- continue
- }
- res.Header.Add(hkey, hval)
- }
-
- if req.Method != "HEAD" {
- res.ContentLength = int64(len(fres.Content))
- }
-
- truncated := fres.GetContentWasTruncated()
- res.Body = &bodyReader{content: fres.Content, truncated: truncated}
- return
-}
-
-func init() {
- internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name)
- internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED))
-}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index e73ddd5c..8cf4cdae 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,16 +1,3 @@
-# github.com/golang/protobuf v1.2.0
-github.com/golang/protobuf/proto
-# golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
-golang.org/x/net/context
-golang.org/x/net/context/ctxhttp
-# golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
+# golang.org/x/oauth2 v0.25.0
golang.org/x/oauth2
golang.org/x/oauth2/internal
-# google.golang.org/appengine v1.4.0
-google.golang.org/appengine/internal
-google.golang.org/appengine/internal/base
-google.golang.org/appengine/internal/datastore
-google.golang.org/appengine/internal/log
-google.golang.org/appengine/internal/remote_api
-google.golang.org/appengine/internal/urlfetch
-google.golang.org/appengine/urlfetch
From 750b2308b9717e19e7813a84830996bd3aef469e Mon Sep 17 00:00:00 2001
From: Vitalii Drevenchuk <4005032+Crandel@users.noreply.github.com>
Date: Thu, 16 Jan 2025 17:11:58 +0100
Subject: [PATCH 9/9] update example mod
---
.github/.example/go.mod | 8 ++++----
.github/.example/go.sum | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/.example/go.mod b/.github/.example/go.mod
index 19366bdf..291e7f1b 100644
--- a/.github/.example/go.mod
+++ b/.github/.example/go.mod
@@ -1,9 +1,9 @@
module example
-go 1.23.3
+go 1.23.4
-replace github.com/talon-one/talon_go/v8 => ../..
+replace github.com/talon-one/talon_go/v9 => ../..
-require github.com/talon-one/talon_go/v8 v8.0.0
+require github.com/talon-one/talon_go/v9 v9.0.0
-require golang.org/x/oauth2 v0.23.0 // indirect
+require golang.org/x/oauth2 v0.25.0 // indirect
diff --git a/.github/.example/go.sum b/.github/.example/go.sum
index 7c38313a..51c7f0b6 100644
--- a/.github/.example/go.sum
+++ b/.github/.example/go.sum
@@ -1,5 +1,5 @@
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
-golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
+golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70=
+golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=